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

Commit 91dff14a authored by Chong Zhang's avatar Chong Zhang Committed by android-build-merger
Browse files

Merge "Dispose HideNavInputEventReceiver on PhoneWindowManager\'s handler"...

Merge "Dispose HideNavInputEventReceiver on PhoneWindowManager\'s handler" into nyc-dev am: 1f170dde
am: 87410659

* commit '87410659':
  Dispose HideNavInputEventReceiver on PhoneWindowManager's handler

Change-Id: I752f78ef3435003983a9552835b1ba1a270b29e4
parents 2be235c7 87410659
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -716,6 +716,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
    private static final int MSG_REQUEST_TRANSIENT_BARS = 16;
    private static final int MSG_SHOW_TV_PICTURE_IN_PICTURE_MENU = 17;
    private static final int MSG_BACK_LONG_PRESS = 18;
    private static final int MSG_DISPOSE_INPUT_CONSUMER = 19;

    private static final int MSG_REQUEST_TRANSIENT_BARS_ARG_STATUS = 0;
    private static final int MSG_REQUEST_TRANSIENT_BARS_ARG_NAVIGATION = 1;
@@ -783,6 +784,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                case MSG_BACK_LONG_PRESS:
                    backLongPress();
                    break;
                case MSG_DISPOSE_INPUT_CONSUMER:
                    disposeInputConsumer((InputConsumer) msg.obj);
                    break;
            }
        }
    }
@@ -1260,6 +1264,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        }
    }

    private void disposeInputConsumer(InputConsumer inputConsumer) {
        if (inputConsumer != null) {
            inputConsumer.dismiss();
        }
    }

    private void sleepPress(long eventTime) {
        if (mShortPressOnSleepBehavior == SHORT_PRESS_SLEEP_GO_TO_SLEEP_AND_GO_HOME) {
            launchHomeFromHotKey(false /* awakenDreams */, true /*respectKeyguard*/);
@@ -3738,6 +3748,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                        // When the user taps down, we re-show the nav bar.
                        boolean changed = false;
                        synchronized (mWindowManagerFuncs.getWindowManagerLock()) {
                            if (mInputConsumer == null) {
                                return;
                            }
                            // Any user activity always causes us to show the
                            // navigation controls, if they had been hidden.
                            // We also clear the low profile and only content
@@ -3991,7 +4004,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            // bar and ensure the application doesn't see the event.
            if (navVisible || navAllowedHidden) {
                if (mInputConsumer != null) {
                    mInputConsumer.dismiss();
                    mHandler.sendMessage(
                            mHandler.obtainMessage(MSG_DISPOSE_INPUT_CONSUMER, mInputConsumer));
                    mInputConsumer = null;
                }
            } else if (mInputConsumer == null) {