Merge "Don't run jobs in apps performing full-data backup" into rvc-dev am: 2b80990bbc
Change-Id: I0929d2f148dceceee7274dabd86c6f381cb9284a
This commit is contained in:
@@ -2182,17 +2182,18 @@ public class JobSchedulerService extends com.android.server.SystemService
|
|||||||
}
|
}
|
||||||
|
|
||||||
final boolean jobExists = mJobs.containsJob(job);
|
final boolean jobExists = mJobs.containsJob(job);
|
||||||
|
|
||||||
final boolean userStarted = areUsersStartedLocked(job);
|
final boolean userStarted = areUsersStartedLocked(job);
|
||||||
|
final boolean backingUp = mBackingUpUids.indexOfKey(job.getSourceUid()) >= 0;
|
||||||
|
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
Slog.v(TAG, "isReadyToBeExecutedLocked: " + job.toShortString()
|
Slog.v(TAG, "isReadyToBeExecutedLocked: " + job.toShortString()
|
||||||
+ " exists=" + jobExists + " userStarted=" + userStarted);
|
+ " exists=" + jobExists + " userStarted=" + userStarted
|
||||||
|
+ " backingUp=" + backingUp);
|
||||||
}
|
}
|
||||||
|
|
||||||
// These are also fairly cheap to check, though they typically will not
|
// These are also fairly cheap to check, though they typically will not
|
||||||
// be conditions we fail.
|
// be conditions we fail.
|
||||||
if (!jobExists || !userStarted) {
|
if (!jobExists || !userStarted || backingUp) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2265,15 +2266,17 @@ public class JobSchedulerService extends com.android.server.SystemService
|
|||||||
|
|
||||||
final boolean jobExists = mJobs.containsJob(job);
|
final boolean jobExists = mJobs.containsJob(job);
|
||||||
final boolean userStarted = areUsersStartedLocked(job);
|
final boolean userStarted = areUsersStartedLocked(job);
|
||||||
|
final boolean backingUp = mBackingUpUids.indexOfKey(job.getSourceUid()) >= 0;
|
||||||
|
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
Slog.v(TAG, "areComponentsInPlaceLocked: " + job.toShortString()
|
Slog.v(TAG, "areComponentsInPlaceLocked: " + job.toShortString()
|
||||||
+ " exists=" + jobExists + " userStarted=" + userStarted);
|
+ " exists=" + jobExists + " userStarted=" + userStarted
|
||||||
|
+ " backingUp=" + backingUp);
|
||||||
}
|
}
|
||||||
|
|
||||||
// These are also fairly cheap to check, though they typically will not
|
// These are also fairly cheap to check, though they typically will not
|
||||||
// be conditions we fail.
|
// be conditions we fail.
|
||||||
if (!jobExists || !userStarted) {
|
if (!jobExists || !userStarted || backingUp) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user