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

Commit 2c6b4d5f authored by Vinit Nayak's avatar Vinit Nayak Committed by Android (Google) Code Review
Browse files

Merge "Pass nav button disable and AOD events to launcher" into sc-v2-dev

parents 99ae542e c9a7b45e
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -114,6 +114,8 @@ public class QuickStepContract {
    public static final int SYSUI_STATE_MAGNIFICATION_OVERLAP = 1 << 19;
    // ImeSwitcher is showing
    public static final int SYSUI_STATE_IME_SWITCHER_SHOWING = 1 << 20;
    // Device dozing/AOD state
    public static final int SYSUI_STATE_DEVICE_DOZING = 1 << 21;

    @Retention(RetentionPolicy.SOURCE)
    @IntDef({SYSUI_STATE_SCREEN_PINNING,
@@ -136,7 +138,8 @@ public class QuickStepContract {
            SYSUI_STATE_ALLOW_GESTURE_IGNORING_BAR_VISIBILITY,
            SYSUI_STATE_IME_SHOWING,
            SYSUI_STATE_MAGNIFICATION_OVERLAP,
            SYSUI_STATE_IME_SWITCHER_SHOWING
            SYSUI_STATE_IME_SWITCHER_SHOWING,
            SYSUI_STATE_DEVICE_DOZING
    })
    public @interface SystemUiStateFlags {}

@@ -166,6 +169,7 @@ public class QuickStepContract {
        str.add((flags & SYSUI_STATE_IME_SHOWING) != 0 ? "ime_visible" : "");
        str.add((flags & SYSUI_STATE_MAGNIFICATION_OVERLAP) != 0 ? "magnification_overlap" : "");
        str.add((flags & SYSUI_STATE_IME_SWITCHER_SHOWING) != 0 ? "ime_switcher_showing" : "");
        str.add((flags & SYSUI_STATE_DEVICE_DOZING) != 0 ? "device_dozing" : "");
        return str.toString();
    }

+1 −1
Original line number Diff line number Diff line
@@ -161,7 +161,7 @@ public class SystemActions extends SystemUI {
        mNotificationShadeController = notificationShadeController;
        // Saving in instance variable since to prevent GC since
        // NotificationShadeWindowController.registerCallback() only keeps weak references.
        mNotificationShadeCallback = (keyguardShowing, keyguardOccluded, bouncerShowing) ->
        mNotificationShadeCallback = (keyguardShowing, keyguardOccluded, bouncerShowing, mDozing) ->
                registerOrUnregisterDismissNotificationShadeAction();
        mStatusBar = statusBar;
    }
+5 −2
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ import com.android.systemui.navigationbar.NavigationBarA11yHelper;
import com.android.systemui.navigationbar.NavigationBarController;
import com.android.systemui.navigationbar.NavigationBarOverlayController;
import com.android.systemui.navigationbar.NavigationModeController;
import com.android.systemui.navigationbar.TaskbarDelegate;
import com.android.systemui.plugins.PluginInitializerImpl;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.qs.ReduceBrightColorsController;
@@ -233,7 +234,8 @@ public class DependencyProvider {
            UiEventLogger uiEventLogger,
            NavigationBarOverlayController navBarOverlayController,
            ConfigurationController configurationController,
            NavigationBarA11yHelper navigationBarA11yHelper) {
            NavigationBarA11yHelper navigationBarA11yHelper,
            TaskbarDelegate taskbarDelegate) {
        return new NavigationBarController(context,
                windowManager,
                assistManagerLazy,
@@ -259,7 +261,8 @@ public class DependencyProvider {
                uiEventLogger,
                navBarOverlayController,
                configurationController,
                navigationBarA11yHelper);
                navigationBarA11yHelper,
                taskbarDelegate);
    }

    /** */
+4 −2
Original line number Diff line number Diff line
@@ -153,7 +153,8 @@ public class NavigationBarController implements Callbacks,
            UiEventLogger uiEventLogger,
            NavigationBarOverlayController navBarOverlayController,
            ConfigurationController configurationController,
            NavigationBarA11yHelper navigationBarA11yHelper) {
            NavigationBarA11yHelper navigationBarA11yHelper,
            TaskbarDelegate taskbarDelegate) {
        mContext = context;
        mWindowManager = windowManager;
        mAssistManagerLazy = assistManagerLazy;
@@ -185,7 +186,8 @@ public class NavigationBarController implements Callbacks,
        mNavBarOverlayController = navBarOverlayController;
        mNavMode = mNavigationModeController.addListener(this);
        mNavigationModeController.addListener(this);
        mTaskbarDelegate = new TaskbarDelegate(mOverviewProxyService,
        mTaskbarDelegate = taskbarDelegate;
        mTaskbarDelegate.setOverviewProxyService(overviewProxyService,
                navigationBarA11yHelper, mSysUiFlagsContainer);
        mIsTablet = isTablet(mContext.getResources().getConfiguration());
    }
+11 −4
Original line number Diff line number Diff line
@@ -33,19 +33,26 @@ import com.android.systemui.recents.OverviewProxyService;
import com.android.systemui.shared.recents.utilities.Utilities;
import com.android.systemui.statusbar.CommandQueue;

import javax.inject.Inject;
import javax.inject.Singleton;

@Singleton
public class TaskbarDelegate implements CommandQueue.Callbacks {

    private final OverviewProxyService mOverviewProxyService;
    private final NavigationBarA11yHelper mNavigationBarA11yHelper;
    private final SysUiState mSysUiState;
    private OverviewProxyService mOverviewProxyService;
    private NavigationBarA11yHelper mNavigationBarA11yHelper;
    private SysUiState mSysUiState;
    private int mDisplayId;
    private int mNavigationIconHints;
    private final NavigationBarA11yHelper.NavA11yEventListener mNavA11yEventListener =
            this::updateSysuiFlags;
    @Inject
    public TaskbarDelegate() { /* no-op */ }

    public TaskbarDelegate(OverviewProxyService overviewProxyService,
    public void setOverviewProxyService(OverviewProxyService overviewProxyService,
            NavigationBarA11yHelper navigationBarA11yHelper,
            SysUiState sysUiState) {
        // TODO: adding this in the ctor results in a dagger dependency cycle :(
        mOverviewProxyService = overviewProxyService;
        mNavigationBarA11yHelper = navigationBarA11yHelper;
        mSysUiState = sysUiState;
Loading