Merge "Set the FLAG_FROM_BACKGROUND for job bindings"

This commit is contained in:
Jing Ji
2022-07-19 05:02:10 +00:00
committed by Android (Google) Code Review

View File

@@ -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;