Loading packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java +1 −1 Original line number Diff line number Diff line Loading @@ -823,7 +823,7 @@ public class AuthController implements CoreStartable, CommandQueue.Callbacks, final Rect overlayBounds = new Rect( 0, /* left */ mCachedDisplayInfo.getNaturalHeight() / 2, /* top */ 0, /* top */ mCachedDisplayInfo.getNaturalWidth(), /* right */ mCachedDisplayInfo.getNaturalHeight() /* botom */); Loading packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java +0 −1 Original line number Diff line number Diff line Loading @@ -607,7 +607,6 @@ public class UdfpsController implements DozeReceiver, Dumpable { case UNCHANGED: if (!isWithinSensorArea(mOverlay.getOverlayView(), event.getRawX(), event.getRawY(), true) && mActivePointerId == MotionEvent.INVALID_POINTER_ID && event.getActionMasked() == MotionEvent.ACTION_DOWN && mAlternateBouncerInteractor.isVisibleState()) { // No pointer on sensor, forward to keyguard if alternateBouncer is visible mKeyguardViewManager.onTouch(event); Loading packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/UdfpsOverlayInteractor.kt +4 −4 Original line number Diff line number Diff line Loading @@ -37,12 +37,12 @@ class UdfpsOverlayInteractor @Inject constructor(private val authController: AuthController, @Application scope: CoroutineScope) { /** Whether a touch should be intercepted or allowed to pass to the UdfpsOverlay */ fun canInterceptTouchInUdfpsBounds(ev: MotionEvent): Boolean { /** Whether a touch is within the under-display fingerprint sensor area */ fun isTouchWithinUdfpsArea(ev: MotionEvent): Boolean { val isUdfpsEnrolled = authController.isUdfpsEnrolled(KeyguardUpdateMonitor.getCurrentUser()) val isWithinUdfpsOverlayBounds = val isWithinOverlayBounds = udfpsOverlayParams.value.overlayBounds.contains(ev.rawX.toInt(), ev.rawY.toInt()) return !isUdfpsEnrolled || !isWithinUdfpsOverlayBounds return isUdfpsEnrolled && isWithinOverlayBounds } /** Returns the current udfpsOverlayParams */ Loading packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/AlternateBouncerInteractor.kt +2 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ constructor( var legacyAlternateBouncer: LegacyAlternateBouncer? = null var legacyAlternateBouncerVisibleTime: Long = NOT_VISIBLE var receivedDownTouch = false val isVisible: Flow<Boolean> = bouncerRepository.alternateBouncerVisible /** Loading Loading @@ -79,6 +80,7 @@ constructor( * @return true if the alternate bouncer was newly hidden, else false. */ fun hide(): Boolean { receivedDownTouch = false return if (isModernAlternateBouncerEnabled) { val wasAlternateBouncerVisible = isVisibleState() bouncerRepository.setAlternateVisible(false) Loading packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java +9 −15 Original line number Diff line number Diff line Loading @@ -37,14 +37,12 @@ import com.android.keyguard.AuthKeyguardMessageArea; import com.android.keyguard.LockIconViewController; import com.android.keyguard.dagger.KeyguardBouncerComponent; import com.android.systemui.R; import com.android.systemui.biometrics.domain.interactor.UdfpsOverlayInteractor; import com.android.systemui.classifier.FalsingCollector; import com.android.systemui.compose.ComposeFacade; import com.android.systemui.dock.DockManager; import com.android.systemui.flags.FeatureFlags; import com.android.systemui.flags.Flags; import com.android.systemui.keyguard.KeyguardUnlockAnimationController; import com.android.systemui.keyguard.domain.interactor.AlternateBouncerInteractor; import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor; import com.android.systemui.keyguard.shared.model.TransitionState; import com.android.systemui.keyguard.shared.model.TransitionStep; Loading Loading @@ -94,8 +92,6 @@ public class NotificationShadeWindowViewController { private final AmbientState mAmbientState; private final PulsingGestureListener mPulsingGestureListener; private final NotificationInsetsController mNotificationInsetsController; private final AlternateBouncerInteractor mAlternateBouncerInteractor; private final UdfpsOverlayInteractor mUdfpsOverlayInteractor; private final boolean mIsTrackpadCommonEnabled; private GestureDetector mPulsingWakeupGestureHandler; private View mBrightnessMirror; Loading Loading @@ -145,8 +141,6 @@ public class NotificationShadeWindowViewController { PulsingGestureListener pulsingGestureListener, KeyguardBouncerViewModel keyguardBouncerViewModel, KeyguardBouncerComponent.Factory keyguardBouncerComponentFactory, AlternateBouncerInteractor alternateBouncerInteractor, UdfpsOverlayInteractor udfpsOverlayInteractor, KeyguardTransitionInteractor keyguardTransitionInteractor, PrimaryBouncerToGoneTransitionViewModel primaryBouncerToGoneTransitionViewModel, FeatureFlags featureFlags, Loading @@ -170,8 +164,6 @@ public class NotificationShadeWindowViewController { mAmbientState = ambientState; mPulsingGestureListener = pulsingGestureListener; mNotificationInsetsController = notificationInsetsController; mAlternateBouncerInteractor = alternateBouncerInteractor; mUdfpsOverlayInteractor = udfpsOverlayInteractor; mIsTrackpadCommonEnabled = featureFlags.isEnabled(TRACKPAD_GESTURE_COMMON); // This view is not part of the newly inflated expanded status bar. Loading Loading @@ -269,6 +261,9 @@ public class NotificationShadeWindowViewController { mFalsingCollector.onTouchEvent(ev); mPulsingWakeupGestureHandler.onTouchEvent(ev); if (mStatusBarKeyguardViewManager.dispatchTouchEvent(ev)) { return true; } if (mBrightnessMirror != null && mBrightnessMirror.getVisibility() == View.VISIBLE) { // Disallow new pointers while the brightness mirror is visible. This is so that Loading Loading @@ -343,9 +338,10 @@ public class NotificationShadeWindowViewController { return true; } if (mAlternateBouncerInteractor.isVisibleState()) { // If using UDFPS, don't intercept touches that are within its overlay bounds return mUdfpsOverlayInteractor.canInterceptTouchInUdfpsBounds(ev); if (mStatusBarKeyguardViewManager.shouldInterceptTouchEvent(ev)) { // Don't allow touches to proceed to underlying views if alternate // bouncer is showing return true; } if (mLockIconViewController.onInterceptTouchEvent(ev)) { Loading Loading @@ -381,10 +377,8 @@ public class NotificationShadeWindowViewController { handled = !mService.isPulsing(); } if (mAlternateBouncerInteractor.isVisibleState()) { // eat the touch mStatusBarKeyguardViewManager.onTouch(ev); handled = true; if (mStatusBarKeyguardViewManager.onTouch(ev)) { return true; } if ((mDragDownHelper.isDragDownEnabled() && !handled) Loading Loading
packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java +1 −1 Original line number Diff line number Diff line Loading @@ -823,7 +823,7 @@ public class AuthController implements CoreStartable, CommandQueue.Callbacks, final Rect overlayBounds = new Rect( 0, /* left */ mCachedDisplayInfo.getNaturalHeight() / 2, /* top */ 0, /* top */ mCachedDisplayInfo.getNaturalWidth(), /* right */ mCachedDisplayInfo.getNaturalHeight() /* botom */); Loading
packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java +0 −1 Original line number Diff line number Diff line Loading @@ -607,7 +607,6 @@ public class UdfpsController implements DozeReceiver, Dumpable { case UNCHANGED: if (!isWithinSensorArea(mOverlay.getOverlayView(), event.getRawX(), event.getRawY(), true) && mActivePointerId == MotionEvent.INVALID_POINTER_ID && event.getActionMasked() == MotionEvent.ACTION_DOWN && mAlternateBouncerInteractor.isVisibleState()) { // No pointer on sensor, forward to keyguard if alternateBouncer is visible mKeyguardViewManager.onTouch(event); Loading
packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/UdfpsOverlayInteractor.kt +4 −4 Original line number Diff line number Diff line Loading @@ -37,12 +37,12 @@ class UdfpsOverlayInteractor @Inject constructor(private val authController: AuthController, @Application scope: CoroutineScope) { /** Whether a touch should be intercepted or allowed to pass to the UdfpsOverlay */ fun canInterceptTouchInUdfpsBounds(ev: MotionEvent): Boolean { /** Whether a touch is within the under-display fingerprint sensor area */ fun isTouchWithinUdfpsArea(ev: MotionEvent): Boolean { val isUdfpsEnrolled = authController.isUdfpsEnrolled(KeyguardUpdateMonitor.getCurrentUser()) val isWithinUdfpsOverlayBounds = val isWithinOverlayBounds = udfpsOverlayParams.value.overlayBounds.contains(ev.rawX.toInt(), ev.rawY.toInt()) return !isUdfpsEnrolled || !isWithinUdfpsOverlayBounds return isUdfpsEnrolled && isWithinOverlayBounds } /** Returns the current udfpsOverlayParams */ Loading
packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/AlternateBouncerInteractor.kt +2 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ constructor( var legacyAlternateBouncer: LegacyAlternateBouncer? = null var legacyAlternateBouncerVisibleTime: Long = NOT_VISIBLE var receivedDownTouch = false val isVisible: Flow<Boolean> = bouncerRepository.alternateBouncerVisible /** Loading Loading @@ -79,6 +80,7 @@ constructor( * @return true if the alternate bouncer was newly hidden, else false. */ fun hide(): Boolean { receivedDownTouch = false return if (isModernAlternateBouncerEnabled) { val wasAlternateBouncerVisible = isVisibleState() bouncerRepository.setAlternateVisible(false) Loading
packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java +9 −15 Original line number Diff line number Diff line Loading @@ -37,14 +37,12 @@ import com.android.keyguard.AuthKeyguardMessageArea; import com.android.keyguard.LockIconViewController; import com.android.keyguard.dagger.KeyguardBouncerComponent; import com.android.systemui.R; import com.android.systemui.biometrics.domain.interactor.UdfpsOverlayInteractor; import com.android.systemui.classifier.FalsingCollector; import com.android.systemui.compose.ComposeFacade; import com.android.systemui.dock.DockManager; import com.android.systemui.flags.FeatureFlags; import com.android.systemui.flags.Flags; import com.android.systemui.keyguard.KeyguardUnlockAnimationController; import com.android.systemui.keyguard.domain.interactor.AlternateBouncerInteractor; import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor; import com.android.systemui.keyguard.shared.model.TransitionState; import com.android.systemui.keyguard.shared.model.TransitionStep; Loading Loading @@ -94,8 +92,6 @@ public class NotificationShadeWindowViewController { private final AmbientState mAmbientState; private final PulsingGestureListener mPulsingGestureListener; private final NotificationInsetsController mNotificationInsetsController; private final AlternateBouncerInteractor mAlternateBouncerInteractor; private final UdfpsOverlayInteractor mUdfpsOverlayInteractor; private final boolean mIsTrackpadCommonEnabled; private GestureDetector mPulsingWakeupGestureHandler; private View mBrightnessMirror; Loading Loading @@ -145,8 +141,6 @@ public class NotificationShadeWindowViewController { PulsingGestureListener pulsingGestureListener, KeyguardBouncerViewModel keyguardBouncerViewModel, KeyguardBouncerComponent.Factory keyguardBouncerComponentFactory, AlternateBouncerInteractor alternateBouncerInteractor, UdfpsOverlayInteractor udfpsOverlayInteractor, KeyguardTransitionInteractor keyguardTransitionInteractor, PrimaryBouncerToGoneTransitionViewModel primaryBouncerToGoneTransitionViewModel, FeatureFlags featureFlags, Loading @@ -170,8 +164,6 @@ public class NotificationShadeWindowViewController { mAmbientState = ambientState; mPulsingGestureListener = pulsingGestureListener; mNotificationInsetsController = notificationInsetsController; mAlternateBouncerInteractor = alternateBouncerInteractor; mUdfpsOverlayInteractor = udfpsOverlayInteractor; mIsTrackpadCommonEnabled = featureFlags.isEnabled(TRACKPAD_GESTURE_COMMON); // This view is not part of the newly inflated expanded status bar. Loading Loading @@ -269,6 +261,9 @@ public class NotificationShadeWindowViewController { mFalsingCollector.onTouchEvent(ev); mPulsingWakeupGestureHandler.onTouchEvent(ev); if (mStatusBarKeyguardViewManager.dispatchTouchEvent(ev)) { return true; } if (mBrightnessMirror != null && mBrightnessMirror.getVisibility() == View.VISIBLE) { // Disallow new pointers while the brightness mirror is visible. This is so that Loading Loading @@ -343,9 +338,10 @@ public class NotificationShadeWindowViewController { return true; } if (mAlternateBouncerInteractor.isVisibleState()) { // If using UDFPS, don't intercept touches that are within its overlay bounds return mUdfpsOverlayInteractor.canInterceptTouchInUdfpsBounds(ev); if (mStatusBarKeyguardViewManager.shouldInterceptTouchEvent(ev)) { // Don't allow touches to proceed to underlying views if alternate // bouncer is showing return true; } if (mLockIconViewController.onInterceptTouchEvent(ev)) { Loading Loading @@ -381,10 +377,8 @@ public class NotificationShadeWindowViewController { handled = !mService.isPulsing(); } if (mAlternateBouncerInteractor.isVisibleState()) { // eat the touch mStatusBarKeyguardViewManager.onTouch(ev); handled = true; if (mStatusBarKeyguardViewManager.onTouch(ev)) { return true; } if ((mDragDownHelper.isDragDownEnabled() && !handled) Loading