From 99170f0aa3d0b49ee3deeae4d3660e8132edc26e Mon Sep 17 00:00:00 2001 From: Varun Shah Date: Wed, 24 Feb 2021 12:17:22 -0800 Subject: [PATCH] Remove temporary sync-as-ej allow-list. Bug: 178852366 Test: atest SyncManagerTest Test: atest CtsSyncManagerTest Change-Id: I8bcc3fde76ff8c6e840a635981953c47f55208be --- .../java/com/android/server/content/SyncManager.java | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/services/core/java/com/android/server/content/SyncManager.java b/services/core/java/com/android/server/content/SyncManager.java index 7b9ca37b1639f..33bcd375dfd41 100644 --- a/services/core/java/com/android/server/content/SyncManager.java +++ b/services/core/java/com/android/server/content/SyncManager.java @@ -264,10 +264,6 @@ public class SyncManager { 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 pendingJobs) { for (JobInfo job: pendingJobs) { if (job.getId() == jobId) { @@ -987,14 +983,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) { // If userId is specified, do not sync accounts of other users if (userId >= UserHandle.USER_SYSTEM && account.userId >= UserHandle.USER_SYSTEM