summaryrefslogtreecommitdiff
path: root/core/java/android/app/ActivityThread.java
diff options
context:
space:
mode:
authorTiger Huang <tigerhuang@google.com>2019-11-06 00:07:56 +0800
committerTiger Huang <tigerhuang@google.com>2019-12-16 17:08:21 +0800
commit4a7835ffb6811e0e38e2b16672a282106d43e1d2 (patch)
tree91026c599b2283ff358856e3d875f4dbdf48ad1c /core/java/android/app/ActivityThread.java
parent74e0e156a3d6f302691f97b94a05dd0a8207fd25 (diff)
Window Manager Flag Migration (7/n)
Introduce new APIs in Window/WindowManager.LayoutParams for developers to decide which types of insets at which side a window should avoid: setFitWindowInsetsTypes(@InsetsType int types) setFitWindowInsetsSides(@InsetsSide int sides) setFitIgnoreVisibility(boolean ignore) The existing logic in DisplayPolicy.layoutWindowLw uses combinations of window types, window flags, and system UI flags to decide what frames a window should have, which is very complex, difficult to maintain, and should be replaced with the new APIs. Bug: 118118435 Test: atest InsetsSourceProviderTest InsetsStateControllerTest InsetsPolicyTest WindowStateTests CommandQueueTest RegisterStatusBarResultTest InsetsFlagsTest LightBarControllerTest RegisterStatusBarResultTest ViewRootImplTest DisplayPolicyLayoutTests DisplayPolicyInsetsTests DisplayPolicyTests TaskSnapshotSurfaceTest Change-Id: I06ddc9d0d2887ba4ded7bb8adbf9c9c0da4bf7b4
Diffstat (limited to 'core/java/android/app/ActivityThread.java')
-rw-r--r--core/java/android/app/ActivityThread.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 5278ab2f9507..9ed6c6a2f91f 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -4407,7 +4407,9 @@ public final class ActivityThread extends ClientTransactionHandler {
r.newConfig = null;
}
if (localLOGV) Slog.v(TAG, "Resuming " + r + " with isForward=" + isForward);
- WindowManager.LayoutParams l = r.window.getAttributes();
+ ViewRootImpl impl = r.window.getDecorView().getViewRootImpl();
+ WindowManager.LayoutParams l = impl != null
+ ? impl.mWindowAttributes : r.window.getAttributes();
if ((l.softInputMode
& WindowManager.LayoutParams.SOFT_INPUT_IS_FORWARD_NAVIGATION)
!= forwardBit) {