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

Commit cad330ef authored by Jing Ji's avatar Jing Ji
Browse files

Set the FLAG_FROM_BACKGROUND for job bindings

So it won't reset the process error state (crash times).

Bug: 239042601
Test: Manual - crash an app, wait for its job restart
Change-Id: Ia4f1d5d69d9ac22f52069af7ee333dd6c0849d77
parent 062ad249
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -303,7 +303,9 @@ public final class JobServiceContext implements ServiceConnection {
                    getStartActionId(job), String.valueOf(job.getJobId()));
            mVerb = VERB_BINDING;
            scheduleOpTimeOutLocked();
            final Intent intent = new Intent().setComponent(job.getServiceComponent());
            // Use FLAG_FROM_BACKGROUND to avoid resetting the bad-app tracking.
            final Intent intent = new Intent().setComponent(job.getServiceComponent())
                    .setFlags(Intent.FLAG_FROM_BACKGROUND);
            boolean binding = false;
            try {
                final int bindFlags;