Merge "Relax condition to hide unready IME with fixed rotation" into udc-dev
This commit is contained in:
@@ -364,6 +364,7 @@ class AsyncRotationController extends FadeAnimationController implements Consume
|
|||||||
|
|
||||||
/** Hides the window immediately until it is drawn in new rotation. */
|
/** Hides the window immediately until it is drawn in new rotation. */
|
||||||
void hideImmediately(WindowToken windowToken) {
|
void hideImmediately(WindowToken windowToken) {
|
||||||
|
if (isTargetToken(windowToken)) return;
|
||||||
final boolean original = mHideImmediately;
|
final boolean original = mHideImmediately;
|
||||||
mHideImmediately = true;
|
mHideImmediately = true;
|
||||||
final Operation op = new Operation(Operation.ACTION_FADE);
|
final Operation op = new Operation(Operation.ACTION_FADE);
|
||||||
|
|||||||
@@ -4158,13 +4158,13 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
|
|||||||
|
|
||||||
/** @see WindowManagerInternal#onToggleImeRequested */
|
/** @see WindowManagerInternal#onToggleImeRequested */
|
||||||
void onShowImeRequested() {
|
void onShowImeRequested() {
|
||||||
if (mImeLayeringTarget == null || mInputMethodWindow == null) {
|
if (mInputMethodWindow == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// If IME window will be shown on the rotated activity, share the transformed state to
|
// If IME window will be shown on the rotated activity, share the transformed state to
|
||||||
// IME window so it can compute rotated frame with rotated configuration.
|
// IME window so it can compute rotated frame with rotated configuration.
|
||||||
if (mImeLayeringTarget.mToken.isFixedRotationTransforming()) {
|
if (mFixedRotationLaunchingApp != null) {
|
||||||
mInputMethodWindow.mToken.linkFixedRotationTransform(mImeLayeringTarget.mToken);
|
mInputMethodWindow.mToken.linkFixedRotationTransform(mFixedRotationLaunchingApp);
|
||||||
// Hide the window until the rotation is done to avoid intermediate artifacts if the
|
// Hide the window until the rotation is done to avoid intermediate artifacts if the
|
||||||
// parent surface of IME container is changed.
|
// parent surface of IME container is changed.
|
||||||
if (mAsyncRotationController != null) {
|
if (mAsyncRotationController != null) {
|
||||||
|
|||||||
@@ -2342,9 +2342,11 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onConfigurationChanged(Configuration newParentConfig) {
|
public void onConfigurationChanged(Configuration newParentConfig) {
|
||||||
mTempConfiguration.setTo(getConfiguration());
|
// Get from super to avoid using the updated global config from the override method.
|
||||||
|
final Configuration selfConfiguration = super.getConfiguration();
|
||||||
|
mTempConfiguration.setTo(selfConfiguration);
|
||||||
super.onConfigurationChanged(newParentConfig);
|
super.onConfigurationChanged(newParentConfig);
|
||||||
final int diff = getConfiguration().diff(mTempConfiguration);
|
final int diff = selfConfiguration.diff(mTempConfiguration);
|
||||||
if (diff != 0) {
|
if (diff != 0) {
|
||||||
mLastConfigReportedToClient = false;
|
mLastConfigReportedToClient = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1620,7 +1620,6 @@ public class DisplayContentTests extends WindowTestsBase {
|
|||||||
|
|
||||||
// If the rotated activity requests to show IME, the IME window should use the
|
// If the rotated activity requests to show IME, the IME window should use the
|
||||||
// transformation from activity to lay out in the same orientation.
|
// transformation from activity to lay out in the same orientation.
|
||||||
mDisplayContent.setImeLayeringTarget(mAppWindow);
|
|
||||||
LocalServices.getService(WindowManagerInternal.class).onToggleImeRequested(true /* show */,
|
LocalServices.getService(WindowManagerInternal.class).onToggleImeRequested(true /* show */,
|
||||||
app.token, app.token, mDisplayContent.mDisplayId);
|
app.token, app.token, mDisplayContent.mDisplayId);
|
||||||
assertTrue(asyncRotationController.isTargetToken(mImeWindow.mToken));
|
assertTrue(asyncRotationController.isTargetToken(mImeWindow.mToken));
|
||||||
|
|||||||
Reference in New Issue
Block a user