Loading quickstep/src/com/android/quickstep/InputConsumer.java +2 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,8 @@ public interface InputConsumer { default void onMotionEvent(MotionEvent ev) { } default void onHoverEvent(MotionEvent ev) { } default void onKeyEvent(KeyEvent ev) { } default void onInputEvent(InputEvent ev) { Loading quickstep/src/com/android/quickstep/inputconsumers/OverviewInputConsumer.java +7 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,13 @@ public class OverviewInputConsumer<S extends BaseState<S>, T extends StatefulAct } } @Override public void onHoverEvent(MotionEvent ev) { if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { mActivity.dispatchGenericMotionEvent(ev); } } @Override public void onKeyEvent(KeyEvent ev) { if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { Loading quickstep/src/com/android/quickstep/util/InputConsumerProxy.java +19 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,16 @@ public class InputConsumerProxy { private boolean onInputConsumerEvent(InputEvent ev) { if (ev instanceof MotionEvent) { onInputConsumerMotionEvent((MotionEvent) ev); MotionEvent event = (MotionEvent) ev; int action = event.getActionMasked(); boolean isHoverEvent = action == MotionEvent.ACTION_HOVER_ENTER || action == MotionEvent.ACTION_HOVER_MOVE || action == MotionEvent.ACTION_HOVER_EXIT; if (isHoverEvent) { onInputConsumerHoverEvent(event); } else { onInputConsumerMotionEvent(event); } } else if (ev instanceof KeyEvent) { initInputConsumerIfNeeded(); mInputConsumer.onKeyEvent((KeyEvent) ev); Loading Loading @@ -113,6 +122,15 @@ public class InputConsumerProxy { return true; } private void onInputConsumerHoverEvent(MotionEvent ev) { initInputConsumerIfNeeded(); if (mInputConsumer != null) { SimpleOrientationTouchTransformer.INSTANCE.get(mContext).transform(ev, mRotationSupplier.get()); mInputConsumer.onHoverEvent(ev); } } public void destroy() { if (mTouchInProgress) { mDestroyPending = true; Loading Loading
quickstep/src/com/android/quickstep/InputConsumer.java +2 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,8 @@ public interface InputConsumer { default void onMotionEvent(MotionEvent ev) { } default void onHoverEvent(MotionEvent ev) { } default void onKeyEvent(KeyEvent ev) { } default void onInputEvent(InputEvent ev) { Loading
quickstep/src/com/android/quickstep/inputconsumers/OverviewInputConsumer.java +7 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,13 @@ public class OverviewInputConsumer<S extends BaseState<S>, T extends StatefulAct } } @Override public void onHoverEvent(MotionEvent ev) { if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { mActivity.dispatchGenericMotionEvent(ev); } } @Override public void onKeyEvent(KeyEvent ev) { if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { Loading
quickstep/src/com/android/quickstep/util/InputConsumerProxy.java +19 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,16 @@ public class InputConsumerProxy { private boolean onInputConsumerEvent(InputEvent ev) { if (ev instanceof MotionEvent) { onInputConsumerMotionEvent((MotionEvent) ev); MotionEvent event = (MotionEvent) ev; int action = event.getActionMasked(); boolean isHoverEvent = action == MotionEvent.ACTION_HOVER_ENTER || action == MotionEvent.ACTION_HOVER_MOVE || action == MotionEvent.ACTION_HOVER_EXIT; if (isHoverEvent) { onInputConsumerHoverEvent(event); } else { onInputConsumerMotionEvent(event); } } else if (ev instanceof KeyEvent) { initInputConsumerIfNeeded(); mInputConsumer.onKeyEvent((KeyEvent) ev); Loading Loading @@ -113,6 +122,15 @@ public class InputConsumerProxy { return true; } private void onInputConsumerHoverEvent(MotionEvent ev) { initInputConsumerIfNeeded(); if (mInputConsumer != null) { SimpleOrientationTouchTransformer.INSTANCE.get(mContext).transform(ev, mRotationSupplier.get()); mInputConsumer.onHoverEvent(ev); } } public void destroy() { if (mTouchInProgress) { mDestroyPending = true; Loading