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

Commit df228d38 authored by Justin Weir's avatar Justin Weir Committed by Android (Google) Code Review
Browse files

Merge "Inline last call to ShadeViewController.disableHeader" into main

parents ead885d3 673c8f98
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -17,8 +17,6 @@
package com.android.systemui.shade

import com.android.systemui.assist.AssistManager
import com.android.systemui.log.LogBuffer
import com.android.systemui.shade.TouchLogger.Companion.logTouchesTo
import com.android.systemui.statusbar.CommandQueue
import com.android.systemui.statusbar.NotificationPresenter
import com.android.systemui.statusbar.NotificationShadeWindowController
@@ -29,7 +27,6 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
/** A base class for non-empty implementations of ShadeController. */
@OptIn(ExperimentalCoroutinesApi::class)
abstract class BaseShadeControllerImpl(
    private val touchLog: LogBuffer,
    protected val commandQueue: CommandQueue,
    protected val statusBarKeyguardViewManager: StatusBarKeyguardViewManager,
    protected val notificationShadeWindowController: NotificationShadeWindowController,
@@ -40,7 +37,7 @@ abstract class BaseShadeControllerImpl(
    private val postCollapseActions = ArrayList<Runnable>()

    override fun start() {
        logTouchesTo(touchLog)
        // Do nothing by default
    }

    final override fun animateExpandShade() {
+0 −11
Original line number Diff line number Diff line
@@ -337,7 +337,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
    private final ScrimController mScrimController;
    private final LockscreenShadeTransitionController mLockscreenShadeTransitionController;
    private final TapAgainViewController mTapAgainViewController;
    private final ShadeHeaderController mShadeHeaderController;
    private final boolean mVibrateOnOpening;
    private final VelocityTracker mVelocityTracker = VelocityTracker.obtain();
    private final FlingAnimationUtils mFlingAnimationUtilsClosing;
@@ -735,7 +734,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
            FragmentService fragmentService,
            IStatusBarService statusBarService,
            ContentResolver contentResolver,
            ShadeHeaderController shadeHeaderController,
            ScreenOffAnimationController screenOffAnimationController,
            LockscreenGestureLogger lockscreenGestureLogger,
            ShadeExpansionStateManager shadeExpansionStateManager,
@@ -882,7 +880,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
        mSplitShadeEnabled =
                mSplitShadeStateController.shouldUseSplitNotificationShade(mResources);
        mView.setWillNotDraw(!DEBUG_DRAWABLE);
        mShadeHeaderController = shadeHeaderController;
        mLayoutInflater = layoutInflater;
        mFeatureFlags = featureFlags;
        mAnimateBack = predictiveBackAnimateShade();
@@ -1117,9 +1114,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
        }

        mTapAgainViewController.init();
        mShadeHeaderController.init();
        mShadeHeaderController.setShadeCollapseAction(
                () -> collapse(/* delayed= */ false , /* speedUpFactor= */ 1.0f));
        mKeyguardUnfoldTransition.ifPresent(u -> u.setup(mView));
        mNotificationPanelUnfoldAnimationController.ifPresent(controller ->
                controller.setup(mNotificationContainerParent));
@@ -3597,11 +3591,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
        return mKeyHandler;
    }

    @Override
    public void disableHeader(int state1, int state2, boolean animated) {
        mShadeHeaderController.disable(state1, state2, animated);
    }

    @Override
    public boolean closeUserSwitcherIfOpen() {
        if (mKeyguardUserSwitcherController != null) {
+4 −9
Original line number Diff line number Diff line
@@ -21,15 +21,13 @@ import android.os.Looper;
import android.util.Log;
import android.view.MotionEvent;
import android.view.ViewTreeObserver;
import android.view.WindowManager;
import android.view.WindowManagerGlobal;

import com.android.systemui.DejankUtils;
import com.android.systemui.assist.AssistManager;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dagger.qualifiers.DisplayId;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.log.LogBuffer;
import com.android.systemui.log.dagger.ShadeTouchLog;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.scene.domain.interactor.WindowRootViewVisibilityInteractor;
import com.android.systemui.scene.shared.flag.SceneContainerFlag;
@@ -81,7 +79,6 @@ public final class ShadeControllerImpl extends BaseShadeControllerImpl {
    public ShadeControllerImpl(
            CommandQueue commandQueue,
            @Main Executor mainExecutor,
            @ShadeTouchLog LogBuffer touchLog,
            WindowRootViewVisibilityInteractor windowRootViewVisibilityInteractor,
            KeyguardStateController keyguardStateController,
            StatusBarStateController statusBarStateController,
@@ -89,13 +86,12 @@ public final class ShadeControllerImpl extends BaseShadeControllerImpl {
            StatusBarWindowController statusBarWindowController,
            DeviceProvisionedController deviceProvisionedController,
            NotificationShadeWindowController notificationShadeWindowController,
            WindowManager windowManager,
            @DisplayId int displayId,
            Lazy<NotificationPanelViewController> shadeViewControllerLazy,
            Lazy<AssistManager> assistManagerLazy,
            Lazy<NotificationGutsManager> gutsManager
    ) {
        super(touchLog,
                commandQueue,
        super(commandQueue,
                statusBarKeyguardViewManager,
                notificationShadeWindowController,
                assistManagerLazy);
@@ -110,7 +106,7 @@ public final class ShadeControllerImpl extends BaseShadeControllerImpl {
        mGutsManager = gutsManager;
        mNotificationShadeWindowController = notificationShadeWindowController;
        mStatusBarKeyguardViewManager = statusBarKeyguardViewManager;
        mDisplayId = windowManager.getDefaultDisplay().getDisplayId();
        mDisplayId = displayId;
        mKeyguardStateController = keyguardStateController;
        mAssistManagerLazy = assistManagerLazy;
    }
@@ -385,7 +381,6 @@ public final class ShadeControllerImpl extends BaseShadeControllerImpl {

    @Override
    public void start() {
        super.start();
        getNpvc().setTrackingStartedListener(this::runPostCollapseActions);
        getNpvc().setOpenCloseListener(
                new OpenCloseListener() {
+0 −1
Original line number Diff line number Diff line
@@ -70,7 +70,6 @@ constructor(
    assistManagerLazy: Lazy<AssistManager>,
) :
    BaseShadeControllerImpl(
        touchLog,
        commandQueue,
        statusBarKeyguardViewManager,
        notificationShadeWindowController,
+0 −7
Original line number Diff line number Diff line
@@ -36,13 +36,6 @@ interface ShadeViewController {
    /** Returns whether status bar icons should be hidden when the shade is expanded. */
    fun shouldHideStatusBarIconsWhenExpanded(): Boolean

    /**
     * Disables the shade header.
     *
     * @see ShadeHeaderController.disable
     */
    fun disableHeader(state1: Int, state2: Int, animated: Boolean)

    /** If the latency tracker is enabled, begins tracking expand latency. */
    @Deprecated("No longer supported. Do not add new calls to this.")
    fun startExpandLatencyTracking()
Loading