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

Commit e3ada502 authored by Arthur Hung's avatar Arthur Hung Committed by Android (Google) Code Review
Browse files

Merge "Fix InTouchMode is not consistent between WMS and InputFlinger"

parents 40cb0e77 6d1b7c53
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -238,16 +238,12 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient {

    @Override
    public void setInTouchMode(boolean mode) {
        synchronized (mService.mGlobalLock) {
            mService.mInTouchMode = mode;
        }
        mService.setInTouchMode(mode);
    }

    @Override
    public boolean getInTouchMode() {
        synchronized (mService.mGlobalLock) {
            return mService.mInTouchMode;
        }
        return mService.getInTouchMode();
    }

    @Override
+7 −1
Original line number Diff line number Diff line
@@ -938,7 +938,7 @@ public class WindowManagerService extends IWindowManager.Stub
     * Whether the UI is currently running in touch mode (not showing
     * navigational focus because the user is directly pressing the screen).
     */
    boolean mInTouchMode;
    private boolean mInTouchMode;

    private ViewServer mViewServer;
    final ArrayList<WindowChangeListener> mWindowChangeListeners = new ArrayList<>();
@@ -3461,6 +3461,12 @@ public class WindowManagerService extends IWindowManager.Stub
        mInputManager.setInTouchMode(mode);
    }

    boolean getInTouchMode() {
        synchronized (mGlobalLock) {
            return mInTouchMode;
        }
    }

    public void showEmulatorDisplayOverlayIfNeeded() {
        if (mContext.getResources().getBoolean(
                com.android.internal.R.bool.config_windowEnableCircularEmulatorDisplayOverlay)