summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jason Monk <jmonk@google.com> 2015-08-04 13:59:25 +0000
committer Android Git Automerger <android-git-automerger@android.com> 2015-08-04 13:59:25 +0000
commit88d616c80c54aeb99abeb1534b14436780ede253 (patch)
tree9b49d6012e8fcfa5ff4ceea37d65e0bdfa3448f1
parentce3ef9c86df12a36ae8f94cdd5531b82e86e1125 (diff)
parentbbb1776581330257f16e2bf0a85d9bafb73395d1 (diff)
am bbb17765: am 55dbf2d7: Merge "QS: Allow Flashlight Tile to handle reset state" into mnc-dev
* commit 'bbb1776581330257f16e2bf0a85d9bafb73395d1': QS: Allow Flashlight Tile to handle reset state
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/FlashlightTile.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java4
2 files changed, 6 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/FlashlightTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/FlashlightTile.java
index 5d7460460a8b..21cbef21c22a 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/FlashlightTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/FlashlightTile.java
@@ -79,6 +79,8 @@ public class FlashlightTile extends QSTile<QSTile.BooleanState> implements
return;
}
state.value = value;
+ } else {
+ state.value = mFlashlightController.isEnabled();
}
final AnimationIcon icon = state.value ? mEnable : mDisable;
icon.setAllowAnimation(arg instanceof UserBoolean && ((UserBoolean) arg).userInitiated);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java
index cd1914c55663..29a8f67e4cfe 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java
@@ -93,6 +93,10 @@ public class FlashlightController {
}
}
+ public synchronized boolean isEnabled() {
+ return mFlashlightEnabled;
+ }
+
public synchronized boolean isAvailable() {
return mTorchAvailable;
}