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

Commit 30adda5c authored by Vaibhav Devmurari's avatar Vaibhav Devmurari
Browse files

Fix: unnecessary shortcut data and observer setup

KeyGestureController pipeline is active only under flag,
so don't load system shortcuts and bookmarks if KGC flag
is diabled.

Bug: 378584728
Test: atest InputTests
Flag: com.android.hardware.input.use_key_gesture_event_handler
Change-Id: I17f7949b3c4dbfe119a4fd85444cbe5dc3e32c87
parent a7367583
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -623,10 +623,11 @@ public class InputManagerService extends IInputManager.Stub
        mKeyRemapper.systemRunning();
        mPointerIconCache.systemRunning();
        mKeyboardGlyphManager.systemRunning();
        if (useKeyGestureEventHandler()) {
            mKeyGestureController.systemRunning();

            initKeyGestures();
        }
    }

    private void reloadDeviceAliases() {
        if (DEBUG) {
@@ -2608,9 +2609,6 @@ public class InputManagerService extends IInputManager.Stub
    }

    private void initKeyGestures() {
        if (!useKeyGestureEventHandler()) {
            return;
        }
        InputManager im = Objects.requireNonNull(mContext.getSystemService(InputManager.class));
        im.registerKeyGestureEventHandler(new InputManager.KeyGestureEventHandler() {
            @Override