summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
diff options
context:
space:
mode:
authorRoman Birg <roman@cyngn.com>2016-03-18 09:08:28 -0700
committerRoman Birg <roman@cyngn.com>2016-03-21 09:59:26 -0700
commit53ece467584f2d79cfca3767ba20ce501b2393d2 (patch)
tree16b440546ec61f9e429cdd1dcc6ca6f8e30faebd /packages/SystemUI/src/com/android/systemui/qs/QSTile.java
parent9d474093528d5eeec6beed1eb330fa6b0648221d (diff)
downloadframeworks_base-53ece467584f2d79cfca3767ba20ce501b2393d2.zip
frameworks_base-53ece467584f2d79cfca3767ba20ce501b2393d2.tar.gz
frameworks_base-53ece467584f2d79cfca3767ba20ce501b2393d2.tar.bz2
SystemUI: improve battery saver tile
- Fix the tile not showing, the javadoc states that it will return 0 if profiles are not supported, but it was actually returning -1. - Now disables itself when the device is plugged in to reflect to the user that they cannot toggle it on right now. - Don't wait for power manager to update its internal state before updating the visual tile state. Change-Id: I8ab6adb2bfa728a242368294c1f066d468a86f09 Signed-off-by: Roman Birg <roman@cyngn.com>
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/qs/QSTile.java')
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSTile.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTile.java b/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
index 2d62724..01a170f 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
@@ -34,6 +34,7 @@ import android.view.ViewGroup;
import android.widget.RemoteViews;
import com.android.systemui.qs.QSTile.State;
+import com.android.systemui.statusbar.policy.BatteryController;
import com.android.systemui.statusbar.policy.BluetoothController;
import com.android.systemui.statusbar.policy.CastController;
import com.android.systemui.statusbar.policy.FlashlightController;
@@ -344,6 +345,7 @@ public abstract class QSTile<TState extends State> implements Listenable {
CastController getCastController();
FlashlightController getFlashlightController();
KeyguardMonitor getKeyguardMonitor();
+ BatteryController getBatteryController();
boolean isEditing();
void setEditing(boolean editing);
void resetTiles();