Cleanup some obsolete TODOs and unused code. am: cda1a17516
am: 01178b4f9d
Change-Id: I8077abf3a2262e13a0c638bb2c7f8c052d22a7f6
This commit is contained in:
@@ -1552,7 +1552,7 @@ public class PackageInstaller {
|
||||
}
|
||||
|
||||
/** {@hide} */
|
||||
@SystemApi
|
||||
@SystemApi @TestApi
|
||||
public void setRequestDowngrade(boolean requestDowngrade) {
|
||||
if (requestDowngrade) {
|
||||
installFlags |= PackageManager.INSTALL_REQUEST_DOWNGRADE;
|
||||
|
||||
@@ -256,6 +256,8 @@ public class PackageParser {
|
||||
|
||||
/** @hide */
|
||||
public static final String APK_FILE_EXTENSION = ".apk";
|
||||
/** @hide */
|
||||
public static final String APEX_FILE_EXTENSION = ".apex";
|
||||
|
||||
/** @hide */
|
||||
public static class NewPermissionInfo {
|
||||
|
||||
@@ -24,7 +24,7 @@ import android.content.IntentSender;
|
||||
interface IRollbackManager {
|
||||
|
||||
ParceledListSlice getAvailableRollbacks();
|
||||
ParceledListSlice getRecentlyExecutedRollbacks();
|
||||
ParceledListSlice getRecentlyCommittedRollbacks();
|
||||
|
||||
void commitRollback(int rollbackId, in ParceledListSlice causePackages,
|
||||
String callerPackageName, in IntentSender statusReceiver);
|
||||
@@ -51,4 +51,7 @@ interface IRollbackManager {
|
||||
// Used by the staging manager to notify the RollbackManager of the apk
|
||||
// session for a staged session.
|
||||
void notifyStagedApkSession(int originalSessionId, int apkSessionId);
|
||||
|
||||
// For test purposes only.
|
||||
void blockRollbackManager(long millis);
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ public final class RollbackManager {
|
||||
})
|
||||
public @NonNull List<RollbackInfo> getRecentlyCommittedRollbacks() {
|
||||
try {
|
||||
return mBinder.getRecentlyExecutedRollbacks().getList();
|
||||
return mBinder.getRecentlyCommittedRollbacks().getList();
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
@@ -250,4 +250,25 @@ public final class RollbackManager {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Block the RollbackManager for a specified amount of time.
|
||||
* This API is meant to facilitate testing of race conditions in
|
||||
* RollbackManager. Blocks RollbackManager from processing anything for
|
||||
* the given number of milliseconds.
|
||||
*
|
||||
* @param millis number of milliseconds to block the RollbackManager for
|
||||
* @throws SecurityException if the caller does not have appropriate permissions.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@RequiresPermission(android.Manifest.permission.TEST_MANAGE_ROLLBACKS)
|
||||
@TestApi
|
||||
public void blockRollbackManager(long millis) {
|
||||
try {
|
||||
mBinder.blockRollbackManager(millis);
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user