OSDN Git Service

Prevent IME from targeting home when closing app is still animating
authorchaviw <chaviw@google.com>
Fri, 11 May 2018 16:32:22 +0000 (09:32 -0700)
committerchaviw <chaviw@google.com>
Fri, 11 May 2018 22:21:19 +0000 (15:21 -0700)
commit5e004f2798c81a0d24d4416afc5680ac0d6f4fe1
treefa8995494dd4ec5a2edb08d5895bcc40c470fcad
parent9743fae2d97909f83e9f3a1338f7811bce95f120
Prevent IME from targeting home when closing app is still animating

There were a few issues that caused the IME target to get set to home.
1. Home is considered above the other apps since it's getting launched.
However, the visual representation is actually below the closing app.
IME tries to target the highest app, but it's not necessarily the
highest visual app
2. computeIme was called before all apps were set up. This caused the
IME target to get recomputed before adding the closing apps
3. The condition for a WS.isClosing was based on previous versions so
it was incorrect

Test: IME closes on top of current target when going home with IME open
Change-Id: Id3bee8b8b6c0fba98159b65784b4b8c5b66c27fb
Fixes: 78214125
services/core/java/com/android/server/am/ActivityDisplay.java
services/core/java/com/android/server/am/ActivityStack.java
services/core/java/com/android/server/wm/DisplayContent.java
services/core/java/com/android/server/wm/DisplayWindowController.java
services/core/java/com/android/server/wm/WindowState.java