OSDN Git Service

Ensure visible activities when device is unlocked.
authorWale Ogunwale <ogunwale@google.com>
Mon, 10 Apr 2017 16:50:21 +0000 (09:50 -0700)
committerWale Ogunwale <ogunwale@google.com>
Tue, 11 Apr 2017 18:13:04 +0000 (11:13 -0700)
commit7004a8801d0a60013681a86043bab74b4d42d680
tree5009e5e8c1087df12357cd3a3eafa144157e8143
parent2d008a5fc11f607943235cacfaf523eb403b52f2
Ensure visible activities when device is unlocked.

When the device is locked we transition all activities to the stopped
state. However, we were only resuming the activity in the focused stack
when the device is unlocked. We now:
- Ensure all visible acitvities when the device is unlocked regardless
of stack.
- If the activity is marked as visible, but in the STOPPED state, we go
ahead and restart it.
- Correctly set ActivityRecord.stopped to false when we restart an
activity into the PAUSED state.

Fixes: 37119770
Bug: 37244415
Test: Make sure docked activity state isn't STOPPED when device is
unlocked.

Change-Id: I1498eeddaa3c1f5dd5135dca56271ffc22b704f2
services/core/java/com/android/server/am/ActivityStack.java
services/core/java/com/android/server/am/ActivityStackSupervisor.java