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

Commit 9557e44e authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Restore IME visibility based on WindowState / requestedVisibleTypes" into main

parents 6df6f068 c929daed
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -235,3 +235,10 @@ flag {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
  name: "disable_ime_restore_on_activity_create"
  namespace: "input_method"
  description: "Disables restoring the IME visibility after activity recreation (e.g. rotation), without an explicit show request."
  bug: "391859600"
}
+9 −3
Original line number Diff line number Diff line
@@ -10023,10 +10023,16 @@ public class WindowManagerService extends IWindowManager.Stub
            if (imeTargetWindowTask == null) {
                return false;
            }
            if (android.view.inputmethod.Flags.disableImeRestoreOnActivityCreate()) {
                if (imeTargetWindow.isRequestedVisible(WindowInsets.Type.ime())) {
                    return true;
                }
            } else {
                if (imeTargetWindow.mActivityRecord != null
                        && imeTargetWindow.mActivityRecord.mLastImeShown) {
                    return true;
                }
            }
            final TaskSnapshot snapshot = mTaskSnapshotController.getSnapshot(
                    imeTargetWindowTask.mTaskId, false /* isLowResolution */);
            return snapshot != null && snapshot.hasImeSurface();