Merge "Replace redundant error code with a specific one"

This commit is contained in:
TreeHugger Robot
2020-08-20 12:59:20 +00:00
committed by Android (Google) Code Review
4 changed files with 7 additions and 7 deletions

View File

@@ -11901,8 +11901,8 @@ package android.content.pm {
field public static final android.os.Parcelable.Creator<android.content.pm.PackageInstaller.SessionInfo> CREATOR;
field public static final int INVALID_ID = -1; // 0xffffffff
field public static final int STAGED_SESSION_ACTIVATION_FAILED = 2; // 0x2
field public static final int STAGED_SESSION_CONFLICT = 4; // 0x4
field public static final int STAGED_SESSION_NO_ERROR = 0; // 0x0
field public static final int STAGED_SESSION_OTHER_ERROR = 4; // 0x4
field public static final int STAGED_SESSION_UNKNOWN = 3; // 0x3
field public static final int STAGED_SESSION_VERIFICATION_FAILED = 1; // 0x1
}

View File

@@ -2076,7 +2076,7 @@ public class PackageInstaller {
STAGED_SESSION_VERIFICATION_FAILED,
STAGED_SESSION_ACTIVATION_FAILED,
STAGED_SESSION_UNKNOWN,
STAGED_SESSION_OTHER_ERROR})
STAGED_SESSION_CONFLICT})
@Retention(RetentionPolicy.SOURCE)
public @interface StagedSessionErrorCode{}
/**
@@ -2103,10 +2103,10 @@ public class PackageInstaller {
public static final int STAGED_SESSION_UNKNOWN = 3;
/**
* Constant indicating that a known error occurred while processing this staged session, but
* the error could not be matched to other categories.
* Constant indicating that the session was in conflict with another staged session and had
* to be sacrificed for resolution.
*/
public static final int STAGED_SESSION_OTHER_ERROR = 4;
public static final int STAGED_SESSION_CONFLICT = 4;
/** {@hide} */
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)

View File

@@ -11901,8 +11901,8 @@ package android.content.pm {
field public static final android.os.Parcelable.Creator<android.content.pm.PackageInstaller.SessionInfo> CREATOR;
field public static final int INVALID_ID = -1; // 0xffffffff
field public static final int STAGED_SESSION_ACTIVATION_FAILED = 2; // 0x2
field public static final int STAGED_SESSION_CONFLICT = 4; // 0x4
field public static final int STAGED_SESSION_NO_ERROR = 0; // 0x0
field public static final int STAGED_SESSION_OTHER_ERROR = 4; // 0x4
field public static final int STAGED_SESSION_UNKNOWN = 3; // 0x3
field public static final int STAGED_SESSION_VERIFICATION_FAILED = 1; // 0x1
}

View File

@@ -1005,7 +1005,7 @@ public class StagingManager {
// will be deleted.
}
root.setStagedSessionFailed(
SessionInfo.STAGED_SESSION_OTHER_ERROR,
SessionInfo.STAGED_SESSION_CONFLICT,
"Session was blocking rollback session: " + session.sessionId);
Slog.i(TAG, "Session " + root.sessionId + " is marked failed due to "
+ "blocking rollback session: " + session.sessionId);