summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI
diff options
context:
space:
mode:
authorAdrian Roos <roosa@google.com>2015-05-12 13:33:25 -0700
committerAdrian Roos <roosa@google.com>2015-05-12 14:12:40 -0700
commit389beec68d09883112ee5ef88f0b2fa2aa369824 (patch)
tree046a5dcc6d9448bf7030e8fd4e1fe755eb4769df /packages/SystemUI
parent389d5ac6ac974f171c12eb608eb8a3e2cad120f8 (diff)
downloadframeworks_base-389beec68d09883112ee5ef88f0b2fa2aa369824.zip
frameworks_base-389beec68d09883112ee5ef88f0b2fa2aa369824.tar.gz
frameworks_base-389beec68d09883112ee5ef88f0b2fa2aa369824.tar.bz2
Only dispatch systemUiVisibility when it actually changes
Bug: 19000727 Change-Id: I9302746281188186d18256d45fee681bd2ab50d5
Diffstat (limited to 'packages/SystemUI')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 8ccd222..df0a959 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -312,6 +312,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
// tracking calls to View.setSystemUiVisibility()
int mSystemUiVisibility = View.SYSTEM_UI_FLAG_VISIBLE;
+ // last value sent to window manager
+ private int mLastDispatchedSystemUiVisibility = ~View.SYSTEM_UI_FLAG_VISIBLE;
+
DisplayMetrics mDisplayMetrics = new DisplayMetrics();
// XXX: gesture research
@@ -2481,7 +2484,10 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
private void notifyUiVisibilityChanged(int vis) {
try {
- mWindowManagerService.statusBarVisibilityChanged(vis);
+ if (mLastDispatchedSystemUiVisibility != vis) {
+ mWindowManagerService.statusBarVisibilityChanged(vis);
+ mLastDispatchedSystemUiVisibility = vis;
+ }
} catch (RemoteException ex) {
}
}