diff options
| author | 2015-08-04 13:52:34 +0000 | |
|---|---|---|
| committer | 2015-08-04 13:52:34 +0000 | |
| commit | bbb1776581330257f16e2bf0a85d9bafb73395d1 (patch) | |
| tree | 9d01f2ac2a14180f0949bdd02cb64bd070a94e04 | |
| parent | 4e07468fcec44f97dffde9533b1480674dc47d86 (diff) | |
| parent | 55dbf2d78e575b6c7b53e06aed17ff7406305a13 (diff) | |
am 55dbf2d7: Merge "QS: Allow Flashlight Tile to handle reset state" into mnc-dev
* commit '55dbf2d78e575b6c7b53e06aed17ff7406305a13':
QS: Allow Flashlight Tile to handle reset state
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/tiles/FlashlightTile.java | 2 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java | 4 |
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; } |