Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45d73de7 authored by Lingyu Feng's avatar Lingyu Feng Committed by Android (Google) Code Review
Browse files

Merge "Cleanup: Remove setHasNavigationBar()" into main

parents e32eb03b 36119993
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -408,7 +408,4 @@ 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);
}
+0 −7
Original line number Diff line number Diff line
@@ -318,13 +318,6 @@ public class NavigationBarControllerImpl implements
                navBarView.showPinningEscapeToast();
            }
        }

        @Override
        public void setHasNavigationBar(int displayId, boolean hasNavigationBar) {
            if (enableDisplayContentModeManagement()) {
                mHasNavBar.put(displayId, hasNavigationBar);
            }
        }
    };

    /**
+0 −20
Original line number Diff line number Diff line
@@ -184,7 +184,6 @@ 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;
    private static final int MSG_DISPLAY_REMOVE_SYSTEM_DECORATIONS = 85 << MSG_SHIFT;
    public static final int FLAG_EXCLUDE_NONE = 0;
    public static final int FLAG_EXCLUDE_SEARCH_PANEL = 1 << 0;
@@ -588,12 +587,6 @@ 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
@@ -1532,14 +1525,6 @@ 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) {
@@ -2072,11 +2057,6 @@ 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;
            }
        }
    }
+0 −7
Original line number Diff line number Diff line
@@ -284,11 +284,4 @@ public interface StatusBarManagerInternal {

    /** 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);
}
+0 −17
Original line number Diff line number Diff line
@@ -1011,23 +1011,6 @@ 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