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

Commit b538d3c0 authored by Christopher Tate's avatar Christopher Tate
Browse files

Don't run full backups on stopped packages

We already decline to run key/value backup passes for (participating)
apps that are in the 'stopped' state.  Now we also properly avoid
full-data backup passes on such apps.

Bug 19684052

Change-Id: Ieafc07b5531a91a243d57238c53db41ad3459140
parent eb803aef
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -3862,6 +3862,14 @@ public class BackupManagerService {
                            Slog.d(TAG, "Ignoring non-agent system package " + pkg);
                        }
                        continue;
                    } else if ((info.applicationInfo.flags & ApplicationInfo.FLAG_STOPPED) != 0) {
                        // Cull any packages in the 'stopped' state: they've either just been
                        // installed or have explicitly been force-stopped by the user.  In both
                        // cases we do not want to launch them for backup.
                        if (MORE_DEBUG) {
                            Slog.d(TAG, "Ignoring stopped package " + pkg);
                        }
                        continue;
                    }
                    mPackages.add(info);
                } catch (NameNotFoundException e) {