Merge "Remove temporary sync-as-ej allow-list." into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
5a268a95cb
@@ -268,10 +268,6 @@ public class SyncManager {
|
|||||||
|
|
||||||
private final SyncLogger mLogger;
|
private final SyncLogger mLogger;
|
||||||
|
|
||||||
// NOTE: this is a temporary allow-list for testing purposes; it will be removed before release.
|
|
||||||
private final String[] mEjSyncAllowedPackages = new String[]{
|
|
||||||
"com.google.android.google", "com.android.frameworks.servicestests"};
|
|
||||||
|
|
||||||
private boolean isJobIdInUseLockedH(int jobId, List<JobInfo> pendingJobs) {
|
private boolean isJobIdInUseLockedH(int jobId, List<JobInfo> pendingJobs) {
|
||||||
for (JobInfo job: pendingJobs) {
|
for (JobInfo job: pendingJobs) {
|
||||||
if (job.getId() == jobId) {
|
if (job.getId() == jobId) {
|
||||||
@@ -991,14 +987,6 @@ public class SyncManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean scheduleAsEj =
|
|
||||||
extras.getBoolean(ContentResolver.SYNC_EXTRAS_SCHEDULE_AS_EXPEDITED_JOB, false);
|
|
||||||
// NOTE: this is a temporary check for internal testing - to be removed before release.
|
|
||||||
if (scheduleAsEj && !ArrayUtils.contains(mEjSyncAllowedPackages, callingPackage)) {
|
|
||||||
throw new IllegalArgumentException(
|
|
||||||
callingPackage + " is not allowed to schedule a sync as an EJ yet.");
|
|
||||||
}
|
|
||||||
|
|
||||||
for (AccountAndUser account : accounts) {
|
for (AccountAndUser account : accounts) {
|
||||||
// If userId is specified, do not sync accounts of other users
|
// If userId is specified, do not sync accounts of other users
|
||||||
if (userId >= UserHandle.USER_SYSTEM && account.userId >= UserHandle.USER_SYSTEM
|
if (userId >= UserHandle.USER_SYSTEM && account.userId >= UserHandle.USER_SYSTEM
|
||||||
|
|||||||
Reference in New Issue
Block a user