Loading services/core/java/com/android/server/wm/TaskSnapshotController.java +4 −7 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.server.wm; import static android.app.ActivityManager.ENABLE_TASK_SNAPSHOTS; import android.annotation.Nullable; import android.app.ActivityManager; import android.app.ActivityManager.StackId; import android.app.ActivityManager.TaskSnapshot; import android.graphics.GraphicBuffer; Loading Loading @@ -65,26 +66,22 @@ class TaskSnapshotController { } void onTransitionStarting() { if (!ENABLE_TASK_SNAPSHOTS) { return; } handleClosingApps(mService.mClosingApps); } /** * Called when the visibility of an app changes outside of the regular app transition flow. */ void notifyAppVisibilityChanged(AppWindowToken appWindowToken, boolean visible) { if (!ENABLE_TASK_SNAPSHOTS) { return; } if (!visible) { handleClosingApps(Sets.newArraySet(appWindowToken)); } } private void handleClosingApps(ArraySet<AppWindowToken> closingApps) { if (!ENABLE_TASK_SNAPSHOTS || ActivityManager.isLowRamDeviceStatic()) { return; } // We need to take a snapshot of the task if and only if all activities of the task are // either closing or hidden. Loading Loading
services/core/java/com/android/server/wm/TaskSnapshotController.java +4 −7 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.server.wm; import static android.app.ActivityManager.ENABLE_TASK_SNAPSHOTS; import android.annotation.Nullable; import android.app.ActivityManager; import android.app.ActivityManager.StackId; import android.app.ActivityManager.TaskSnapshot; import android.graphics.GraphicBuffer; Loading Loading @@ -65,26 +66,22 @@ class TaskSnapshotController { } void onTransitionStarting() { if (!ENABLE_TASK_SNAPSHOTS) { return; } handleClosingApps(mService.mClosingApps); } /** * Called when the visibility of an app changes outside of the regular app transition flow. */ void notifyAppVisibilityChanged(AppWindowToken appWindowToken, boolean visible) { if (!ENABLE_TASK_SNAPSHOTS) { return; } if (!visible) { handleClosingApps(Sets.newArraySet(appWindowToken)); } } private void handleClosingApps(ArraySet<AppWindowToken> closingApps) { if (!ENABLE_TASK_SNAPSHOTS || ActivityManager.isLowRamDeviceStatic()) { return; } // We need to take a snapshot of the task if and only if all activities of the task are // either closing or hidden. Loading