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

Commit 339f0a57 authored by Christopher Tate's avatar Christopher Tate Committed by Android Git Automerger
Browse files

am 6ab86274: Merge "Don\'t cancel scheduled jobs when packages are updated" into lmp-mr1-dev

* commit '6ab86274':
  Don't cancel scheduled jobs when packages are updated
parents 5eaf0064 6ab86274
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -137,11 +137,15 @@ public class JobSchedulerService extends com.android.server.SystemService
        public void onReceive(Context context, Intent intent) {
            Slog.d(TAG, "Receieved: " + intent.getAction());
            if (Intent.ACTION_PACKAGE_REMOVED.equals(intent.getAction())) {
                // If this is an outright uninstall rather than the first half of an
                // app update sequence, cancel the jobs associated with the app.
                if (!intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) {
                    int uidRemoved = intent.getIntExtra(Intent.EXTRA_UID, -1);
                    if (DEBUG) {
                        Slog.d(TAG, "Removing jobs for uid: " + uidRemoved);
                    }
                    cancelJobsForUid(uidRemoved);
                }
            } else if (Intent.ACTION_USER_REMOVED.equals(intent.getAction())) {
                final int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0);
                if (DEBUG) {