OSDN Git Service

Prevent NPEs when no focusable stack.
authorlumark <lumark@google.com>
Fri, 15 Jun 2018 07:43:12 +0000 (15:43 +0800)
committerMing-Shin Lu <lumark@google.com>
Tue, 19 Jun 2018 03:09:17 +0000 (03:09 +0000)
commitf6c4a9868cf92c292ddac05b4237ec12a78410e9
tree1036a1d4fcd7699c8be32c9fecb62bb020754f6b
parent1a61e0ea1d13f622ca2787e3c1f38a6df0076c1b
Prevent NPEs when no focusable stack.

Fallback to home stack when no focusable stack
(e.g. launcher force stopped & enter PIP mode with no other app task),
Fix NPEs for logWindowState & getTopRunningActivity from null stack.

Change-Id: I0a0134661dfc20ff844a0bc19ce6833242f4a865
Fixes: 110078217
Test: Manual
Test: atest ActivityStackSupervisorTests ActivityStackTests ActivityStarterTests
services/core/java/com/android/server/am/ActivityMetricsLogger.java
services/core/java/com/android/server/am/ActivityStackSupervisor.java