summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2015-05-12 15:52:38 -0400
committerJohn Spurlock <jspurlock@google.com>2015-05-12 15:52:38 -0400
commitb1688f6af6c8f4d0e068958904a6430ee2f7d4f2 (patch)
tree9c95b62699b02b5fec4111be2bbf6399cf6690a1 /packages/SystemUI
parente74d5d09e1749b128437ff340b43278857139338 (diff)
downloadframeworks_base-b1688f6af6c8f4d0e068958904a6430ee2f7d4f2.zip
frameworks_base-b1688f6af6c8f4d0e068958904a6430ee2f7d4f2.tar.gz
frameworks_base-b1688f6af6c8f4d0e068958904a6430ee2f7d4f2.tar.bz2
DNDTile: Notify of value changes.
Bug: 21055789 Change-Id: If9008b13a6a5583832fc4dfaa8ec3e21b61cb25c
Diffstat (limited to 'packages/SystemUI')
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
index 5f24619..f4d6f04 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
@@ -102,7 +102,9 @@ public class DndTile extends QSTile<QSTile.BooleanState> {
@Override
protected void handleUpdateState(BooleanState state, Object arg) {
final int zen = arg instanceof Integer ? (Integer) arg : mController.getZen();
- state.value = zen != Global.ZEN_MODE_OFF;
+ final boolean newValue = zen != Global.ZEN_MODE_OFF;
+ final boolean valueChanged = state.value != newValue;
+ state.value = newValue;
state.visible = isVisible(mContext);
switch (zen) {
case Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS:
@@ -133,6 +135,9 @@ public class DndTile extends QSTile<QSTile.BooleanState> {
if (mShowingDetail && !state.value) {
showDetail(false);
}
+ if (valueChanged) {
+ fireToggleStateChanged(state.value);
+ }
}
@Override