summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/qs
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2014-11-09 18:37:19 -0500
committerJohn Spurlock <jspurlock@google.com>2014-11-09 18:37:19 -0500
commit1832d2fc504b4842d38715f160aaf18adb7db489 (patch)
treeac8b8a491e20219bdc1ddd3beca4b8d69819cf72 /packages/SystemUI/src/com/android/systemui/qs
parentaed8e76172477c884ec7bef659f050d0817efb7d (diff)
downloadframeworks_base-1832d2fc504b4842d38715f160aaf18adb7db489.zip
frameworks_base-1832d2fc504b4842d38715f160aaf18adb7db489.tar.gz
frameworks_base-1832d2fc504b4842d38715f160aaf18adb7db489.tar.bz2
QS: Animated hotspot tile icon.
Bug: 17426910 Change-Id: Ic7d0219b0a5d749223c35fcbedca78d4adf585c5
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/qs')
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
index 374ceab..bccc753 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
@@ -27,6 +27,10 @@ import com.android.systemui.statusbar.policy.HotspotController;
/** Quick settings tile: Hotspot **/
public class HotspotTile extends QSTile<QSTile.BooleanState> {
+ private final AnimationIcon mEnable =
+ new AnimationIcon(R.drawable.ic_hotspot_enable_animation);
+ private final AnimationIcon mDisable =
+ new AnimationIcon(R.drawable.ic_hotspot_disable_animation);
private final HotspotController mController;
private final Callback mCallback = new Callback();
private final UsageTracker mUsageTracker;
@@ -62,6 +66,8 @@ public class HotspotTile extends QSTile<QSTile.BooleanState> {
protected void handleClick() {
final boolean isEnabled = (Boolean) mState.value;
mController.setHotspotEnabled(!isEnabled);
+ mEnable.setAllowAnimation(true);
+ mDisable.setAllowAnimation(true);
}
@Override
@@ -84,8 +90,7 @@ public class HotspotTile extends QSTile<QSTile.BooleanState> {
state.label = mContext.getString(R.string.quick_settings_hotspot_label);
state.value = mController.isHotspotEnabled();
- state.icon = ResourceIcon.get(state.visible && state.value ? R.drawable.ic_qs_hotspot_on
- : R.drawable.ic_qs_hotspot_off);
+ state.icon = state.visible && state.value ? mEnable : mDisable;
}
@Override