Loading packages/SystemUI/plugin/src/com/android/systemui/plugins/FalsingManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -147,10 +147,10 @@ public interface FalsingManager { } /** * Listener that is alerted when a double tap is required to confirm a single tap. * Listener that is alerted when an additional tap is required to confirm a single tap. **/ interface FalsingTapListener { void onDoubleTapRequired(); void onAdditionalTapRequired(); } /** Passed to {@link FalsingManager#onProximityEvent}. */ Loading packages/SystemUI/src/com/android/systemui/classifier/BrightLineFalsingManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -291,7 +291,7 @@ public class BrightLineFalsingManager implements FalsingManager { FalsingClassifier.Result.falsed( 0, getClass().getSimpleName(), "bad history")); logDebug("False Single Tap: true (bad history)"); mFalsingTapListeners.forEach(FalsingTapListener::onDoubleTapRequired); mFalsingTapListeners.forEach(FalsingTapListener::onAdditionalTapRequired); return true; } else { mPriorResults = getPassedResult(0.1); Loading Loading @@ -321,7 +321,7 @@ public class BrightLineFalsingManager implements FalsingManager { mHistoryTracker.falseBelief(), mHistoryTracker.falseConfidence()); mPriorResults = Collections.singleton(result); logDebug("False Double Tap: " + result.isFalse()); logDebug("False Double Tap: " + result.isFalse() + " reason=" + result.getReason()); return result.isFalse(); } Loading packages/SystemUI/src/com/android/systemui/classifier/FalsingCollectorImpl.java +1 −3 Original line number Diff line number Diff line Loading @@ -303,9 +303,7 @@ class FalsingCollectorImpl implements FalsingCollector { @Override public void onTouchEvent(MotionEvent ev) { if (!mKeyguardStateController.isShowing() || (mStatusBarStateController.isDozing() && !mStatusBarStateController.isPulsing())) { if (!mKeyguardStateController.isShowing()) { avoidGesture(); return; } Loading packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +15 −2 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_Q import static com.android.systemui.statusbar.StatusBarState.KEYGUARD; import static com.android.systemui.statusbar.StatusBarState.SHADE; import static com.android.systemui.statusbar.StatusBarState.SHADE_LOCKED; import static com.android.systemui.statusbar.VibratorHelper.TOUCH_VIBRATION_ATTRIBUTES; import static com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout.ROWS_ALL; import static com.android.systemui.statusbar.notification.stack.StackStateAnimator.ANIMATION_DURATION_FOLD_TO_AOD; import static com.android.systemui.statusbar.phone.panelstate.PanelExpansionStateManagerKt.STATE_CLOSED; Loading Loading @@ -62,6 +63,7 @@ import android.hardware.fingerprint.FingerprintSensorPropertiesInternal; import android.os.Bundle; import android.os.Handler; import android.os.PowerManager; import android.os.Process; import android.os.Trace; import android.os.UserManager; import android.os.VibrationEffect; Loading Loading @@ -236,6 +238,9 @@ public final class NotificationPanelViewController extends PanelViewController { private static final boolean SPEW_LOGCAT = Compile.IS_DEBUG && Log.isLoggable(TAG, Log.VERBOSE); private static final boolean DEBUG_DRAWABLE = false; private static final VibrationEffect ADDITIONAL_TAP_REQUIRED_VIBRATION_EFFECT = VibrationEffect.get(VibrationEffect.EFFECT_STRENGTH_MEDIUM, false); /** * The parallax amount of the quick settings translation when dragging down the panel */ Loading Loading @@ -682,14 +687,22 @@ public final class NotificationPanelViewController extends PanelViewController { private final FalsingTapListener mFalsingTapListener = new FalsingTapListener() { @Override public void onDoubleTapRequired() { public void onAdditionalTapRequired() { if (mStatusBarStateController.getState() == StatusBarState.SHADE_LOCKED) { mTapAgainViewController.show(); } else { mKeyguardIndicationController.showTransientIndication( R.string.notification_tap_again); } mVibratorHelper.vibrate(VibrationEffect.EFFECT_STRENGTH_MEDIUM); if (!mStatusBarStateController.isDozing()) { mVibratorHelper.vibrate( Process.myUid(), mView.getContext().getPackageName(), ADDITIONAL_TAP_REQUIRED_VIBRATION_EFFECT, "falsing-additional-tap-required", TOUCH_VIBRATION_ATTRIBUTES); } } }; Loading packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java +4 −3 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ public class NotificationShadeWindowViewController { private final AmbientState mAmbientState; private final PulsingGestureListener mPulsingGestureListener; private GestureDetector mGestureDetector; private GestureDetector mPulsingWakeupGestureHandler; private View mBrightnessMirror; private boolean mTouchActive; private boolean mTouchCancelled; Loading Loading @@ -149,7 +149,8 @@ public class NotificationShadeWindowViewController { /** Inflates the {@link R.layout#status_bar_expanded} layout and sets it up. */ public void setupExpandedStatusBar() { mStackScrollLayout = mView.findViewById(R.id.notification_stack_scroller); mGestureDetector = new GestureDetector(mView.getContext(), mPulsingGestureListener); mPulsingWakeupGestureHandler = new GestureDetector(mView.getContext(), mPulsingGestureListener); mView.setInteractionEventHandler(new NotificationShadeWindowView.InteractionEventHandler() { @Override Loading Loading @@ -196,7 +197,7 @@ public class NotificationShadeWindowViewController { } mFalsingCollector.onTouchEvent(ev); mGestureDetector.onTouchEvent(ev); mPulsingWakeupGestureHandler.onTouchEvent(ev); mStatusBarKeyguardViewManager.onTouch(ev); if (mBrightnessMirror != null && mBrightnessMirror.getVisibility() == View.VISIBLE) { Loading Loading
packages/SystemUI/plugin/src/com/android/systemui/plugins/FalsingManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -147,10 +147,10 @@ public interface FalsingManager { } /** * Listener that is alerted when a double tap is required to confirm a single tap. * Listener that is alerted when an additional tap is required to confirm a single tap. **/ interface FalsingTapListener { void onDoubleTapRequired(); void onAdditionalTapRequired(); } /** Passed to {@link FalsingManager#onProximityEvent}. */ Loading
packages/SystemUI/src/com/android/systemui/classifier/BrightLineFalsingManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -291,7 +291,7 @@ public class BrightLineFalsingManager implements FalsingManager { FalsingClassifier.Result.falsed( 0, getClass().getSimpleName(), "bad history")); logDebug("False Single Tap: true (bad history)"); mFalsingTapListeners.forEach(FalsingTapListener::onDoubleTapRequired); mFalsingTapListeners.forEach(FalsingTapListener::onAdditionalTapRequired); return true; } else { mPriorResults = getPassedResult(0.1); Loading Loading @@ -321,7 +321,7 @@ public class BrightLineFalsingManager implements FalsingManager { mHistoryTracker.falseBelief(), mHistoryTracker.falseConfidence()); mPriorResults = Collections.singleton(result); logDebug("False Double Tap: " + result.isFalse()); logDebug("False Double Tap: " + result.isFalse() + " reason=" + result.getReason()); return result.isFalse(); } Loading
packages/SystemUI/src/com/android/systemui/classifier/FalsingCollectorImpl.java +1 −3 Original line number Diff line number Diff line Loading @@ -303,9 +303,7 @@ class FalsingCollectorImpl implements FalsingCollector { @Override public void onTouchEvent(MotionEvent ev) { if (!mKeyguardStateController.isShowing() || (mStatusBarStateController.isDozing() && !mStatusBarStateController.isPulsing())) { if (!mKeyguardStateController.isShowing()) { avoidGesture(); return; } Loading
packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +15 −2 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_Q import static com.android.systemui.statusbar.StatusBarState.KEYGUARD; import static com.android.systemui.statusbar.StatusBarState.SHADE; import static com.android.systemui.statusbar.StatusBarState.SHADE_LOCKED; import static com.android.systemui.statusbar.VibratorHelper.TOUCH_VIBRATION_ATTRIBUTES; import static com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout.ROWS_ALL; import static com.android.systemui.statusbar.notification.stack.StackStateAnimator.ANIMATION_DURATION_FOLD_TO_AOD; import static com.android.systemui.statusbar.phone.panelstate.PanelExpansionStateManagerKt.STATE_CLOSED; Loading Loading @@ -62,6 +63,7 @@ import android.hardware.fingerprint.FingerprintSensorPropertiesInternal; import android.os.Bundle; import android.os.Handler; import android.os.PowerManager; import android.os.Process; import android.os.Trace; import android.os.UserManager; import android.os.VibrationEffect; Loading Loading @@ -236,6 +238,9 @@ public final class NotificationPanelViewController extends PanelViewController { private static final boolean SPEW_LOGCAT = Compile.IS_DEBUG && Log.isLoggable(TAG, Log.VERBOSE); private static final boolean DEBUG_DRAWABLE = false; private static final VibrationEffect ADDITIONAL_TAP_REQUIRED_VIBRATION_EFFECT = VibrationEffect.get(VibrationEffect.EFFECT_STRENGTH_MEDIUM, false); /** * The parallax amount of the quick settings translation when dragging down the panel */ Loading Loading @@ -682,14 +687,22 @@ public final class NotificationPanelViewController extends PanelViewController { private final FalsingTapListener mFalsingTapListener = new FalsingTapListener() { @Override public void onDoubleTapRequired() { public void onAdditionalTapRequired() { if (mStatusBarStateController.getState() == StatusBarState.SHADE_LOCKED) { mTapAgainViewController.show(); } else { mKeyguardIndicationController.showTransientIndication( R.string.notification_tap_again); } mVibratorHelper.vibrate(VibrationEffect.EFFECT_STRENGTH_MEDIUM); if (!mStatusBarStateController.isDozing()) { mVibratorHelper.vibrate( Process.myUid(), mView.getContext().getPackageName(), ADDITIONAL_TAP_REQUIRED_VIBRATION_EFFECT, "falsing-additional-tap-required", TOUCH_VIBRATION_ATTRIBUTES); } } }; Loading
packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java +4 −3 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ public class NotificationShadeWindowViewController { private final AmbientState mAmbientState; private final PulsingGestureListener mPulsingGestureListener; private GestureDetector mGestureDetector; private GestureDetector mPulsingWakeupGestureHandler; private View mBrightnessMirror; private boolean mTouchActive; private boolean mTouchCancelled; Loading Loading @@ -149,7 +149,8 @@ public class NotificationShadeWindowViewController { /** Inflates the {@link R.layout#status_bar_expanded} layout and sets it up. */ public void setupExpandedStatusBar() { mStackScrollLayout = mView.findViewById(R.id.notification_stack_scroller); mGestureDetector = new GestureDetector(mView.getContext(), mPulsingGestureListener); mPulsingWakeupGestureHandler = new GestureDetector(mView.getContext(), mPulsingGestureListener); mView.setInteractionEventHandler(new NotificationShadeWindowView.InteractionEventHandler() { @Override Loading Loading @@ -196,7 +197,7 @@ public class NotificationShadeWindowViewController { } mFalsingCollector.onTouchEvent(ev); mGestureDetector.onTouchEvent(ev); mPulsingWakeupGestureHandler.onTouchEvent(ev); mStatusBarKeyguardViewManager.onTouch(ev); if (mBrightnessMirror != null && mBrightnessMirror.getVisibility() == View.VISIBLE) { Loading