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

This commit is contained in:
Arthur Hung
2020-02-03 06:53:16 +00:00
committed by Android (Google) Code Review
2 changed files with 9 additions and 7 deletions

View File

@@ -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

View File

@@ -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)