summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Monk <jmonk@google.com>2015-06-04 18:10:29 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-04 18:10:33 +0000
commited9d3494a8d8495b83b0cc216549ee37e39ef04d (patch)
tree74222e0cf277d8429714890c04956d2eed1e2026
parente50b091df9586c5c41d219ffb0c41fa3f893c329 (diff)
parent9128b1e2415a251d4cf197a9cd9833285275bb71 (diff)
downloadframeworks_base-ed9d3494a8d8495b83b0cc216549ee37e39ef04d.zip
frameworks_base-ed9d3494a8d8495b83b0cc216549ee37e39ef04d.tar.gz
frameworks_base-ed9d3494a8d8495b83b0cc216549ee37e39ef04d.tar.bz2
Merge "Fix Flashlight tile animation" into mnc-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/FlashlightTile.java6
1 files changed, 5 insertions, 1 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 0369ab5..5d74604 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/FlashlightTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/FlashlightTile.java
@@ -74,7 +74,11 @@ public class FlashlightTile extends QSTile<QSTile.BooleanState> implements
state.visible = mFlashlightController.isAvailable();
state.label = mHost.getContext().getString(R.string.quick_settings_flashlight_label);
if (arg instanceof UserBoolean) {
- state.value = ((UserBoolean) arg).value;
+ boolean value = ((UserBoolean) arg).value;
+ if (value == state.value) {
+ return;
+ }
+ state.value = value;
}
final AnimationIcon icon = state.value ? mEnable : mDisable;
icon.setAllowAnimation(arg instanceof UserBoolean && ((UserBoolean) arg).userInitiated);