Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java +7 −6 Original line number Diff line number Diff line Loading @@ -43,9 +43,9 @@ public class KeyguardAffordanceHelper { private static final int HINT_CIRCLE_OPEN_DURATION = 500; private final Context mContext; private final Callback mCallback; private FlingAnimationUtils mFlingAnimationUtils; private Callback mCallback; private VelocityTracker mVelocityTracker; private boolean mSwipingInProgress; private float mInitialTouchX; Loading Loading @@ -318,12 +318,11 @@ public class KeyguardAffordanceHelper { float vel = getCurrentVelocity(lastX, lastY); // We snap back if the current translation is not far enough boolean snapBack; if (mFalsingManager.isFalseTouch()) { snapBack = mFalsingManager.isFalseTouch(); } else { snapBack = isBelowFalsingThreshold(); boolean snapBack = false; if (mCallback.needsAntiFalsing()) { snapBack = snapBack || mFalsingManager.isFalseTouch(); } snapBack = snapBack || isBelowFalsingThreshold(); // or if the velocity is in the opposite direction. boolean velIsInWrongDirection = vel * mTranslation < 0; Loading Loading @@ -582,5 +581,7 @@ public class KeyguardAffordanceHelper { * @return The factor the minimum swipe amount should be multiplied with. */ float getAffordanceFalsingFactor(); boolean needsAntiFalsing(); } } packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +6 −1 Original line number Diff line number Diff line Loading @@ -701,7 +701,7 @@ public class NotificationPanelView extends PanelView implements } private boolean isFalseTouch() { if (mStatusBarState != StatusBarState.KEYGUARD) { if (!needsAntiFalsing()) { return false; } if (mFalsingManager.isClassiferEnabled()) { Loading Loading @@ -1940,6 +1940,11 @@ public class NotificationPanelView extends PanelView implements return mStatusBar.isWakeUpComingFromTouch() ? 1.5f : 1.0f; } @Override public boolean needsAntiFalsing() { return mStatusBarState == StatusBarState.KEYGUARD; } @Override protected float getPeekHeight() { if (mNotificationStackScroller.getNotGoneChildCount() > 0) { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java +7 −6 Original line number Diff line number Diff line Loading @@ -43,9 +43,9 @@ public class KeyguardAffordanceHelper { private static final int HINT_CIRCLE_OPEN_DURATION = 500; private final Context mContext; private final Callback mCallback; private FlingAnimationUtils mFlingAnimationUtils; private Callback mCallback; private VelocityTracker mVelocityTracker; private boolean mSwipingInProgress; private float mInitialTouchX; Loading Loading @@ -318,12 +318,11 @@ public class KeyguardAffordanceHelper { float vel = getCurrentVelocity(lastX, lastY); // We snap back if the current translation is not far enough boolean snapBack; if (mFalsingManager.isFalseTouch()) { snapBack = mFalsingManager.isFalseTouch(); } else { snapBack = isBelowFalsingThreshold(); boolean snapBack = false; if (mCallback.needsAntiFalsing()) { snapBack = snapBack || mFalsingManager.isFalseTouch(); } snapBack = snapBack || isBelowFalsingThreshold(); // or if the velocity is in the opposite direction. boolean velIsInWrongDirection = vel * mTranslation < 0; Loading Loading @@ -582,5 +581,7 @@ public class KeyguardAffordanceHelper { * @return The factor the minimum swipe amount should be multiplied with. */ float getAffordanceFalsingFactor(); boolean needsAntiFalsing(); } }
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +6 −1 Original line number Diff line number Diff line Loading @@ -701,7 +701,7 @@ public class NotificationPanelView extends PanelView implements } private boolean isFalseTouch() { if (mStatusBarState != StatusBarState.KEYGUARD) { if (!needsAntiFalsing()) { return false; } if (mFalsingManager.isClassiferEnabled()) { Loading Loading @@ -1940,6 +1940,11 @@ public class NotificationPanelView extends PanelView implements return mStatusBar.isWakeUpComingFromTouch() ? 1.5f : 1.0f; } @Override public boolean needsAntiFalsing() { return mStatusBarState == StatusBarState.KEYGUARD; } @Override protected float getPeekHeight() { if (mNotificationStackScroller.getNotGoneChildCount() > 0) { Loading