Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +0 −22 Original line number Diff line number Diff line Loading @@ -202,7 +202,6 @@ import android.view.Display; import android.view.HapticFeedbackConstants; import android.view.IDisplayFoldListener; import android.view.InputDevice; import android.view.KeyCharacterMap; import android.view.KeyEvent; import android.view.KeyboardShortcutGroup; import android.view.MotionEvent; Loading Loading @@ -3739,27 +3738,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { msg.sendToTarget(); } @SuppressLint("MissingPermission") private void injectBackGesture(long downtime, int displayId) { // Create and inject down event KeyEvent downEvent = new KeyEvent(downtime, downtime, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK, 0 /* repeat */, 0 /* metaState */, KeyCharacterMap.VIRTUAL_KEYBOARD, 0 /* scancode */, KeyEvent.FLAG_FROM_SYSTEM | KeyEvent.FLAG_VIRTUAL_HARD_KEY, InputDevice.SOURCE_KEYBOARD); downEvent.setDisplayId(displayId); mInputManager.injectInputEvent(downEvent, InputManager.INJECT_INPUT_EVENT_MODE_ASYNC); // Create and inject up event KeyEvent upEvent = KeyEvent.changeAction(downEvent, KeyEvent.ACTION_UP); upEvent.setDisplayId(displayId); mInputManager.injectInputEvent(upEvent, InputManager.INJECT_INPUT_EVENT_MODE_ASYNC); downEvent.recycle(); upEvent.recycle(); } private boolean handleHomeShortcuts(IBinder focusedToken, KeyEvent event) { // First we always handle the home key here, so applications // can never break it, although if keyguard is on, we do let Loading services/core/java/com/android/server/wm/BackNavigationController.java +0 −33 Original line number Diff line number Diff line Loading @@ -91,8 +91,6 @@ class BackNavigationController { private boolean mShowWallpaper; private Runnable mPendingAnimation; private final NavigationMonitor mNavigationMonitor = new NavigationMonitor(); private RemoteCallback mGestureRequest; private AnimationHandler mAnimationHandler; private final ArrayList<WindowContainer> mTmpOpenApps = new ArrayList<>(); Loading Loading @@ -120,37 +118,6 @@ class BackNavigationController { mNavigationMonitor.onEmbeddedWindowGestureTransferred(host); } void registerBackGestureDelegate(@NonNull RemoteCallback requestObserver) { if (!sPredictBackEnable) { return; } synchronized (mWindowManagerService.mGlobalLock) { mGestureRequest = requestObserver; try { requestObserver.getInterface().asBinder().linkToDeath(() -> { synchronized (mWindowManagerService.mGlobalLock) { mGestureRequest = null; } }, 0 /* flags */); } catch (RemoteException r) { Slog.e(TAG, "Failed to link to death"); mGestureRequest = null; } } } boolean requestBackGesture(int displayId) { synchronized (mWindowManagerService.mGlobalLock) { if (mGestureRequest == null) { return false; } final Bundle result = new Bundle(); result.putInt(BackNavigationInfo.KEY_DISPLAY_ID, displayId); mGestureRequest.sendResult(result); return true; } } /** * Set up the necessary leashes and build a {@link BackNavigationInfo} instance for an upcoming * back gesture animation. Loading Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +0 −22 Original line number Diff line number Diff line Loading @@ -202,7 +202,6 @@ import android.view.Display; import android.view.HapticFeedbackConstants; import android.view.IDisplayFoldListener; import android.view.InputDevice; import android.view.KeyCharacterMap; import android.view.KeyEvent; import android.view.KeyboardShortcutGroup; import android.view.MotionEvent; Loading Loading @@ -3739,27 +3738,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { msg.sendToTarget(); } @SuppressLint("MissingPermission") private void injectBackGesture(long downtime, int displayId) { // Create and inject down event KeyEvent downEvent = new KeyEvent(downtime, downtime, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK, 0 /* repeat */, 0 /* metaState */, KeyCharacterMap.VIRTUAL_KEYBOARD, 0 /* scancode */, KeyEvent.FLAG_FROM_SYSTEM | KeyEvent.FLAG_VIRTUAL_HARD_KEY, InputDevice.SOURCE_KEYBOARD); downEvent.setDisplayId(displayId); mInputManager.injectInputEvent(downEvent, InputManager.INJECT_INPUT_EVENT_MODE_ASYNC); // Create and inject up event KeyEvent upEvent = KeyEvent.changeAction(downEvent, KeyEvent.ACTION_UP); upEvent.setDisplayId(displayId); mInputManager.injectInputEvent(upEvent, InputManager.INJECT_INPUT_EVENT_MODE_ASYNC); downEvent.recycle(); upEvent.recycle(); } private boolean handleHomeShortcuts(IBinder focusedToken, KeyEvent event) { // First we always handle the home key here, so applications // can never break it, although if keyguard is on, we do let Loading
services/core/java/com/android/server/wm/BackNavigationController.java +0 −33 Original line number Diff line number Diff line Loading @@ -91,8 +91,6 @@ class BackNavigationController { private boolean mShowWallpaper; private Runnable mPendingAnimation; private final NavigationMonitor mNavigationMonitor = new NavigationMonitor(); private RemoteCallback mGestureRequest; private AnimationHandler mAnimationHandler; private final ArrayList<WindowContainer> mTmpOpenApps = new ArrayList<>(); Loading Loading @@ -120,37 +118,6 @@ class BackNavigationController { mNavigationMonitor.onEmbeddedWindowGestureTransferred(host); } void registerBackGestureDelegate(@NonNull RemoteCallback requestObserver) { if (!sPredictBackEnable) { return; } synchronized (mWindowManagerService.mGlobalLock) { mGestureRequest = requestObserver; try { requestObserver.getInterface().asBinder().linkToDeath(() -> { synchronized (mWindowManagerService.mGlobalLock) { mGestureRequest = null; } }, 0 /* flags */); } catch (RemoteException r) { Slog.e(TAG, "Failed to link to death"); mGestureRequest = null; } } } boolean requestBackGesture(int displayId) { synchronized (mWindowManagerService.mGlobalLock) { if (mGestureRequest == null) { return false; } final Bundle result = new Bundle(); result.putInt(BackNavigationInfo.KEY_DISPLAY_ID, displayId); mGestureRequest.sendResult(result); return true; } } /** * Set up the necessary leashes and build a {@link BackNavigationInfo} instance for an upcoming * back gesture animation. Loading