Loading packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java +6 −3 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ import android.view.KeyCharacterMap; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.Surface; import android.view.ViewConfiguration; import android.view.accessibility.AccessibilityManager; import android.view.inputmethod.Flags; import android.view.inputmethod.InputMethodManager; Loading Loading @@ -312,9 +313,11 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis @Override public void injectLongPress(int keyCode) throws RemoteException { verifyCallerAndClearCallingIdentityPostMain("longPressInjected", () -> { sendEvent(KeyEvent.ACTION_DOWN, keyCode, 0, KeyEvent.FLAG_LONG_PRESS); sendEvent(KeyEvent.ACTION_DOWN, keyCode, 0, 0); mHandler.postDelayed(() -> { sendEvent(KeyEvent.ACTION_DOWN, keyCode, 1, KeyEvent.FLAG_LONG_PRESS); sendEvent(KeyEvent.ACTION_UP, keyCode, 1, KeyEvent.FLAG_LONG_PRESS); sendEvent(KeyEvent.ACTION_UP, keyCode, 0, KeyEvent.FLAG_CANCELED); }, ViewConfiguration.getLongPressTimeout()); }); } Loading Loading
packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java +6 −3 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ import android.view.KeyCharacterMap; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.Surface; import android.view.ViewConfiguration; import android.view.accessibility.AccessibilityManager; import android.view.inputmethod.Flags; import android.view.inputmethod.InputMethodManager; Loading Loading @@ -312,9 +313,11 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis @Override public void injectLongPress(int keyCode) throws RemoteException { verifyCallerAndClearCallingIdentityPostMain("longPressInjected", () -> { sendEvent(KeyEvent.ACTION_DOWN, keyCode, 0, KeyEvent.FLAG_LONG_PRESS); sendEvent(KeyEvent.ACTION_DOWN, keyCode, 0, 0); mHandler.postDelayed(() -> { sendEvent(KeyEvent.ACTION_DOWN, keyCode, 1, KeyEvent.FLAG_LONG_PRESS); sendEvent(KeyEvent.ACTION_UP, keyCode, 1, KeyEvent.FLAG_LONG_PRESS); sendEvent(KeyEvent.ACTION_UP, keyCode, 0, KeyEvent.FLAG_CANCELED); }, ViewConfiguration.getLongPressTimeout()); }); } Loading