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

Commit a963c7a6 authored by Ahmed Mehfooz's avatar Ahmed Mehfooz Committed by Android (Google) Code Review
Browse files

Merge "Rename StatusBarTouchableRegionManager" into main

parents b8c16574 35bbd3b2
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -178,7 +178,7 @@ import com.android.systemui.statusbar.phone.LockscreenGestureLogger;
import com.android.systemui.statusbar.phone.ScreenOffAnimationController;
import com.android.systemui.statusbar.phone.ScrimController;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
import com.android.systemui.statusbar.phone.StatusBarTouchableRegionManager;
import com.android.systemui.statusbar.phone.ShadeTouchableRegionManager;
import com.android.systemui.statusbar.phone.TapAgainViewController;
import com.android.systemui.statusbar.phone.UnlockedScreenOffAnimationController;
import com.android.systemui.statusbar.policy.CastController;
@@ -245,7 +245,7 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase {
    @Mock protected NotificationPanelView mView;
    @Mock protected LayoutInflater mLayoutInflater;
    @Mock protected DynamicPrivacyController mDynamicPrivacyController;
    @Mock protected StatusBarTouchableRegionManager mStatusBarTouchableRegionManager;
    @Mock protected ShadeTouchableRegionManager mShadeTouchableRegionManager;
    @Mock protected KeyguardStateController mKeyguardStateController;
    @Mock protected DozeLog mDozeLog;
    private final ShadeLogger mShadeLog = new ShadeLogger(logcatLogBuffer());
@@ -703,7 +703,7 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase {
                mMetricsLogger,
                mShadeLog,
                mConfigurationController,
                () -> flingAnimationUtilsBuilder, mStatusBarTouchableRegionManager,
                () -> flingAnimationUtilsBuilder, mShadeTouchableRegionManager,
                mConversationNotificationManager, mMediaHierarchyManager,
                mStatusBarKeyguardViewManager,
                mGutsManager,
@@ -819,7 +819,7 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase {
                mLockscreenShadeTransitionController,
                mNotificationShadeDepthController,
                mShadeHeaderController,
                mStatusBarTouchableRegionManager,
                mShadeTouchableRegionManager,
                () -> mStatusBarLongPressGestureDetector,
                mKeyguardStateController,
                mKeyguardBypassController,
+3 −3
Original line number Diff line number Diff line
@@ -71,8 +71,8 @@ import com.android.systemui.statusbar.phone.KeyguardStatusBarView;
import com.android.systemui.statusbar.phone.LightBarController;
import com.android.systemui.statusbar.phone.LockscreenGestureLogger;
import com.android.systemui.statusbar.phone.ScrimController;
import com.android.systemui.statusbar.phone.ShadeTouchableRegionManager;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
import com.android.systemui.statusbar.phone.StatusBarTouchableRegionManager;
import com.android.systemui.statusbar.policy.CastController;
import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController;
@@ -125,7 +125,7 @@ public class QuickSettingsControllerImplBaseTest extends SysuiTestCase {
    @Mock protected LockscreenShadeTransitionController mLockscreenShadeTransitionController;
    @Mock protected NotificationShadeDepthController mNotificationShadeDepthController;
    @Mock protected ShadeHeaderController mShadeHeaderController;
    @Mock protected StatusBarTouchableRegionManager mStatusBarTouchableRegionManager;
    @Mock protected ShadeTouchableRegionManager mShadeTouchableRegionManager;
    @Mock protected StatusBarLongPressGestureDetector mStatusBarLongPressGestureDetector;
    @Mock protected DozeParameters mDozeParameters;
    @Mock protected KeyguardStateController mKeyguardStateController;
@@ -250,7 +250,7 @@ public class QuickSettingsControllerImplBaseTest extends SysuiTestCase {
                mLockscreenShadeTransitionController,
                mNotificationShadeDepthController,
                mShadeHeaderController,
                mStatusBarTouchableRegionManager,
                mShadeTouchableRegionManager,
                () -> mStatusBarLongPressGestureDetector,
                mKeyguardStateController,
                mKeyguardBypassController,
+2 −2
Original line number Diff line number Diff line
@@ -41,12 +41,12 @@ import org.junit.runner.RunWith
@SmallTest
@RunWith(AndroidJUnit4::class)
@OptIn(ExperimentalCoroutinesApi::class)
class StatusBarTouchableRegionManagerTest : SysuiTestCase() {
class ShadeTouchableRegionManagerTest : SysuiTestCase() {
    private val kosmos = testKosmos()
    private val testScope = kosmos.testScope
    private val sceneRepository = kosmos.sceneContainerRepository

    private val underTest by Lazy { kosmos.statusBarTouchableRegionManager }
    private val underTest by Lazy { kosmos.shadeTouchableRegionManager }

    @Test
    @EnableSceneContainer
+5 −5
Original line number Diff line number Diff line
@@ -219,8 +219,8 @@ import com.android.systemui.statusbar.phone.LockscreenGestureLogger;
import com.android.systemui.statusbar.phone.LockscreenGestureLogger.LockscreenUiEvent;
import com.android.systemui.statusbar.phone.ScreenOffAnimationController;
import com.android.systemui.statusbar.phone.ScrimController;
import com.android.systemui.statusbar.phone.ShadeTouchableRegionManager;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
import com.android.systemui.statusbar.phone.StatusBarTouchableRegionManager;
import com.android.systemui.statusbar.phone.TapAgainViewController;
import com.android.systemui.statusbar.phone.UnlockedScreenOffAnimationController;
import com.android.systemui.statusbar.policy.ConfigurationController;
@@ -298,7 +298,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
     * The minimum scale to "squish" the Shade and associated elements down to, for Back gesture
     */
    public static final float SHADE_BACK_ANIM_MIN_SCALE = 0.9f;
    private final StatusBarTouchableRegionManager mStatusBarTouchableRegionManager;
    private final ShadeTouchableRegionManager mShadeTouchableRegionManager;
    private final Resources mResources;
    private final KeyguardStateController mKeyguardStateController;
    private final SysuiStatusBarStateController mStatusBarStateController;
@@ -695,7 +695,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
            ShadeLogger shadeLogger,
            @ShadeDisplayAware ConfigurationController configurationController,
            Provider<FlingAnimationUtils.Builder> flingAnimationUtilsBuilder,
            StatusBarTouchableRegionManager statusBarTouchableRegionManager,
            ShadeTouchableRegionManager shadeTouchableRegionManager,
            ConversationNotificationManager conversationNotificationManager,
            MediaHierarchyManager mediaHierarchyManager,
            StatusBarKeyguardViewManager statusBarKeyguardViewManager,
@@ -840,7 +840,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
        mVibratorHelper = vibratorHelper;
        mMSDLPlayer = msdlPlayer;
        mVibrateOnOpening = mResources.getBoolean(R.bool.config_vibrateOnIconAnimation);
        mStatusBarTouchableRegionManager = statusBarTouchableRegionManager;
        mShadeTouchableRegionManager = shadeTouchableRegionManager;
        mSystemClock = systemClock;
        mKeyguardMediaController = keyguardMediaController;
        mMetricsLogger = metricsLogger;
@@ -1551,7 +1551,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump

    private Rect calculateGestureExclusionRect() {
        Rect exclusionRect = null;
        Region touchableRegion = mStatusBarTouchableRegionManager.calculateTouchableRegion();
        Region touchableRegion = mShadeTouchableRegionManager.calculateTouchableRegion();
        if (isFullyCollapsed() && touchableRegion != null) {
            // Note: The manager also calculates the non-pinned touchable region
            exclusionRect = touchableRegion.getBounds();
+5 −5
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ import com.android.systemui.statusbar.phone.LightBarController;
import com.android.systemui.statusbar.phone.LockscreenGestureLogger;
import com.android.systemui.statusbar.phone.ScrimController;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
import com.android.systemui.statusbar.phone.StatusBarTouchableRegionManager;
import com.android.systemui.statusbar.phone.ShadeTouchableRegionManager;
import com.android.systemui.statusbar.policy.CastController;
import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.systemui.statusbar.policy.SplitShadeStateController;
@@ -141,7 +141,7 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum
    private final LockscreenShadeTransitionController mLockscreenShadeTransitionController;
    private final NotificationShadeDepthController mDepthController;
    private final ShadeHeaderController mShadeHeaderController;
    private final StatusBarTouchableRegionManager mStatusBarTouchableRegionManager;
    private final ShadeTouchableRegionManager mShadeTouchableRegionManager;
    private final Provider<StatusBarLongPressGestureDetector> mStatusBarLongPressGestureDetector;
    private final KeyguardStateController mKeyguardStateController;
    private final KeyguardBypassController mKeyguardBypassController;
@@ -317,7 +317,7 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum
            LockscreenShadeTransitionController lockscreenShadeTransitionController,
            NotificationShadeDepthController notificationShadeDepthController,
            ShadeHeaderController shadeHeaderController,
            StatusBarTouchableRegionManager statusBarTouchableRegionManager,
            ShadeTouchableRegionManager shadeTouchableRegionManager,
            Provider<StatusBarLongPressGestureDetector> statusBarLongPressGestureDetector,
            KeyguardStateController keyguardStateController,
            KeyguardBypassController keyguardBypassController,
@@ -366,7 +366,7 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum
        mLockscreenShadeTransitionController = lockscreenShadeTransitionController;
        mDepthController = notificationShadeDepthController;
        mShadeHeaderController = shadeHeaderController;
        mStatusBarTouchableRegionManager = statusBarTouchableRegionManager;
        mShadeTouchableRegionManager = shadeTouchableRegionManager;
        mStatusBarLongPressGestureDetector = statusBarLongPressGestureDetector;
        mKeyguardStateController = keyguardStateController;
        mKeyguardBypassController = keyguardBypassController;
@@ -695,7 +695,7 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum
                /* right= */ (int) mQsFrame.getX() + mQsFrame.getWidth(),
                /* bottom= */ headerBottom + frameTop);
        // Also allow QS to intercept if the touch is near the notch.
        mStatusBarTouchableRegionManager.updateRegionForNotch(mInterceptRegion);
        mShadeTouchableRegionManager.updateRegionForNotch(mInterceptRegion);
        final boolean onHeader = mInterceptRegion.contains((int) x, (int) y);

        if (getExpanded()) {
Loading