OSDN Git Service

Always take an activity screenshot when pausing.
authorWale Ogunwale <ogunwale@google.com>
Tue, 9 Dec 2014 22:02:27 +0000 (14:02 -0800)
committerOlawale Ogunwale <ogunwale@google.com>
Wed, 10 Dec 2014 00:44:28 +0000 (00:44 +0000)
commit37f271869ed9c9e9f0e7de7339017e0bb6719780
tree2576e01cc567f5bce748c32fe94cfff8ba5b14e3
parentdad85a6c4bf51c126978d584703a5320be7f396c
Always take an activity screenshot when pausing.

http://ag/261732 introduced an optimization where we only take
the activity screenshot if is is not the activity we took a
screenshot for last. This causes us to display a stale screenshot
for activities that change their display content (using fragments)
without going through the pause/resume cycle. It should be safe
to always take a screenshot when we are pausing since the code
path is only called once per pause/resume cycle.

Bug: 18682160
Change-Id: Ie5c43cfd806286808af4233c5917ae7071908ebb
(cherry picked from commit eacdf2ce04899b0a3abef55e4e7e1fe9c1649932)
services/core/java/com/android/server/am/ActivityStack.java