Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96bbd316 authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "Add a flag to control activity snapshot by default." into main

parents fa456237 caf4f792
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -67,3 +67,11 @@ flag {
    bug: "309545085"
    is_fixed_read_only: true
}

flag {
    name: "activity_snapshot_by_default"
    namespace: "systemui"
    description: "Enable record activity snapshot by default"
    bug: "259497289"
    is_fixed_read_only: true
}
 No newline at end of file
+3 −1
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.server.LocalServices;
import com.android.server.pm.UserManagerInternal;
import com.android.server.wm.BaseAppSnapshotPersister.PersistInfoProvider;
import com.android.window.flags.Flags;

import java.io.File;
import java.util.ArrayList;
@@ -121,7 +122,8 @@ class ActivitySnapshotController extends AbsAppSnapshotController<ActivityRecord

    // TODO remove when enabled
    static boolean isSnapshotEnabled() {
        return SystemProperties.getInt("persist.wm.debug.activity_screenshot", 0) != 0;
        return SystemProperties.getInt("persist.wm.debug.activity_screenshot", 0) != 0
                || Flags.activitySnapshotByDefault();
    }

    static PersistInfoProvider createPersistInfoProvider(