Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce60d851 authored by /e/ robot's avatar /e/ robot
Browse files

Merge remote-tracking branch 'origin/lineage-22.2' into a15

parents 406536f7 142099ce
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -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;
@@ -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());
            });
        }