Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +4 −15 Original line number Original line Diff line number Diff line Loading @@ -223,9 +223,8 @@ import android.view.animation.Animation; import android.view.animation.AnimationSet; import android.view.animation.AnimationSet; import android.view.animation.AnimationUtils; import android.view.animation.AnimationUtils; import android.view.inputmethod.InputMethodManagerInternal; import android.view.inputmethod.InputMethodManagerInternal; import android.widget.ImageView; import com.android.internal.R; import com.android.internal.R; import com.android.internal.annotations.GuardedBy; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.MetricsLogger; import com.android.internal.policy.IKeyguardDismissCallback; import com.android.internal.policy.IKeyguardDismissCallback; import com.android.internal.policy.IShortcutService; import com.android.internal.policy.IShortcutService; Loading Loading @@ -497,9 +496,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { WindowState mLastInputMethodWindow = null; WindowState mLastInputMethodWindow = null; WindowState mLastInputMethodTargetWindow = null; WindowState mLastInputMethodTargetWindow = null; @GuardedBy("mLock") private boolean mDismissImeOnBackKeyPressed; // FIXME This state is shared between the input reader and handler thread. // FIXME This state is shared between the input reader and handler thread. // Technically it's broken and buggy but it has been like this for many years // Technically it's broken and buggy but it has been like this for many years // and we have not yet seen any problems. Someday we'll rewrite this logic // and we have not yet seen any problems. Someday we'll rewrite this logic Loading @@ -519,6 +515,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { volatile boolean mPictureInPictureVisible; volatile boolean mPictureInPictureVisible; // Written by vr manager thread, only read in this class // Written by vr manager thread, only read in this class volatile boolean mPersistentVrModeEnabled; volatile boolean mPersistentVrModeEnabled; volatile private boolean mDismissImeOnBackKeyPressed; // Used to hold the last user key used to wake the device. This helps us prevent up events // Used to hold the last user key used to wake the device. This helps us prevent up events // from being passed to the foregrounded app without a corresponding down event // from being passed to the foregrounded app without a corresponding down event Loading Loading @@ -1403,13 +1400,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { launchHomeFromHotKey(true /* awakenFromDreams */, false /*respectKeyguard*/); launchHomeFromHotKey(true /* awakenFromDreams */, false /*respectKeyguard*/); break; break; case SHORT_PRESS_POWER_CLOSE_IME_OR_GO_HOME: { case SHORT_PRESS_POWER_CLOSE_IME_OR_GO_HOME: { final boolean dismissImeOnBackKeyPressed; if (mDismissImeOnBackKeyPressed) { // We can be here on both the main thread (via mHandler) and native callback // thread (from interceptPowerKeyUp via WindowManagerCallbacks). synchronized (mLock) { dismissImeOnBackKeyPressed = mDismissImeOnBackKeyPressed; } if (dismissImeOnBackKeyPressed) { if (mInputMethodManagerInternal == null) { if (mInputMethodManagerInternal == null) { mInputMethodManagerInternal = mInputMethodManagerInternal = LocalServices.getService(InputMethodManagerInternal.class); LocalServices.getService(InputMethodManagerInternal.class); Loading Loading @@ -7983,10 +7974,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override @Override public void setDismissImeOnBackKeyPressed(boolean newValue) { public void setDismissImeOnBackKeyPressed(boolean newValue) { synchronized (mLock) { mDismissImeOnBackKeyPressed = newValue; mDismissImeOnBackKeyPressed = newValue; } } } @Override @Override public int getInputMethodWindowVisibleHeightLw() { public int getInputMethodWindowVisibleHeightLw() { Loading Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +4 −15 Original line number Original line Diff line number Diff line Loading @@ -223,9 +223,8 @@ import android.view.animation.Animation; import android.view.animation.AnimationSet; import android.view.animation.AnimationSet; import android.view.animation.AnimationUtils; import android.view.animation.AnimationUtils; import android.view.inputmethod.InputMethodManagerInternal; import android.view.inputmethod.InputMethodManagerInternal; import android.widget.ImageView; import com.android.internal.R; import com.android.internal.R; import com.android.internal.annotations.GuardedBy; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.MetricsLogger; import com.android.internal.policy.IKeyguardDismissCallback; import com.android.internal.policy.IKeyguardDismissCallback; import com.android.internal.policy.IShortcutService; import com.android.internal.policy.IShortcutService; Loading Loading @@ -497,9 +496,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { WindowState mLastInputMethodWindow = null; WindowState mLastInputMethodWindow = null; WindowState mLastInputMethodTargetWindow = null; WindowState mLastInputMethodTargetWindow = null; @GuardedBy("mLock") private boolean mDismissImeOnBackKeyPressed; // FIXME This state is shared between the input reader and handler thread. // FIXME This state is shared between the input reader and handler thread. // Technically it's broken and buggy but it has been like this for many years // Technically it's broken and buggy but it has been like this for many years // and we have not yet seen any problems. Someday we'll rewrite this logic // and we have not yet seen any problems. Someday we'll rewrite this logic Loading @@ -519,6 +515,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { volatile boolean mPictureInPictureVisible; volatile boolean mPictureInPictureVisible; // Written by vr manager thread, only read in this class // Written by vr manager thread, only read in this class volatile boolean mPersistentVrModeEnabled; volatile boolean mPersistentVrModeEnabled; volatile private boolean mDismissImeOnBackKeyPressed; // Used to hold the last user key used to wake the device. This helps us prevent up events // Used to hold the last user key used to wake the device. This helps us prevent up events // from being passed to the foregrounded app without a corresponding down event // from being passed to the foregrounded app without a corresponding down event Loading Loading @@ -1403,13 +1400,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { launchHomeFromHotKey(true /* awakenFromDreams */, false /*respectKeyguard*/); launchHomeFromHotKey(true /* awakenFromDreams */, false /*respectKeyguard*/); break; break; case SHORT_PRESS_POWER_CLOSE_IME_OR_GO_HOME: { case SHORT_PRESS_POWER_CLOSE_IME_OR_GO_HOME: { final boolean dismissImeOnBackKeyPressed; if (mDismissImeOnBackKeyPressed) { // We can be here on both the main thread (via mHandler) and native callback // thread (from interceptPowerKeyUp via WindowManagerCallbacks). synchronized (mLock) { dismissImeOnBackKeyPressed = mDismissImeOnBackKeyPressed; } if (dismissImeOnBackKeyPressed) { if (mInputMethodManagerInternal == null) { if (mInputMethodManagerInternal == null) { mInputMethodManagerInternal = mInputMethodManagerInternal = LocalServices.getService(InputMethodManagerInternal.class); LocalServices.getService(InputMethodManagerInternal.class); Loading Loading @@ -7983,10 +7974,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override @Override public void setDismissImeOnBackKeyPressed(boolean newValue) { public void setDismissImeOnBackKeyPressed(boolean newValue) { synchronized (mLock) { mDismissImeOnBackKeyPressed = newValue; mDismissImeOnBackKeyPressed = newValue; } } } @Override @Override public int getInputMethodWindowVisibleHeightLw() { public int getInputMethodWindowVisibleHeightLw() { Loading