Skip to content

Commit d5c16c6

Browse files
committed
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
1 parent 7052406 commit d5c16c6

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2031,8 +2031,13 @@ void updateExpandedSize() {
20312031
// The user is not allowed to get stuck without navigation UI. Upon the slightest user
20322032
// interaction we bring the navigation back.
20332033
public void userActivity() {
2034-
if (mNavigationBarView != null) {
2035-
mNavigationBarView.setHidden(false);
2034+
if (0 != (mSystemUiVisibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION)) {
2035+
try {
2036+
mBarService.setSystemUiVisibility(
2037+
mSystemUiVisibility & ~View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
2038+
} catch (RemoteException ex) {
2039+
// weep softly
2040+
}
20362041
}
20372042
}
20382043

0 commit comments

Comments
 (0)