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

Commit c90584d7 authored by Justin Weir's avatar Justin Weir Committed by Automerger Merge Worker
Browse files

Remove calls to CentralSurfacesImpl.getNotificationShadeWindowView am: d3ac130d

parents bfd1e624 d3ac130d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ import com.android.systemui.plugins.ActivityStarter.OnDismissAction
import com.android.systemui.settings.UserTracker
import com.android.systemui.shade.ShadeController
import com.android.systemui.statusbar.NotificationLockscreenUserManager
import com.android.systemui.statusbar.NotificationShadeWindowController
import com.android.systemui.statusbar.SysuiStatusBarStateController
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
import com.android.systemui.statusbar.policy.DeviceProvisionedController
@@ -68,6 +69,7 @@ constructor(
    private val keyguardViewMediatorLazy: Lazy<KeyguardViewMediator>,
    private val shadeControllerLazy: Lazy<ShadeController>,
    private val statusBarKeyguardViewManagerLazy: Lazy<StatusBarKeyguardViewManager>,
    private val notifShadeWindowControllerLazy: Lazy<NotificationShadeWindowController>,
    private val activityLaunchAnimator: ActivityLaunchAnimator,
    private val context: Context,
    private val lockScreenUserManager: NotificationLockscreenUserManager,
@@ -866,6 +868,7 @@ constructor(
                    return StatusBarLaunchAnimatorController(
                        animationController,
                        it,
                        notifShadeWindowControllerLazy.get(),
                        isLaunchForActivity
                    )
                }
+3 −1
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ package com.android.systemui.statusbar.phone
import android.view.View
import com.android.systemui.animation.ActivityLaunchAnimator
import com.android.systemui.animation.LaunchAnimator
import com.android.systemui.statusbar.NotificationShadeWindowController

/**
 * A [ActivityLaunchAnimator.Controller] that takes care of collapsing the status bar at the right
@@ -11,12 +12,13 @@ import com.android.systemui.animation.LaunchAnimator
class StatusBarLaunchAnimatorController(
    private val delegate: ActivityLaunchAnimator.Controller,
    private val centralSurfaces: CentralSurfaces,
    private val notificationShadeWindowController: NotificationShadeWindowController,
    private val isLaunchForActivity: Boolean = true
) : ActivityLaunchAnimator.Controller by delegate {
    // Always sync the opening window with the shade, given that we draw a hole punch in the shade
    // of the same size and position as the opening app to make it visible.
    override val openingWindowSyncView: View?
        get() = centralSurfaces.notificationShadeWindowView
        get() = notificationShadeWindowController.windowRootView

    override fun onIntentStarted(willAnimate: Boolean) {
        delegate.onIntentStarted(willAnimate)
+12 −3
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ import com.android.systemui.statusbar.NotificationClickNotifier;
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.NotificationPresenter;
import com.android.systemui.statusbar.NotificationRemoteInputManager;
import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.notification.NotificationActivityStarter;
import com.android.systemui.statusbar.notification.NotificationLaunchAnimatorControllerProvider;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
@@ -122,6 +123,7 @@ class StatusBarNotificationActivityStarter implements NotificationActivityStarte
    private final CentralSurfaces mCentralSurfaces;
    private final NotificationPresenter mPresenter;
    private final ShadeViewController mNotificationPanel;
    private final NotificationShadeWindowController mNotificationShadeWindowController;
    private final ActivityLaunchAnimator mActivityLaunchAnimator;
    private final NotificationLaunchAnimatorControllerProvider mNotificationAnimationProvider;
    private final UserTracker mUserTracker;
@@ -157,6 +159,7 @@ class StatusBarNotificationActivityStarter implements NotificationActivityStarte
            CentralSurfaces centralSurfaces,
            NotificationPresenter presenter,
            ShadeViewController panel,
            NotificationShadeWindowController notificationShadeWindowController,
            ActivityLaunchAnimator activityLaunchAnimator,
            NotificationLaunchAnimatorControllerProvider notificationAnimationProvider,
            LaunchFullScreenIntentProvider launchFullScreenIntentProvider,
@@ -182,6 +185,7 @@ class StatusBarNotificationActivityStarter implements NotificationActivityStarte
        mLockPatternUtils = lockPatternUtils;
        mStatusBarRemoteInputCallback = remoteInputCallback;
        mActivityIntentHelper = activityIntentHelper;
        mNotificationShadeWindowController = notificationShadeWindowController;
        mFeatureFlags = featureFlags;
        mMetricsLogger = metricsLogger;
        mLogger = logger;
@@ -437,6 +441,7 @@ class StatusBarNotificationActivityStarter implements NotificationActivityStarte
                    new StatusBarLaunchAnimatorController(
                            mNotificationAnimationProvider.getAnimatorController(row, null),
                            mCentralSurfaces,
                            mNotificationShadeWindowController,
                            isActivityIntent);
            mActivityLaunchAnimator.startPendingIntentWithAnimation(
                    animationController,
@@ -475,7 +480,9 @@ class StatusBarNotificationActivityStarter implements NotificationActivityStarte
                    ActivityLaunchAnimator.Controller animationController =
                            new StatusBarLaunchAnimatorController(
                                    mNotificationAnimationProvider.getAnimatorController(row),
                                    mCentralSurfaces, true /* isActivityIntent */);
                                    mCentralSurfaces,
                                    mNotificationShadeWindowController,
                                    true /* isActivityIntent */);

                    mActivityLaunchAnimator.startIntentWithAnimation(
                            animationController, animate, intent.getPackage(),
@@ -520,8 +527,10 @@ class StatusBarNotificationActivityStarter implements NotificationActivityStarte
                            );
                    ActivityLaunchAnimator.Controller animationController =
                            viewController == null ? null
                                : new StatusBarLaunchAnimatorController(viewController,
                                : new StatusBarLaunchAnimatorController(
                                        viewController,
                                        mCentralSurfaces,
                                        mNotificationShadeWindowController,
                                        true /* isActivityIntent */);

                    mActivityLaunchAnimator.startIntentWithAnimation(animationController, animate,
+3 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import com.android.systemui.plugins.ActivityStarter.OnDismissAction
import com.android.systemui.settings.UserTracker
import com.android.systemui.shade.ShadeController
import com.android.systemui.statusbar.NotificationLockscreenUserManager
import com.android.systemui.statusbar.NotificationShadeWindowController
import com.android.systemui.statusbar.SysuiStatusBarStateController
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
import com.android.systemui.statusbar.policy.DeviceProvisionedController
@@ -68,6 +69,7 @@ class ActivityStarterImplTest : SysuiTestCase() {
    @Mock private lateinit var activityLaunchAnimator: ActivityLaunchAnimator
    @Mock private lateinit var lockScreenUserManager: NotificationLockscreenUserManager
    @Mock private lateinit var statusBarWindowController: StatusBarWindowController
    @Mock private lateinit var notifShadeWindowController: NotificationShadeWindowController
    @Mock private lateinit var wakefulnessLifecycle: WakefulnessLifecycle
    @Mock private lateinit var keyguardStateController: KeyguardStateController
    @Mock private lateinit var statusBarStateController: SysuiStatusBarStateController
@@ -90,6 +92,7 @@ class ActivityStarterImplTest : SysuiTestCase() {
                Lazy { keyguardViewMediator },
                Lazy { shadeController },
                Lazy { statusBarKeyguardViewManager },
                Lazy { notifShadeWindowController },
                activityLaunchAnimator,
                context,
                lockScreenUserManager,
+2 −0
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@ import com.android.systemui.statusbar.NotificationClickNotifier;
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.NotificationPresenter;
import com.android.systemui.statusbar.NotificationRemoteInputManager;
import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.notification.NotificationLaunchAnimatorControllerProvider;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
@@ -233,6 +234,7 @@ public class StatusBarNotificationActivityStarterTest extends SysuiTestCase {
                        mCentralSurfaces,
                        mock(NotificationPresenter.class),
                        mock(ShadeViewController.class),
                        mock(NotificationShadeWindowController.class),
                        mActivityLaunchAnimator,
                        notificationAnimationProvider,
                        mock(LaunchFullScreenIntentProvider.class),