Loading packages/SystemUI/src/com/android/systemui/classifier/FalsingManager.java +14 −4 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ public class FalsingManager implements SensorEventListener { private boolean mEnforceBouncer = false; private boolean mBouncerOn = false; private boolean mBouncerOffOnDown = false; private boolean mSessionActive = false; private boolean mIsTouchScreen = true; private int mState = StatusBarState.SHADE; Loading Loading @@ -459,12 +460,21 @@ 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 the bouncer was not shown during the down event, // we want the entire gesture going to HumanInteractionClassifier mBouncerOffOnDown = !mBouncerOn; } if (mSessionActive && !mBouncerOn) { if (mSessionActive) { if (!mBouncerOn) { // In case bouncer is "visible", but onFullyShown has not yet been called, // avoid adding the event to DataCollector mDataCollector.onTouchEvent(event, width, height); } if (mBouncerOffOnDown) { mHumanInteractionClassifier.onTouchEvent(event); } } } public void dump(PrintWriter pw) { pw.println("FALSING MANAGER"); Loading Loading
packages/SystemUI/src/com/android/systemui/classifier/FalsingManager.java +14 −4 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ public class FalsingManager implements SensorEventListener { private boolean mEnforceBouncer = false; private boolean mBouncerOn = false; private boolean mBouncerOffOnDown = false; private boolean mSessionActive = false; private boolean mIsTouchScreen = true; private int mState = StatusBarState.SHADE; Loading Loading @@ -459,12 +460,21 @@ 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 the bouncer was not shown during the down event, // we want the entire gesture going to HumanInteractionClassifier mBouncerOffOnDown = !mBouncerOn; } if (mSessionActive && !mBouncerOn) { if (mSessionActive) { if (!mBouncerOn) { // In case bouncer is "visible", but onFullyShown has not yet been called, // avoid adding the event to DataCollector mDataCollector.onTouchEvent(event, width, height); } if (mBouncerOffOnDown) { mHumanInteractionClassifier.onTouchEvent(event); } } } public void dump(PrintWriter pw) { pw.println("FALSING MANAGER"); Loading