commit | bbb1776581330257f16e2bf0a85d9bafb73395d1 | [log] [tgz] |
---|---|---|
author | Jason Monk <jmonk@google.com> | Tue Aug 04 13:52:34 2015 +0000 |
committer | Android Git Automerger <android-git-automerger@android.com> | Tue Aug 04 13:52:34 2015 +0000 |
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
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 5d74604..21cbef2 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 @@ 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 cd1914c..29a8f67 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 synchronized boolean isEnabled() { + return mFlashlightEnabled; + } + public synchronized boolean isAvailable() { return mTorchAvailable; }