Loading Android.mk +16 −19 Original line number Diff line number Diff line Loading @@ -861,42 +861,39 @@ include $(BUILD_STATIC_JAVA_LIBRARY) # ==== hiddenapi lists ======================================= # Copy light and dark greylist over into the build folder. # Copy blacklist and light greylist over into the build folder. # This is for ART buildbots which need to mock these lists and have alternative # rules for building them. Other rules in the build system should depend on the # files in the build folder. $(eval $(call copy-one-file,frameworks/base/config/hiddenapi-blacklist.txt,\ $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST))) # Temporarily merge light greylist from two files. Vendor list will become dark # grey once we remove the UI toast. $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): frameworks/base/config/hiddenapi-light-greylist.txt \ frameworks/base/config/hiddenapi-vendor-list.txt sort $^ > $@ $(eval $(call copy-one-file,frameworks/base/config/hiddenapi-dark-greylist.txt,\ $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST))) # Generate dark greylist as private API minus (blacklist plus light greylist). $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST): PRIVATE_API := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST): LIGHT_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST) $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST): DARK_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST) $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST): $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \ $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST) \ $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST) if [ ! -z "`comm -12 <(sort $(LIGHT_GREYLIST)) <(sort $(DARK_GREYLIST))`" ]; then \ echo "There should be no overlap between $(LIGHT_GREYLIST) and $(DARK_GREYLIST)" 1>&2; \ comm -12 <(sort $(LIGHT_GREYLIST)) <(sort $(DARK_GREYLIST)) 1>&2; \ $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST): PRIVATE_API := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST): BLACKLIST := $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST) $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST): LIGHT_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST) $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST): $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \ $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST) \ $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST) if [ ! -z "`comm -12 <(sort $(BLACKLIST)) <(sort $(LIGHT_GREYLIST))`" ]; then \ echo "There should be no overlap between $(BLACKLIST) and $(LIGHT_GREYLIST)" 1>&2; \ exit 1; \ elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(BLACKLIST))`" ]; then \ echo "$(BLACKLIST) must be a subset of $(PRIVATE_API)" 1>&2; \ exit 2; \ elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(LIGHT_GREYLIST))`" ]; then \ echo "$(LIGHT_GREYLIST) must be a subset of $(PRIVATE_API)" 1>&2; \ comm -13 <(sort $(PRIVATE_API)) <(sort $(LIGHT_GREYLIST)) 1>&2; \ exit 2; \ elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(DARK_GREYLIST))`" ]; then \ echo "$(DARK_GREYLIST) must be a subset of $(PRIVATE_API)" 1>&2; \ comm -13 <(sort $(PRIVATE_API)) <(sort $(DARK_GREYLIST)) 1>&2; \ exit 3; \ fi comm -23 <(sort $(PRIVATE_API)) <(sort $(LIGHT_GREYLIST) $(DARK_GREYLIST)) > $@ comm -23 <(sort $(PRIVATE_API)) <(sort $(BLACKLIST) $(LIGHT_GREYLIST)) > $@ # Include subdirectory makefiles # ============================================================ Loading core/java/android/app/Notification.java +2 −2 Original line number Diff line number Diff line Loading @@ -2631,8 +2631,8 @@ public class Notification implements Parcelable if (!Objects.equals(firstRs[j].getLabel(), secondRs[j].getLabel())) { return true; } CharSequence[] firstCs = firstRs[i].getChoices(); CharSequence[] secondCs = secondRs[i].getChoices(); CharSequence[] firstCs = firstRs[j].getChoices(); CharSequence[] secondCs = secondRs[j].getChoices(); if (firstCs == null) { firstCs = new CharSequence[0]; } Loading services/backup/java/com/android/server/backup/BackupManagerService.java +8 −10 Original line number Diff line number Diff line Loading @@ -215,6 +215,13 @@ public class BackupManagerService implements BackupManagerServiceInterface { // Timeout interval for deciding that a bind or clear-data has taken too long private static final long TIMEOUT_INTERVAL = 10 * 1000; // Timeout intervals for agent backup & restore operations public static final long TIMEOUT_BACKUP_INTERVAL = 30 * 1000; public static final long TIMEOUT_FULL_BACKUP_INTERVAL = 5 * 60 * 1000; public static final long TIMEOUT_SHARED_BACKUP_INTERVAL = 30 * 60 * 1000; public static final long TIMEOUT_RESTORE_INTERVAL = 60 * 1000; public static final long TIMEOUT_RESTORE_FINISHED_INTERVAL = 30 * 1000; // User confirmation timeout for a full backup/restore operation. It's this long in // order to give them time to enter the backup password. private static final long TIMEOUT_FULL_CONFIRMATION = 60 * 1000; Loading @@ -225,7 +232,6 @@ public class BackupManagerService implements BackupManagerServiceInterface { private static final int BUSY_BACKOFF_FUZZ = 1000 * 60 * 60 * 2; // two hours private BackupManagerConstants mConstants; private BackupAgentTimeoutParameters mAgentTimeoutParameters; private Context mContext; private PackageManager mPackageManager; private IPackageManager mPackageManagerBinder; Loading Loading @@ -309,10 +315,6 @@ public class BackupManagerService implements BackupManagerServiceInterface { return mConstants; } public BackupAgentTimeoutParameters getAgentTimeoutParameters() { return mAgentTimeoutParameters; } public Context getContext() { return mContext; } Loading Loading @@ -854,10 +856,6 @@ public class BackupManagerService implements BackupManagerServiceInterface { // require frequent starting and stopping. mConstants.start(); mAgentTimeoutParameters = new BackupAgentTimeoutParameters(mBackupHandler, mContext.getContentResolver()); mAgentTimeoutParameters.start(); // Set up the various sorts of package tracking we do mFullBackupScheduleFile = new File(mBaseStateDir, "fb-schedule"); initPackageTracking(); Loading Loading @@ -3409,7 +3407,7 @@ public class BackupManagerService implements BackupManagerServiceInterface { } mActiveRestoreSession = new ActiveRestoreSession(this, packageName, transport); mBackupHandler.sendEmptyMessageDelayed(MSG_RESTORE_SESSION_TIMEOUT, mAgentTimeoutParameters.getRestoreAgentTimeoutMillis()); TIMEOUT_RESTORE_INTERVAL); } return mActiveRestoreSession; } Loading services/backup/java/com/android/server/backup/BackupManagerServiceInterface.java +0 −3 Original line number Diff line number Diff line Loading @@ -191,7 +191,4 @@ public interface BackupManagerServiceInterface { void dump(FileDescriptor fd, PrintWriter pw, String[] args); IBackupManager getBackupManagerBinder(); // Gets access to the backup/restore agent timeout parameters. BackupAgentTimeoutParameters getAgentTimeoutParameters(); } services/backup/java/com/android/server/backup/KeyValueAdbBackupEngine.java +4 −7 Original line number Diff line number Diff line Loading @@ -4,8 +4,8 @@ import static android.os.ParcelFileDescriptor.MODE_CREATE; import static android.os.ParcelFileDescriptor.MODE_READ_ONLY; import static android.os.ParcelFileDescriptor.MODE_READ_WRITE; import static android.os.ParcelFileDescriptor.MODE_TRUNCATE; import static com.android.server.backup.BackupManagerService.OP_TYPE_BACKUP_WAIT; import static com.android.server.backup.BackupManagerService.TIMEOUT_BACKUP_INTERVAL; import android.app.ApplicationThreadConstants; import android.app.IBackupAgent; Loading Loading @@ -59,7 +59,6 @@ public class KeyValueAdbBackupEngine { private ParcelFileDescriptor mSavedState; private ParcelFileDescriptor mBackupData; private ParcelFileDescriptor mNewState; private final BackupAgentTimeoutParameters mAgentTimeoutParameters; public KeyValueAdbBackupEngine(OutputStream output, PackageInfo packageInfo, BackupManagerServiceInterface backupManagerService, PackageManager packageManager, Loading @@ -82,7 +81,6 @@ public class KeyValueAdbBackupEngine { pkg + BACKUP_KEY_VALUE_NEW_STATE_FILENAME_SUFFIX); mManifestFile = new File(mDataDir, BackupManagerService.BACKUP_MANIFEST_FILENAME); mAgentTimeoutParameters = backupManagerService.getAgentTimeoutParameters(); } public void backupOnePackage() throws IOException { Loading Loading @@ -150,9 +148,8 @@ public class KeyValueAdbBackupEngine { // Return true on backup success, false otherwise private boolean invokeAgentForAdbBackup(String packageName, IBackupAgent agent) { int token = mBackupManagerService.generateRandomIntegerToken(); long kvBackupAgentTimeoutMillis = mAgentTimeoutParameters.getKvBackupAgentTimeoutMillis(); try { mBackupManagerService.prepareOperationTimeout(token, kvBackupAgentTimeoutMillis, null, mBackupManagerService.prepareOperationTimeout(token, TIMEOUT_BACKUP_INTERVAL, null, OP_TYPE_BACKUP_WAIT); // Start backup and wait for BackupManagerService to get callback for success or timeout Loading Loading @@ -234,14 +231,14 @@ public class KeyValueAdbBackupEngine { } private void writeBackupData() throws IOException { int token = mBackupManagerService.generateRandomIntegerToken(); long kvBackupAgentTimeoutMillis = mAgentTimeoutParameters.getKvBackupAgentTimeoutMillis(); ParcelFileDescriptor[] pipes = null; try { pipes = ParcelFileDescriptor.createPipe(); mBackupManagerService.prepareOperationTimeout(token, kvBackupAgentTimeoutMillis, null, mBackupManagerService.prepareOperationTimeout(token, TIMEOUT_BACKUP_INTERVAL, null, OP_TYPE_BACKUP_WAIT); // We will have to create a runnable that will read the manifest and backup data we Loading Loading
Android.mk +16 −19 Original line number Diff line number Diff line Loading @@ -861,42 +861,39 @@ include $(BUILD_STATIC_JAVA_LIBRARY) # ==== hiddenapi lists ======================================= # Copy light and dark greylist over into the build folder. # Copy blacklist and light greylist over into the build folder. # This is for ART buildbots which need to mock these lists and have alternative # rules for building them. Other rules in the build system should depend on the # files in the build folder. $(eval $(call copy-one-file,frameworks/base/config/hiddenapi-blacklist.txt,\ $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST))) # Temporarily merge light greylist from two files. Vendor list will become dark # grey once we remove the UI toast. $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): frameworks/base/config/hiddenapi-light-greylist.txt \ frameworks/base/config/hiddenapi-vendor-list.txt sort $^ > $@ $(eval $(call copy-one-file,frameworks/base/config/hiddenapi-dark-greylist.txt,\ $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST))) # Generate dark greylist as private API minus (blacklist plus light greylist). $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST): PRIVATE_API := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST): LIGHT_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST) $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST): DARK_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST) $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST): $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \ $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST) \ $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST) if [ ! -z "`comm -12 <(sort $(LIGHT_GREYLIST)) <(sort $(DARK_GREYLIST))`" ]; then \ echo "There should be no overlap between $(LIGHT_GREYLIST) and $(DARK_GREYLIST)" 1>&2; \ comm -12 <(sort $(LIGHT_GREYLIST)) <(sort $(DARK_GREYLIST)) 1>&2; \ $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST): PRIVATE_API := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST): BLACKLIST := $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST) $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST): LIGHT_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST) $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST): $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \ $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST) \ $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST) if [ ! -z "`comm -12 <(sort $(BLACKLIST)) <(sort $(LIGHT_GREYLIST))`" ]; then \ echo "There should be no overlap between $(BLACKLIST) and $(LIGHT_GREYLIST)" 1>&2; \ exit 1; \ elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(BLACKLIST))`" ]; then \ echo "$(BLACKLIST) must be a subset of $(PRIVATE_API)" 1>&2; \ exit 2; \ elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(LIGHT_GREYLIST))`" ]; then \ echo "$(LIGHT_GREYLIST) must be a subset of $(PRIVATE_API)" 1>&2; \ comm -13 <(sort $(PRIVATE_API)) <(sort $(LIGHT_GREYLIST)) 1>&2; \ exit 2; \ elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(DARK_GREYLIST))`" ]; then \ echo "$(DARK_GREYLIST) must be a subset of $(PRIVATE_API)" 1>&2; \ comm -13 <(sort $(PRIVATE_API)) <(sort $(DARK_GREYLIST)) 1>&2; \ exit 3; \ fi comm -23 <(sort $(PRIVATE_API)) <(sort $(LIGHT_GREYLIST) $(DARK_GREYLIST)) > $@ comm -23 <(sort $(PRIVATE_API)) <(sort $(BLACKLIST) $(LIGHT_GREYLIST)) > $@ # Include subdirectory makefiles # ============================================================ Loading
core/java/android/app/Notification.java +2 −2 Original line number Diff line number Diff line Loading @@ -2631,8 +2631,8 @@ public class Notification implements Parcelable if (!Objects.equals(firstRs[j].getLabel(), secondRs[j].getLabel())) { return true; } CharSequence[] firstCs = firstRs[i].getChoices(); CharSequence[] secondCs = secondRs[i].getChoices(); CharSequence[] firstCs = firstRs[j].getChoices(); CharSequence[] secondCs = secondRs[j].getChoices(); if (firstCs == null) { firstCs = new CharSequence[0]; } Loading
services/backup/java/com/android/server/backup/BackupManagerService.java +8 −10 Original line number Diff line number Diff line Loading @@ -215,6 +215,13 @@ public class BackupManagerService implements BackupManagerServiceInterface { // Timeout interval for deciding that a bind or clear-data has taken too long private static final long TIMEOUT_INTERVAL = 10 * 1000; // Timeout intervals for agent backup & restore operations public static final long TIMEOUT_BACKUP_INTERVAL = 30 * 1000; public static final long TIMEOUT_FULL_BACKUP_INTERVAL = 5 * 60 * 1000; public static final long TIMEOUT_SHARED_BACKUP_INTERVAL = 30 * 60 * 1000; public static final long TIMEOUT_RESTORE_INTERVAL = 60 * 1000; public static final long TIMEOUT_RESTORE_FINISHED_INTERVAL = 30 * 1000; // User confirmation timeout for a full backup/restore operation. It's this long in // order to give them time to enter the backup password. private static final long TIMEOUT_FULL_CONFIRMATION = 60 * 1000; Loading @@ -225,7 +232,6 @@ public class BackupManagerService implements BackupManagerServiceInterface { private static final int BUSY_BACKOFF_FUZZ = 1000 * 60 * 60 * 2; // two hours private BackupManagerConstants mConstants; private BackupAgentTimeoutParameters mAgentTimeoutParameters; private Context mContext; private PackageManager mPackageManager; private IPackageManager mPackageManagerBinder; Loading Loading @@ -309,10 +315,6 @@ public class BackupManagerService implements BackupManagerServiceInterface { return mConstants; } public BackupAgentTimeoutParameters getAgentTimeoutParameters() { return mAgentTimeoutParameters; } public Context getContext() { return mContext; } Loading Loading @@ -854,10 +856,6 @@ public class BackupManagerService implements BackupManagerServiceInterface { // require frequent starting and stopping. mConstants.start(); mAgentTimeoutParameters = new BackupAgentTimeoutParameters(mBackupHandler, mContext.getContentResolver()); mAgentTimeoutParameters.start(); // Set up the various sorts of package tracking we do mFullBackupScheduleFile = new File(mBaseStateDir, "fb-schedule"); initPackageTracking(); Loading Loading @@ -3409,7 +3407,7 @@ public class BackupManagerService implements BackupManagerServiceInterface { } mActiveRestoreSession = new ActiveRestoreSession(this, packageName, transport); mBackupHandler.sendEmptyMessageDelayed(MSG_RESTORE_SESSION_TIMEOUT, mAgentTimeoutParameters.getRestoreAgentTimeoutMillis()); TIMEOUT_RESTORE_INTERVAL); } return mActiveRestoreSession; } Loading
services/backup/java/com/android/server/backup/BackupManagerServiceInterface.java +0 −3 Original line number Diff line number Diff line Loading @@ -191,7 +191,4 @@ public interface BackupManagerServiceInterface { void dump(FileDescriptor fd, PrintWriter pw, String[] args); IBackupManager getBackupManagerBinder(); // Gets access to the backup/restore agent timeout parameters. BackupAgentTimeoutParameters getAgentTimeoutParameters(); }
services/backup/java/com/android/server/backup/KeyValueAdbBackupEngine.java +4 −7 Original line number Diff line number Diff line Loading @@ -4,8 +4,8 @@ import static android.os.ParcelFileDescriptor.MODE_CREATE; import static android.os.ParcelFileDescriptor.MODE_READ_ONLY; import static android.os.ParcelFileDescriptor.MODE_READ_WRITE; import static android.os.ParcelFileDescriptor.MODE_TRUNCATE; import static com.android.server.backup.BackupManagerService.OP_TYPE_BACKUP_WAIT; import static com.android.server.backup.BackupManagerService.TIMEOUT_BACKUP_INTERVAL; import android.app.ApplicationThreadConstants; import android.app.IBackupAgent; Loading Loading @@ -59,7 +59,6 @@ public class KeyValueAdbBackupEngine { private ParcelFileDescriptor mSavedState; private ParcelFileDescriptor mBackupData; private ParcelFileDescriptor mNewState; private final BackupAgentTimeoutParameters mAgentTimeoutParameters; public KeyValueAdbBackupEngine(OutputStream output, PackageInfo packageInfo, BackupManagerServiceInterface backupManagerService, PackageManager packageManager, Loading @@ -82,7 +81,6 @@ public class KeyValueAdbBackupEngine { pkg + BACKUP_KEY_VALUE_NEW_STATE_FILENAME_SUFFIX); mManifestFile = new File(mDataDir, BackupManagerService.BACKUP_MANIFEST_FILENAME); mAgentTimeoutParameters = backupManagerService.getAgentTimeoutParameters(); } public void backupOnePackage() throws IOException { Loading Loading @@ -150,9 +148,8 @@ public class KeyValueAdbBackupEngine { // Return true on backup success, false otherwise private boolean invokeAgentForAdbBackup(String packageName, IBackupAgent agent) { int token = mBackupManagerService.generateRandomIntegerToken(); long kvBackupAgentTimeoutMillis = mAgentTimeoutParameters.getKvBackupAgentTimeoutMillis(); try { mBackupManagerService.prepareOperationTimeout(token, kvBackupAgentTimeoutMillis, null, mBackupManagerService.prepareOperationTimeout(token, TIMEOUT_BACKUP_INTERVAL, null, OP_TYPE_BACKUP_WAIT); // Start backup and wait for BackupManagerService to get callback for success or timeout Loading Loading @@ -234,14 +231,14 @@ public class KeyValueAdbBackupEngine { } private void writeBackupData() throws IOException { int token = mBackupManagerService.generateRandomIntegerToken(); long kvBackupAgentTimeoutMillis = mAgentTimeoutParameters.getKvBackupAgentTimeoutMillis(); ParcelFileDescriptor[] pipes = null; try { pipes = ParcelFileDescriptor.createPipe(); mBackupManagerService.prepareOperationTimeout(token, kvBackupAgentTimeoutMillis, null, mBackupManagerService.prepareOperationTimeout(token, TIMEOUT_BACKUP_INTERVAL, null, OP_TYPE_BACKUP_WAIT); // We will have to create a runnable that will read the manifest and backup data we Loading