Loading packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java +4 −3 Original line number Diff line number Diff line Loading @@ -102,8 +102,6 @@ import com.android.systemui.util.concurrency.DelayableExecutor; import com.android.systemui.util.concurrency.Execution; import com.android.systemui.util.time.SystemClock; import kotlin.Unit; import java.io.PrintWriter; import java.util.ArrayList; import java.util.HashSet; Loading @@ -113,6 +111,8 @@ import java.util.concurrent.Executor; import javax.inject.Inject; import javax.inject.Provider; import kotlin.Unit; import kotlinx.coroutines.ExperimentalCoroutinesApi; /** Loading Loading @@ -588,7 +588,8 @@ public class UdfpsController implements DozeReceiver, Dumpable { // Always pilfer pointers that are within sensor area or when alternate bouncer is showing if (mActivePointerId != MotionEvent.INVALID_POINTER_ID || mAlternateBouncerInteractor.isVisibleState()) { || (mAlternateBouncerInteractor.isVisibleState() && !DeviceEntryUdfpsRefactor.isEnabled())) { shouldPilfer = true; } Loading packages/SystemUI/src/com/android/systemui/classifier/Classifier.java +2 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ public abstract class Classifier { public static final int BACK_GESTURE = 16; public static final int QS_SWIPE_NESTED = 17; public static final int MEDIA_SEEKBAR = 18; public static final int ALTERNATE_BOUNCER_SWIPE = 19; @IntDef({ QUICK_SETTINGS, Loading @@ -65,6 +66,7 @@ public abstract class Classifier { QS_SWIPE_NESTED, BACK_GESTURE, MEDIA_SEEKBAR, ALTERNATE_BOUNCER_SWIPE, }) @Retention(RetentionPolicy.SOURCE) public @interface InteractionType {} Loading packages/SystemUI/src/com/android/systemui/classifier/DistanceClassifier.java +3 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import static com.android.internal.config.sysui.SystemUiDeviceConfigFlags.BRIGHT import static com.android.internal.config.sysui.SystemUiDeviceConfigFlags.BRIGHTLINE_FALSING_DISTANCE_VELOCITY_TO_DISTANCE; import static com.android.internal.config.sysui.SystemUiDeviceConfigFlags.BRIGHTLINE_FALSING_DISTANCE_VERTICAL_FLING_THRESHOLD_IN; import static com.android.internal.config.sysui.SystemUiDeviceConfigFlags.BRIGHTLINE_FALSING_DISTANCE_VERTICAL_SWIPE_THRESHOLD_IN; import static com.android.systemui.classifier.Classifier.ALTERNATE_BOUNCER_SWIPE; import static com.android.systemui.classifier.Classifier.BRIGHTNESS_SLIDER; import static com.android.systemui.classifier.Classifier.MEDIA_SEEKBAR; import static com.android.systemui.classifier.Classifier.QS_COLLAPSE; Loading Loading @@ -159,7 +160,8 @@ class DistanceClassifier extends FalsingClassifier { || interactionType == QS_COLLAPSE || interactionType == Classifier.UDFPS_AUTHENTICATION || interactionType == Classifier.QS_SWIPE_SIDE || interactionType == QS_SWIPE_NESTED) { || interactionType == QS_SWIPE_NESTED || interactionType == ALTERNATE_BOUNCER_SWIPE) { return Result.passed(0); } Loading packages/SystemUI/src/com/android/systemui/classifier/TypeClassifier.java +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.classifier; import static com.android.systemui.classifier.Classifier.ALTERNATE_BOUNCER_SWIPE; import static com.android.systemui.classifier.Classifier.BOUNCER_UNLOCK; import static com.android.systemui.classifier.Classifier.BRIGHTNESS_SLIDER; import static com.android.systemui.classifier.Classifier.LEFT_AFFORDANCE; Loading Loading @@ -73,6 +74,7 @@ public class TypeClassifier extends FalsingClassifier { case NOTIFICATION_DISMISS: wrongDirection = vertical; break; case ALTERNATE_BOUNCER_SWIPE: case UNLOCK: case BOUNCER_UNLOCK: wrongDirection = !vertical || !up; Loading packages/SystemUI/src/com/android/systemui/keyguard/ui/SwipeUpAnywhereGestureHandler.kt 0 → 100644 +45 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.keyguard.ui import android.content.Context import android.view.MotionEvent import com.android.systemui.dagger.SysUISingleton import com.android.systemui.settings.DisplayTracker import com.android.systemui.statusbar.gesture.SwipeUpGestureHandler import com.android.systemui.statusbar.gesture.SwipeUpGestureLogger import javax.inject.Inject /** A class to detect when a user swipes up anywhere on the display. */ @SysUISingleton class SwipeUpAnywhereGestureHandler @Inject constructor( context: Context, displayTracker: DisplayTracker, logger: SwipeUpGestureLogger, ) : SwipeUpGestureHandler( context, displayTracker, logger, loggerTag = "SwipeUpAnywhereGestureHandler" ) { override fun startOfGestureIsWithinBounds(ev: MotionEvent): Boolean { return true } } Loading
packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java +4 −3 Original line number Diff line number Diff line Loading @@ -102,8 +102,6 @@ import com.android.systemui.util.concurrency.DelayableExecutor; import com.android.systemui.util.concurrency.Execution; import com.android.systemui.util.time.SystemClock; import kotlin.Unit; import java.io.PrintWriter; import java.util.ArrayList; import java.util.HashSet; Loading @@ -113,6 +111,8 @@ import java.util.concurrent.Executor; import javax.inject.Inject; import javax.inject.Provider; import kotlin.Unit; import kotlinx.coroutines.ExperimentalCoroutinesApi; /** Loading Loading @@ -588,7 +588,8 @@ public class UdfpsController implements DozeReceiver, Dumpable { // Always pilfer pointers that are within sensor area or when alternate bouncer is showing if (mActivePointerId != MotionEvent.INVALID_POINTER_ID || mAlternateBouncerInteractor.isVisibleState()) { || (mAlternateBouncerInteractor.isVisibleState() && !DeviceEntryUdfpsRefactor.isEnabled())) { shouldPilfer = true; } Loading
packages/SystemUI/src/com/android/systemui/classifier/Classifier.java +2 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ public abstract class Classifier { public static final int BACK_GESTURE = 16; public static final int QS_SWIPE_NESTED = 17; public static final int MEDIA_SEEKBAR = 18; public static final int ALTERNATE_BOUNCER_SWIPE = 19; @IntDef({ QUICK_SETTINGS, Loading @@ -65,6 +66,7 @@ public abstract class Classifier { QS_SWIPE_NESTED, BACK_GESTURE, MEDIA_SEEKBAR, ALTERNATE_BOUNCER_SWIPE, }) @Retention(RetentionPolicy.SOURCE) public @interface InteractionType {} Loading
packages/SystemUI/src/com/android/systemui/classifier/DistanceClassifier.java +3 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import static com.android.internal.config.sysui.SystemUiDeviceConfigFlags.BRIGHT import static com.android.internal.config.sysui.SystemUiDeviceConfigFlags.BRIGHTLINE_FALSING_DISTANCE_VELOCITY_TO_DISTANCE; import static com.android.internal.config.sysui.SystemUiDeviceConfigFlags.BRIGHTLINE_FALSING_DISTANCE_VERTICAL_FLING_THRESHOLD_IN; import static com.android.internal.config.sysui.SystemUiDeviceConfigFlags.BRIGHTLINE_FALSING_DISTANCE_VERTICAL_SWIPE_THRESHOLD_IN; import static com.android.systemui.classifier.Classifier.ALTERNATE_BOUNCER_SWIPE; import static com.android.systemui.classifier.Classifier.BRIGHTNESS_SLIDER; import static com.android.systemui.classifier.Classifier.MEDIA_SEEKBAR; import static com.android.systemui.classifier.Classifier.QS_COLLAPSE; Loading Loading @@ -159,7 +160,8 @@ class DistanceClassifier extends FalsingClassifier { || interactionType == QS_COLLAPSE || interactionType == Classifier.UDFPS_AUTHENTICATION || interactionType == Classifier.QS_SWIPE_SIDE || interactionType == QS_SWIPE_NESTED) { || interactionType == QS_SWIPE_NESTED || interactionType == ALTERNATE_BOUNCER_SWIPE) { return Result.passed(0); } Loading
packages/SystemUI/src/com/android/systemui/classifier/TypeClassifier.java +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.classifier; import static com.android.systemui.classifier.Classifier.ALTERNATE_BOUNCER_SWIPE; import static com.android.systemui.classifier.Classifier.BOUNCER_UNLOCK; import static com.android.systemui.classifier.Classifier.BRIGHTNESS_SLIDER; import static com.android.systemui.classifier.Classifier.LEFT_AFFORDANCE; Loading Loading @@ -73,6 +74,7 @@ public class TypeClassifier extends FalsingClassifier { case NOTIFICATION_DISMISS: wrongDirection = vertical; break; case ALTERNATE_BOUNCER_SWIPE: case UNLOCK: case BOUNCER_UNLOCK: wrongDirection = !vertical || !up; Loading
packages/SystemUI/src/com/android/systemui/keyguard/ui/SwipeUpAnywhereGestureHandler.kt 0 → 100644 +45 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.keyguard.ui import android.content.Context import android.view.MotionEvent import com.android.systemui.dagger.SysUISingleton import com.android.systemui.settings.DisplayTracker import com.android.systemui.statusbar.gesture.SwipeUpGestureHandler import com.android.systemui.statusbar.gesture.SwipeUpGestureLogger import javax.inject.Inject /** A class to detect when a user swipes up anywhere on the display. */ @SysUISingleton class SwipeUpAnywhereGestureHandler @Inject constructor( context: Context, displayTracker: DisplayTracker, logger: SwipeUpGestureLogger, ) : SwipeUpGestureHandler( context, displayTracker, logger, loggerTag = "SwipeUpAnywhereGestureHandler" ) { override fun startOfGestureIsWithinBounds(ev: MotionEvent): Boolean { return true } }