OSDN Git Service

Ensure home activity always is on home stack.
authorBryce Lee <brycelee@google.com>
Mon, 17 Jul 2017 17:39:24 +0000 (10:39 -0700)
committerBryce Lee <brycelee@google.com>
Mon, 17 Jul 2017 21:32:58 +0000 (14:32 -0700)
commit4ff7da964737331b65419f6f91cad7693f3265fc
tree4ae66a7fee69ef8d8f18df256b60664df78f8f7a
parent2ecc1988771caed870ba2b7bfd069e68d53f2adb
Ensure home activity always is on home stack.

It is possible to start a home activity on a non-home stack. For
example, an activity that handles the home intent may be started with
via a different intent, landing it on the fullscreen stack. This
becomes problematic later on due to our assumptions about the home
stack state and handling of tasks within it.

To ensure proper behavior, this changelist moves the activity
handling the home intent to the home stack if it is not already
present there.

Fixes: 36606833
Test: Move home activity to fullscreen stack, launch another
      activity, press home button.
Test: go/wm-smoke

Change-Id: If88550a24dca3eabc0c60940937e6a1e6f133cae
services/core/java/com/android/server/am/ActivityStarter.java