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