OSDN Git Service

Remove redundant logic about showing navigation bar
authorTiger Huang <tigerhuang@google.com>
Mon, 4 Jun 2018 03:51:07 +0000 (11:51 +0800)
committerTiger Huang <tigerhuang@google.com>
Mon, 4 Jun 2018 03:51:07 +0000 (11:51 +0800)
PhoneWindowManager.layoutNavigationBar() has already made nav bar
show while status bar is expanded. The logic here is redundant.

Test: 1. go/wm-smoke
      2. Open a video in YouTube in fullscreen mode and then expand
         status bar, and see if navigation bar would show; collapse
 status bar, and see if navigation bar would hide

Change-Id: I5327701ce1ad755354e42b6e14643f301abb6a5b

services/core/java/com/android/server/policy/PhoneWindowManager.java

index 781faa7..9217b27 100644 (file)
@@ -5752,12 +5752,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                     mStatusBarController.updateVisibilityLw(false /*transientAllowed*/,
                             mLastSystemUiFlags, mLastSystemUiFlags);
                 }
-                final boolean isKeyguardShowing = isStatusBarKeyguard() && !mKeyguardOccluded;
-                if (statusBarExpanded && !isKeyguardShowing && mNavigationBar != null) {
-                    if (mNavigationBarController.setBarShowingLw(true)) {
-                        changes |= FINISH_LAYOUT_REDO_LAYOUT;
-                    }
-                }
             } else if (mTopFullscreenOpaqueWindowState != null) {
                 topIsFullscreen = topAppHidesStatusBar;
                 // The subtle difference between the window for mTopFullscreenOpaqueWindowState