Loading packages/SystemUI/src/com/android/systemui/classifier/FalsingManager.java +10 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.os.Looper; import android.os.PowerManager; import android.os.UserHandle; import android.provider.Settings; import android.view.InputDevice; import android.view.MotionEvent; import android.view.accessibility.AccessibilityManager; Loading Loading @@ -74,6 +75,7 @@ public class FalsingManager implements SensorEventListener { private boolean mEnforceBouncer = false; private boolean mBouncerOn = false; private boolean mSessionActive = false; private boolean mIsTouchScreen = true; private int mState = StatusBarState.SHADE; private boolean mScreenOn; private boolean mShowingAod; Loading Loading @@ -236,6 +238,11 @@ public class FalsingManager implements SensorEventListener { // already sufficiently prevents false unlocks. return false; } if (!mIsTouchScreen) { // Unlocking with input devices besides the touchscreen should already be sufficiently // anti-falsed. return false; } return mHumanInteractionClassifier.isFalseTouch(); } Loading Loading @@ -450,6 +457,9 @@ public class FalsingManager implements SensorEventListener { } public void onTouchEvent(MotionEvent event, int width, int height) { if (event.getAction() == MotionEvent.ACTION_DOWN) { mIsTouchScreen = event.isFromSource(InputDevice.SOURCE_TOUCHSCREEN); } if (mSessionActive && !mBouncerOn) { mDataCollector.onTouchEvent(event, width, height); mHumanInteractionClassifier.onTouchEvent(event); Loading Loading
packages/SystemUI/src/com/android/systemui/classifier/FalsingManager.java +10 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.os.Looper; import android.os.PowerManager; import android.os.UserHandle; import android.provider.Settings; import android.view.InputDevice; import android.view.MotionEvent; import android.view.accessibility.AccessibilityManager; Loading Loading @@ -74,6 +75,7 @@ public class FalsingManager implements SensorEventListener { private boolean mEnforceBouncer = false; private boolean mBouncerOn = false; private boolean mSessionActive = false; private boolean mIsTouchScreen = true; private int mState = StatusBarState.SHADE; private boolean mScreenOn; private boolean mShowingAod; Loading Loading @@ -236,6 +238,11 @@ public class FalsingManager implements SensorEventListener { // already sufficiently prevents false unlocks. return false; } if (!mIsTouchScreen) { // Unlocking with input devices besides the touchscreen should already be sufficiently // anti-falsed. return false; } return mHumanInteractionClassifier.isFalseTouch(); } Loading Loading @@ -450,6 +457,9 @@ public class FalsingManager implements SensorEventListener { } public void onTouchEvent(MotionEvent event, int width, int height) { if (event.getAction() == MotionEvent.ACTION_DOWN) { mIsTouchScreen = event.isFromSource(InputDevice.SOURCE_TOUCHSCREEN); } if (mSessionActive && !mBouncerOn) { mDataCollector.onTouchEvent(event, width, height); mHumanInteractionClassifier.onTouchEvent(event); Loading