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

Commit 0a68ae7e authored by Hongguang Chen's avatar Hongguang Chen
Browse files

Do not record snapshot when snapshots are disabled

Bug: 285198903
Test: manual testing, switching apps
Change-Id: I70d0a654b2bb6cd9bde4d0be5fe42d5b1e941987
parent 720e8081
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -167,6 +167,9 @@ abstract class AbsAppSnapshotController<TYPE extends WindowContainer,
    }

    final TaskSnapshot recordSnapshotInner(TYPE source, boolean allowSnapshotHome) {
        if (shouldDisableSnapshots()) {
            return null;
        }
        final boolean snapshotHome = allowSnapshotHome && source.isActivityTypeHome();
        final TaskSnapshot snapshot = captureSnapshot(source, snapshotHome);
        if (snapshot == null) {