diff options
| author | 2015-08-04 14:07:07 +0000 | |
|---|---|---|
| committer | 2015-08-04 14:07:07 +0000 | |
| commit | 5229149dc59522f4e4fa74b3e739c2b68eca491b (patch) | |
| tree | f604db91fb737590a862f9b1a97b94a9525aaaa4 | |
| parent | b0ab2d9b01c679e1adeb93e8a2955c6bbdac1d79 (diff) | |
| parent | 88d616c80c54aeb99abeb1534b14436780ede253 (diff) | |
am 88d616c8: am bbb17765: am 55dbf2d7: Merge "QS: Allow Flashlight Tile to handle reset state" into mnc-dev
* commit '88d616c80c54aeb99abeb1534b14436780ede253':
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; } |