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

Commit 6ea92703 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Send Launcher a signal for whether WMS disabled Taskbar" into main

parents 3070277b 4cceb9a6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ import android.os.IRemoteCallback;
import android.view.MotionEvent;
import com.android.systemui.shared.recents.ISystemUiProxy;

// Next ID: 39
// Next ID: 40
oneway interface ILauncherProxy {

    void onActiveNavBarRegionChanges(in Region activeRegion) = 11;
+5 −0
Original line number Diff line number Diff line
@@ -137,6 +137,8 @@ public class QuickStepContract {
    // This only takes effect while the IME is visible. By default, it is set while the IME is
    // visible, but may be overridden by the backDispositionMode set by the IME.
    public static final long SYSUI_STATE_BACK_DISMISS_IME = 1L << 36;
    // Whether WindowManagerService/DisplayPolicy returns false for hasNavigationBar().
    public static final long SYSUI_STATE_NAVIGATION_BAR_DISABLED = 1L << 37;

    // Mask for SystemUiStateFlags to isolate SYSUI_STATE_AWAKE and
    // SYSUI_STATE_WAKEFULNESS_TRANSITION, to match WAKEFULNESS_* constants
@@ -302,6 +304,9 @@ public class QuickStepContract {
        if ((flags & SYSUI_STATE_BACK_DISMISS_IME) != 0) {
            str.add("back_dismiss_ime");
        }
        if ((flags & SYSUI_STATE_NAVIGATION_BAR_DISABLED) != 0) {
            str.add("hasNavigationBar=false");
        }

        return str.toString();
    }
+5 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_C
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_DEVICE_DOZING;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_DEVICE_DREAMING;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_FREEFORM_ACTIVE_IN_DESKTOP_MODE;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NAVIGATION_BAR_DISABLED;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_STATUS_BAR_KEYGUARD_GOING_AWAY;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING_OCCLUDED;
@@ -925,6 +926,10 @@ public class LauncherProxyService implements CallbackController<LauncherProxyLis
        if (navBarView != null) {
            navBarView.updateDisabledSystemUiStateFlags(displaySysuiState);
        }

        displaySysuiState.setFlag(SYSUI_STATE_NAVIGATION_BAR_DISABLED,
                !mNavBarControllerLazy.get().canCreateNavBarOrTaskBar(displayId))
                .commitUpdate();
    }

    /** Force updates SystemUI state flags prior to sending them to Launcher. */
+4 −1
Original line number Diff line number Diff line
@@ -19,9 +19,9 @@ package com.android.systemui.navigationbar;
import androidx.annotation.Nullable;

import com.android.internal.statusbar.RegisterStatusBarResult;
import com.android.systemui.shared.statusbar.phone.BarTransitions;
import com.android.systemui.navigationbar.views.NavigationBar;
import com.android.systemui.navigationbar.views.NavigationBarView;
import com.android.systemui.shared.statusbar.phone.BarTransitions;

/** A controller to handle navigation bars. */
public interface NavigationBarController {
@@ -76,4 +76,7 @@ public interface NavigationBarController {
    /** @return {@link NavigationBar} for a specific display, or null if not available. */
    @Nullable
    NavigationBar getNavigationBar(int displayId);

    /** Returns whether Navbar (or Taskbar) is allowed to be created on the given display. */
    boolean canCreateNavBarOrTaskBar(int displayId);
}
+2 −0
Original line number Diff line number Diff line
@@ -56,4 +56,6 @@ class NavigationBarControllerEmptyImpl @Inject constructor() : NavigationBarCont
    override fun getDefaultNavigationBar(): NavigationBar? = null

    override fun getNavigationBar(displayId: Int): NavigationBar? = null

    override fun canCreateNavBarOrTaskBar(displayId: Int): Boolean = false
}
Loading