OSDN Git Service

Fix window disappearing when docking a second app
authorChong Zhang <chz@google.com>
Thu, 3 Dec 2015 23:36:21 +0000 (15:36 -0800)
committerChong Zhang <chz@google.com>
Fri, 4 Dec 2015 00:02:34 +0000 (00:02 +0000)
commit48a87a542684bcfd4d5356c7489f9f5f37510c71
tree003c85d4ece060d6e83a8e608b75a2d6cec5da06
parentac7579a6e5cb8302f38ebe2fc8fbcb6812621402
Fix window disappearing when docking a second app

When moving app1 to docked stack, the app2 is resized while in background
(fullscreen stack). Because of the config change, mWillReplaceWindow is
marked true. But since the app2 is in GONE state, all updates of mFrame
are skipped. When it's made visible again, because mWillReplaceWindow is
set, update of mFrame in computeFrameLw() is still skipped, resulting in
wrong mFrame being used.

The fix here is to not set mWillReplaceWindow if the app is not visible,
as we don't need to preserve old window.

Also fix position change check.

bug: 25937471
Change-Id: Iea506296ebd5c2a108368fb2d1d77cdc31a36cdc
services/core/java/com/android/server/wm/Task.java
services/core/java/com/android/server/wm/WindowManagerService.java