Loading core/java/com/android/internal/statusbar/IStatusBar.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -395,4 +395,7 @@ oneway interface IStatusBar * @param displayId the id of the current display. */ void moveFocusedTaskToDesktop(int displayId); /** Set whether the display should have a navigation bar. */ void setHasNavigationBar(int displayId, boolean hasNavigationBar); } packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarControllerImpl.java +8 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.systemui.navigationbar; import static com.android.systemui.navigationbar.gestural.EdgeBackGestureHandler.DEBUG_MISSING_GESTURE_TAG; import static com.android.systemui.shared.recents.utilities.Utilities.isLargeScreen; import static com.android.server.display.feature.flags.Flags.enableDisplayContentModeManagement; import static com.android.wm.shell.Flags.enableTaskbarNavbarUnification; import static com.android.wm.shell.Flags.enableTaskbarOnPhones; Loading Loading @@ -309,6 +310,13 @@ public class NavigationBarControllerImpl implements navBarView.showPinningEscapeToast(); } } @Override public void setHasNavigationBar(int displayId, boolean hasNavigationBar) { if (enableDisplayContentModeManagement()) { mHasNavBar.put(displayId, hasNavigationBar); } } }; /** Loading packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java +21 −0 Original line number Diff line number Diff line Loading @@ -184,6 +184,7 @@ public class CommandQueue extends IStatusBar.Stub implements private static final int MSG_SET_SPLITSCREEN_FOCUS = 81 << MSG_SHIFT; private static final int MSG_TOGGLE_QUICK_SETTINGS_PANEL = 82 << MSG_SHIFT; private static final int MSG_WALLET_ACTION_LAUNCH_GESTURE = 83 << MSG_SHIFT; private static final int MSG_SET_HAS_NAVIGATION_BAR = 84 << MSG_SHIFT; public static final int FLAG_EXCLUDE_NONE = 0; public static final int FLAG_EXCLUDE_SEARCH_PANEL = 1 << 0; public static final int FLAG_EXCLUDE_RECENTS_PANEL = 1 << 1; Loading Loading @@ -580,6 +581,12 @@ public class CommandQueue extends IStatusBar.Stub implements * @see IStatusBar#moveFocusedTaskToDesktop(int) */ default void moveFocusedTaskToDesktop(int displayId) {} /** * @see IStatusBar#setHasNavigationBar(int, boolean) */ default void setHasNavigationBar(int displayId, boolean hasNavigationBar) { } } @VisibleForTesting Loading Loading @@ -1510,6 +1517,15 @@ public class CommandQueue extends IStatusBar.Stub implements mHandler.obtainMessage(MSG_ENTER_DESKTOP, args).sendToTarget(); } @Override public void setHasNavigationBar(int displayId, boolean hasNavigationBar) { synchronized (mLock) { mHandler.obtainMessage(MSG_SET_HAS_NAVIGATION_BAR, displayId, hasNavigationBar ? 1 : 0).sendToTarget(); } } private final class H extends Handler { private H(Looper l) { super(l); Loading Loading @@ -2036,6 +2052,11 @@ public class CommandQueue extends IStatusBar.Stub implements } break; } case MSG_SET_HAS_NAVIGATION_BAR: for (int i = 0; i < mCallbacks.size(); i++) { mCallbacks.get(i).setHasNavigationBar(msg.arg1, msg.arg2 != 0); } break; } } } Loading services/core/java/com/android/server/statusbar/StatusBarManagerInternal.java +7 −1 Original line number Diff line number Diff line Loading @@ -275,7 +275,13 @@ public interface StatusBarManagerInternal { */ void moveFocusedTaskToDesktop(int displayId); /** Passes through the given shell commands to SystemUI */ void passThroughShellCommand(String[] args, FileDescriptor fd); /** * Set whether the display should have a navigation bar. * * TODO(b/390591772): Refactor this method */ void setHasNavigationBar(int displayId, boolean hasNavigationBar); } services/core/java/com/android/server/statusbar/StatusBarManagerService.java +17 −0 Original line number Diff line number Diff line Loading @@ -996,6 +996,23 @@ public class StatusBarManagerService extends IStatusBarService.Stub implements D public void passThroughShellCommand(String[] args, FileDescriptor fd) { StatusBarManagerService.this.passThroughShellCommand(args, fd); } @Override public void setHasNavigationBar(int displayId, boolean hasNavigationBar) { if (isVisibleBackgroundUserOnDisplay(displayId)) { if (SPEW) { Slog.d(TAG, "Skipping setHasNavigationBar for visible background user " + mUserManagerInternal.getUserAssignedToDisplay(displayId)); } return; } IStatusBar bar = mBar; if (bar != null) { try { bar.setHasNavigationBar(displayId, hasNavigationBar); } catch (RemoteException ex) {} } } }; private final GlobalActionsProvider mGlobalActionsProvider = new GlobalActionsProvider() { Loading Loading
core/java/com/android/internal/statusbar/IStatusBar.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -395,4 +395,7 @@ oneway interface IStatusBar * @param displayId the id of the current display. */ void moveFocusedTaskToDesktop(int displayId); /** Set whether the display should have a navigation bar. */ void setHasNavigationBar(int displayId, boolean hasNavigationBar); }
packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarControllerImpl.java +8 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.systemui.navigationbar; import static com.android.systemui.navigationbar.gestural.EdgeBackGestureHandler.DEBUG_MISSING_GESTURE_TAG; import static com.android.systemui.shared.recents.utilities.Utilities.isLargeScreen; import static com.android.server.display.feature.flags.Flags.enableDisplayContentModeManagement; import static com.android.wm.shell.Flags.enableTaskbarNavbarUnification; import static com.android.wm.shell.Flags.enableTaskbarOnPhones; Loading Loading @@ -309,6 +310,13 @@ public class NavigationBarControllerImpl implements navBarView.showPinningEscapeToast(); } } @Override public void setHasNavigationBar(int displayId, boolean hasNavigationBar) { if (enableDisplayContentModeManagement()) { mHasNavBar.put(displayId, hasNavigationBar); } } }; /** Loading
packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java +21 −0 Original line number Diff line number Diff line Loading @@ -184,6 +184,7 @@ public class CommandQueue extends IStatusBar.Stub implements private static final int MSG_SET_SPLITSCREEN_FOCUS = 81 << MSG_SHIFT; private static final int MSG_TOGGLE_QUICK_SETTINGS_PANEL = 82 << MSG_SHIFT; private static final int MSG_WALLET_ACTION_LAUNCH_GESTURE = 83 << MSG_SHIFT; private static final int MSG_SET_HAS_NAVIGATION_BAR = 84 << MSG_SHIFT; public static final int FLAG_EXCLUDE_NONE = 0; public static final int FLAG_EXCLUDE_SEARCH_PANEL = 1 << 0; public static final int FLAG_EXCLUDE_RECENTS_PANEL = 1 << 1; Loading Loading @@ -580,6 +581,12 @@ public class CommandQueue extends IStatusBar.Stub implements * @see IStatusBar#moveFocusedTaskToDesktop(int) */ default void moveFocusedTaskToDesktop(int displayId) {} /** * @see IStatusBar#setHasNavigationBar(int, boolean) */ default void setHasNavigationBar(int displayId, boolean hasNavigationBar) { } } @VisibleForTesting Loading Loading @@ -1510,6 +1517,15 @@ public class CommandQueue extends IStatusBar.Stub implements mHandler.obtainMessage(MSG_ENTER_DESKTOP, args).sendToTarget(); } @Override public void setHasNavigationBar(int displayId, boolean hasNavigationBar) { synchronized (mLock) { mHandler.obtainMessage(MSG_SET_HAS_NAVIGATION_BAR, displayId, hasNavigationBar ? 1 : 0).sendToTarget(); } } private final class H extends Handler { private H(Looper l) { super(l); Loading Loading @@ -2036,6 +2052,11 @@ public class CommandQueue extends IStatusBar.Stub implements } break; } case MSG_SET_HAS_NAVIGATION_BAR: for (int i = 0; i < mCallbacks.size(); i++) { mCallbacks.get(i).setHasNavigationBar(msg.arg1, msg.arg2 != 0); } break; } } } Loading
services/core/java/com/android/server/statusbar/StatusBarManagerInternal.java +7 −1 Original line number Diff line number Diff line Loading @@ -275,7 +275,13 @@ public interface StatusBarManagerInternal { */ void moveFocusedTaskToDesktop(int displayId); /** Passes through the given shell commands to SystemUI */ void passThroughShellCommand(String[] args, FileDescriptor fd); /** * Set whether the display should have a navigation bar. * * TODO(b/390591772): Refactor this method */ void setHasNavigationBar(int displayId, boolean hasNavigationBar); }
services/core/java/com/android/server/statusbar/StatusBarManagerService.java +17 −0 Original line number Diff line number Diff line Loading @@ -996,6 +996,23 @@ public class StatusBarManagerService extends IStatusBarService.Stub implements D public void passThroughShellCommand(String[] args, FileDescriptor fd) { StatusBarManagerService.this.passThroughShellCommand(args, fd); } @Override public void setHasNavigationBar(int displayId, boolean hasNavigationBar) { if (isVisibleBackgroundUserOnDisplay(displayId)) { if (SPEW) { Slog.d(TAG, "Skipping setHasNavigationBar for visible background user " + mUserManagerInternal.getUserAssignedToDisplay(displayId)); } return; } IStatusBar bar = mBar; if (bar != null) { try { bar.setHasNavigationBar(displayId, hasNavigationBar); } catch (RemoteException ex) {} } } }; private final GlobalActionsProvider mGlobalActionsProvider = new GlobalActionsProvider() { Loading