diff options
| author | 2013-10-06 20:28:07 +0000 | |
|---|---|---|
| committer | 2013-10-06 20:28:07 +0000 | |
| commit | f46bb1d99bc168f1812fdd5aca4282eb37984016 (patch) | |
| tree | 0f420e9da65cea8f0607171cb0c9c9e22ba337ad | |
| parent | febf33fe4b4c20ad8eda9c4ddca53e08e8042397 (diff) | |
| parent | 4d03fe64205e4c2a3d6101b4818ded5b8fa56a0e (diff) | |
Merge "Fix issue #11086275: Thumbnail only created once for top activity" into klp-dev
| -rw-r--r-- | services/java/com/android/server/am/ActivityStack.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java index 10145024a74e..422e2b180a06 100644 --- a/services/java/com/android/server/am/ActivityStack.java +++ b/services/java/com/android/server/am/ActivityStack.java @@ -673,6 +673,14 @@ final class ActivityStack { return null; } + TaskRecord tr = who.task; + if (tr.intent != null && (tr.intent.getFlags() + &Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS) != 0) { + // If this task is being excluded from recents, we don't want to take + // the expense of capturing a thumbnail, since we will never show it. + return null; + } + Resources res = mService.mContext.getResources(); int w = mThumbnailWidth; int h = mThumbnailHeight; @@ -685,6 +693,7 @@ final class ActivityStack { if (w > 0) { if (who != mLastScreenshotActivity || mLastScreenshotBitmap == null + || mLastScreenshotActivity.state == ActivityState.RESUMED || mLastScreenshotBitmap.getWidth() != w || mLastScreenshotBitmap.getHeight() != h) { mLastScreenshotActivity = who; |