Merge "Make an exception for screenshot optimization." into klp-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ab3276ddd9
@@ -6640,6 +6640,10 @@ public final class ActivityManagerService extends ActivityManagerNative
|
||||
return list;
|
||||
}
|
||||
|
||||
TaskRecord getMostRecentTask() {
|
||||
return mRecentTasks.get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ActivityManager.RecentTaskInfo> getRecentTasks(int maxNum,
|
||||
int flags, int userId) {
|
||||
|
||||
@@ -674,8 +674,8 @@ final class ActivityStack {
|
||||
}
|
||||
|
||||
TaskRecord tr = who.task;
|
||||
if (tr.intent != null && (tr.intent.getFlags()
|
||||
&Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS) != 0) {
|
||||
if (mService.getMostRecentTask() != tr && 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;
|
||||
|
||||
Reference in New Issue
Block a user