From d5c16c6c7c09b24d7f8b55a3057d6386cfe0e5fb Mon Sep 17 00:00:00 2001 From: Daniel Sandler Date: Wed, 21 Sep 2011 01:24:50 -0400 Subject: [PATCH] Properly generate systemUiVisibilityChanged callbacks. User activity is supposed to immediately revert HIDE_NAVIGATION, but we were just showing the navigation bar directly. By routing through the service we'll generate callbacks for everyone. At long last, SYSTEM_UI_FLAG_HIDE_NAVIGATION will work like lights out (now called SYSTEM_UI_FLAG_LOW_PROFILE) which worked well enough in Honeycomb. Bug: 5052456 Change-Id: I677f1295e1208c1aec48a4a9c8a6850916688388 --- .../android/systemui/statusbar/phone/PhoneStatusBar.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 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 8fc844882334e..da6bcd21a329b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -2031,8 +2031,13 @@ public class PhoneStatusBar extends StatusBar { // The user is not allowed to get stuck without navigation UI. Upon the slightest user // interaction we bring the navigation back. public void userActivity() { - if (mNavigationBarView != null) { - mNavigationBarView.setHidden(false); + if (0 != (mSystemUiVisibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION)) { + try { + mBarService.setSystemUiVisibility( + mSystemUiVisibility & ~View.SYSTEM_UI_FLAG_HIDE_NAVIGATION); + } catch (RemoteException ex) { + // weep softly + } } }