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

Commit 18439804 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Support hasNavigationBar per display(1/2)"

parents e30fc89f ea6e7f04
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1435,7 +1435,7 @@ Landroid/view/IWindowManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/view/IWindowManager$Stub$Proxy;->getBaseDisplayDensity(I)I
Landroid/view/IWindowManager$Stub$Proxy;->getDockedStackSide()I
Landroid/view/IWindowManager$Stub$Proxy;->getInitialDisplayDensity(I)I
Landroid/view/IWindowManager$Stub$Proxy;->hasNavigationBar()Z
Landroid/view/IWindowManager$Stub$Proxy;->hasNavigationBar(I)Z
Landroid/view/IWindowManager$Stub$Proxy;->watchRotation(Landroid/view/IRotationWatcher;I)I
Landroid/view/IWindowManager$Stub;-><init>()V
Landroid/view/IWindowManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/view/IWindowManager;
@@ -1447,7 +1447,7 @@ Landroid/view/IWindowManager;->getBaseDisplaySize(ILandroid/graphics/Point;)V
Landroid/view/IWindowManager;->getDockedStackSide()I
Landroid/view/IWindowManager;->getInitialDisplayDensity(I)I
Landroid/view/IWindowManager;->getInitialDisplaySize(ILandroid/graphics/Point;)V
Landroid/view/IWindowManager;->hasNavigationBar()Z
Landroid/view/IWindowManager;->hasNavigationBar(I)Z
Landroid/view/IWindowManager;->isKeyguardLocked()Z
Landroid/view/IWindowManager;->isKeyguardSecure()Z
Landroid/view/IWindowManager;->isSafeModeEnabled()Z
+4 −2
Original line number Diff line number Diff line
@@ -294,9 +294,11 @@ interface IWindowManager
    void setNavBarVirtualKeyHapticFeedbackEnabled(boolean enabled);

    /**
     * Device has a software navigation bar (separate from the status bar).
     * Device has a software navigation bar (separate from the status bar) on specific display.
     *
     * @param displayId the id of display to check if there is a software navigation bar.
     */
    boolean hasNavigationBar();
    boolean hasNavigationBar(int displayId);

    /**
     * Get the position of the nav bar
+1 −1
Original line number Diff line number Diff line
@@ -393,7 +393,7 @@ public class ViewConfiguration {
                case HAS_PERMANENT_MENU_KEY_AUTODETECT: {
                    IWindowManager wm = WindowManagerGlobal.getWindowManagerService();
                    try {
                        sHasPermanentMenuKey = !wm.hasNavigationBar();
                        sHasPermanentMenuKey = !wm.hasNavigationBar(context.getDisplayId());
                        sHasPermanentMenuKeySet = true;
                    } catch (RemoteException ex) {
                        sHasPermanentMenuKey = false;
+5 −3
Original line number Diff line number Diff line
@@ -302,11 +302,13 @@ public class SystemServicesProxy {
    }

    /**
     * Returns whether there is a soft nav bar.
     * Returns whether there is a soft nav bar on specified display.
     *
     * @param displayId the id of display to check if there is a software navigation bar.
     */
    public boolean hasSoftNavigationBar() {
    public boolean hasSoftNavigationBar(int displayId) {
        try {
            return mIwm.hasNavigationBar();
            return mIwm.hasNavigationBar(displayId);
        } catch (RemoteException e) {
            e.printStackTrace();
        }
+5 −3
Original line number Diff line number Diff line
@@ -159,11 +159,13 @@ public class WindowManagerWrapper {
    }

    /**
     * @return whether there is a soft nav bar.
     * @param displayId the id of display to check if there is a software navigation bar.
     *
     * @return whether there is a soft nav bar on specific display.
     */
    public boolean hasSoftNavigationBar() {
    public boolean hasSoftNavigationBar(int displayId) {
        try {
            return WindowManagerGlobal.getWindowManagerService().hasNavigationBar();
            return WindowManagerGlobal.getWindowManagerService().hasNavigationBar(displayId);
        } catch (RemoteException e) {
            return false;
        }
Loading