Loading core/java/android/app/IActivityTaskManager.aidl +4 −1 Original line number Diff line number Diff line Loading @@ -269,7 +269,10 @@ interface IActivityTaskManager { * task snapshot cache only if requested. * * @param taskId the id of the task to take a snapshot of * @param updateCache whether to store the new snapshot in the system's task snapshot cache * @param updateCache Whether to store the new snapshot in the system's task snapshot cache. * If it is true, the snapshot can be either real content or app-theme mode * depending on the attributes of app. Otherwise, the snapshot will be taken * with real content. * @return a graphic buffer representing a screenshot of a task */ android.window.TaskSnapshot takeTaskSnapshot(int taskId, boolean updateCache); Loading services/core/java/com/android/server/wm/ActivityTaskManagerService.java +5 −1 Original line number Diff line number Diff line Loading @@ -3859,10 +3859,14 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { Slog.w(TAG, "takeTaskSnapshot: taskId=" + taskId + " not found or not visible"); return null; } // Note that if updateCache is true, ActivityRecord#shouldUseAppThemeSnapshot will // be used to decide whether the task is allowed to be captured because that may // be retrieved by recents. While if updateCache is false, the real snapshot will // always be taken and the snapshot won't be put into SnapshotPersister. if (updateCache) { return mWindowManager.mTaskSnapshotController.recordSnapshot(task); } else { return mWindowManager.mTaskSnapshotController.captureSnapshot(task); return mWindowManager.mTaskSnapshotController.snapshot(task); } } } finally { Loading Loading
core/java/android/app/IActivityTaskManager.aidl +4 −1 Original line number Diff line number Diff line Loading @@ -269,7 +269,10 @@ interface IActivityTaskManager { * task snapshot cache only if requested. * * @param taskId the id of the task to take a snapshot of * @param updateCache whether to store the new snapshot in the system's task snapshot cache * @param updateCache Whether to store the new snapshot in the system's task snapshot cache. * If it is true, the snapshot can be either real content or app-theme mode * depending on the attributes of app. Otherwise, the snapshot will be taken * with real content. * @return a graphic buffer representing a screenshot of a task */ android.window.TaskSnapshot takeTaskSnapshot(int taskId, boolean updateCache); Loading
services/core/java/com/android/server/wm/ActivityTaskManagerService.java +5 −1 Original line number Diff line number Diff line Loading @@ -3859,10 +3859,14 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { Slog.w(TAG, "takeTaskSnapshot: taskId=" + taskId + " not found or not visible"); return null; } // Note that if updateCache is true, ActivityRecord#shouldUseAppThemeSnapshot will // be used to decide whether the task is allowed to be captured because that may // be retrieved by recents. While if updateCache is false, the real snapshot will // always be taken and the snapshot won't be put into SnapshotPersister. if (updateCache) { return mWindowManager.mTaskSnapshotController.recordSnapshot(task); } else { return mWindowManager.mTaskSnapshotController.captureSnapshot(task); return mWindowManager.mTaskSnapshotController.snapshot(task); } } } finally { Loading