Loading packages/SystemUI/plugin/src/com/android/systemui/plugins/FalsingManager.java +3 −2 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ import java.io.PrintWriter; */ @ProvidesInterface(version = FalsingManager.VERSION) public interface FalsingManager { int VERSION = 4; int VERSION = 5; void onSuccessfulUnlock(); Loading @@ -42,7 +42,8 @@ public interface FalsingManager { boolean isUnlockingDisabled(); boolean isFalseTouch(); /** Returns true if the gesture should be rejected. */ boolean isFalseTouch(int interactionType); void onNotificatonStopDraggingDown(); Loading packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/NotificationSwipeActionHelper.java +6 −5 Original line number Diff line number Diff line Loading @@ -14,16 +14,16 @@ package com.android.systemui.plugins.statusbar; import com.android.systemui.plugins.annotations.DependsOn; import com.android.systemui.plugins.annotations.ProvidesInterface; import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper.SnoozeOption; import android.service.notification.SnoozeCriterion; import android.service.notification.StatusBarNotification; import android.view.MotionEvent; import android.view.View; import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction; import com.android.systemui.plugins.annotations.DependsOn; import com.android.systemui.plugins.annotations.ProvidesInterface; import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper.SnoozeOption; @ProvidesInterface(version = NotificationSwipeActionHelper.VERSION) @DependsOn(target = SnoozeOption.class) public interface NotificationSwipeActionHelper { Loading Loading @@ -52,7 +52,8 @@ public interface NotificationSwipeActionHelper { public boolean isDismissGesture(MotionEvent ev); public boolean isFalseGesture(MotionEvent ev); /** Returns true if the gesture should be rejected. */ boolean isFalseGesture(); public boolean swipedFarEnough(float translation, float viewSize); Loading packages/SystemUI/src/com/android/systemui/SwipeHelper.java +6 −3 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.systemui; import static com.android.systemui.classifier.Classifier.NOTIFICATION_DISMISS; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; Loading Loading @@ -697,14 +699,15 @@ public class SwipeHelper implements Gefingerpoken { float translation = getTranslation(mCurrView); return ev.getActionMasked() == MotionEvent.ACTION_UP && !mFalsingManager.isUnlockingDisabled() && !isFalseGesture(ev) && (swipedFastEnough() || swipedFarEnough()) && !isFalseGesture() && (swipedFastEnough() || swipedFarEnough()) && mCallback.canChildBeDismissedInDirection(mCurrView, translation > 0); } public boolean isFalseGesture(MotionEvent ev) { /** Returns true if the gesture should be rejected. */ public boolean isFalseGesture() { boolean falsingDetected = mCallback.isAntiFalsingNeeded(); if (mFalsingManager.isClassifierEnabled()) { falsingDetected = falsingDetected && mFalsingManager.isFalseTouch(); falsingDetected = falsingDetected && mFalsingManager.isFalseTouch(NOTIFICATION_DISMISS); } else { falsingDetected = falsingDetected && !mTouchAboveFalsingThreshold; } Loading packages/SystemUI/src/com/android/systemui/classifier/FalsingManagerFake.java +1 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ public class FalsingManagerFake implements FalsingManager { } @Override public boolean isFalseTouch() { public boolean isFalseTouch(@Classifier.InteractionType int interactionType) { return mIsFalseTouch; } Loading packages/SystemUI/src/com/android/systemui/classifier/FalsingManagerImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -262,7 +262,7 @@ public class FalsingManagerImpl implements FalsingManager { /** * @return true if the classifier determined that this is not a human interacting with the phone */ public boolean isFalseTouch() { public boolean isFalseTouch(@Classifier.InteractionType int interactionType) { if (FalsingLog.ENABLED) { // We're getting some false wtfs from touches that happen after the device went // to sleep. Only report missing sessions that happen when the device is interactive. Loading Loading
packages/SystemUI/plugin/src/com/android/systemui/plugins/FalsingManager.java +3 −2 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ import java.io.PrintWriter; */ @ProvidesInterface(version = FalsingManager.VERSION) public interface FalsingManager { int VERSION = 4; int VERSION = 5; void onSuccessfulUnlock(); Loading @@ -42,7 +42,8 @@ public interface FalsingManager { boolean isUnlockingDisabled(); boolean isFalseTouch(); /** Returns true if the gesture should be rejected. */ boolean isFalseTouch(int interactionType); void onNotificatonStopDraggingDown(); Loading
packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/NotificationSwipeActionHelper.java +6 −5 Original line number Diff line number Diff line Loading @@ -14,16 +14,16 @@ package com.android.systemui.plugins.statusbar; import com.android.systemui.plugins.annotations.DependsOn; import com.android.systemui.plugins.annotations.ProvidesInterface; import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper.SnoozeOption; import android.service.notification.SnoozeCriterion; import android.service.notification.StatusBarNotification; import android.view.MotionEvent; import android.view.View; import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction; import com.android.systemui.plugins.annotations.DependsOn; import com.android.systemui.plugins.annotations.ProvidesInterface; import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper.SnoozeOption; @ProvidesInterface(version = NotificationSwipeActionHelper.VERSION) @DependsOn(target = SnoozeOption.class) public interface NotificationSwipeActionHelper { Loading Loading @@ -52,7 +52,8 @@ public interface NotificationSwipeActionHelper { public boolean isDismissGesture(MotionEvent ev); public boolean isFalseGesture(MotionEvent ev); /** Returns true if the gesture should be rejected. */ boolean isFalseGesture(); public boolean swipedFarEnough(float translation, float viewSize); Loading
packages/SystemUI/src/com/android/systemui/SwipeHelper.java +6 −3 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.systemui; import static com.android.systemui.classifier.Classifier.NOTIFICATION_DISMISS; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; Loading Loading @@ -697,14 +699,15 @@ public class SwipeHelper implements Gefingerpoken { float translation = getTranslation(mCurrView); return ev.getActionMasked() == MotionEvent.ACTION_UP && !mFalsingManager.isUnlockingDisabled() && !isFalseGesture(ev) && (swipedFastEnough() || swipedFarEnough()) && !isFalseGesture() && (swipedFastEnough() || swipedFarEnough()) && mCallback.canChildBeDismissedInDirection(mCurrView, translation > 0); } public boolean isFalseGesture(MotionEvent ev) { /** Returns true if the gesture should be rejected. */ public boolean isFalseGesture() { boolean falsingDetected = mCallback.isAntiFalsingNeeded(); if (mFalsingManager.isClassifierEnabled()) { falsingDetected = falsingDetected && mFalsingManager.isFalseTouch(); falsingDetected = falsingDetected && mFalsingManager.isFalseTouch(NOTIFICATION_DISMISS); } else { falsingDetected = falsingDetected && !mTouchAboveFalsingThreshold; } Loading
packages/SystemUI/src/com/android/systemui/classifier/FalsingManagerFake.java +1 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ public class FalsingManagerFake implements FalsingManager { } @Override public boolean isFalseTouch() { public boolean isFalseTouch(@Classifier.InteractionType int interactionType) { return mIsFalseTouch; } Loading
packages/SystemUI/src/com/android/systemui/classifier/FalsingManagerImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -262,7 +262,7 @@ public class FalsingManagerImpl implements FalsingManager { /** * @return true if the classifier determined that this is not a human interacting with the phone */ public boolean isFalseTouch() { public boolean isFalseTouch(@Classifier.InteractionType int interactionType) { if (FalsingLog.ENABLED) { // We're getting some false wtfs from touches that happen after the device went // to sleep. Only report missing sessions that happen when the device is interactive. Loading