Loading api/current.txt +4 −3 Original line number Diff line number Diff line Loading @@ -11465,11 +11465,12 @@ package android.content.pm { method public boolean isSessionReady(); method public boolean isStaged(); method public void writeToParcel(android.os.Parcel, int); field public static final int ACTIVATION_FAILED = 2; // 0x2 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 NO_ERROR = 0; // 0x0 field public static final int VERIFICATION_FAILED = 1; // 0x1 field public static final int STAGED_SESSION_ACTIVATION_FAILED = 2; // 0x2 field public static final int STAGED_SESSION_NO_ERROR = 0; // 0x0 field public static final int STAGED_SESSION_UNKNOWN = 3; // 0x3 field public static final int STAGED_SESSION_VERIFICATION_FAILED = 1; // 0x1 } public static class PackageInstaller.SessionParams implements android.os.Parcelable { core/java/android/content/pm/PackageInstaller.java +13 −4 Original line number Diff line number Diff line Loading @@ -1625,26 +1625,35 @@ public class PackageInstaller { private static final int[] NO_SESSIONS = {}; /** @hide */ @IntDef(value = {NO_ERROR, VERIFICATION_FAILED, ACTIVATION_FAILED}) @IntDef(prefix = { "STAGED_SESSION_" }, value = { STAGED_SESSION_NO_ERROR, STAGED_SESSION_VERIFICATION_FAILED, STAGED_SESSION_ACTIVATION_FAILED, STAGED_SESSION_UNKNOWN}) @Retention(RetentionPolicy.SOURCE) public @interface StagedSessionErrorCode{} /** * Constant indicating that no error occurred during the preparation or the activation of * this staged session. */ public static final int NO_ERROR = 0; public static final int STAGED_SESSION_NO_ERROR = 0; /** * Constant indicating that an error occurred during the verification phase (pre-reboot) of * this staged session. */ public static final int VERIFICATION_FAILED = 1; public static final int STAGED_SESSION_VERIFICATION_FAILED = 1; /** * Constant indicating that an error occurred during the activation phase (post-reboot) of * this staged session. */ public static final int ACTIVATION_FAILED = 2; public static final int STAGED_SESSION_ACTIVATION_FAILED = 2; /** * Constant indicating that an unknown error occurred while processing this staged session. */ public static final int STAGED_SESSION_UNKNOWN = 3; /** {@hide} */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) Loading services/core/java/com/android/server/pm/PackageInstallerService.java +2 −2 Original line number Diff line number Diff line Loading @@ -567,8 +567,8 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements session = new PackageInstallerSession(mInternalCallback, mContext, mPm, this, mInstallThread.getLooper(), mStagingManager, sessionId, userId, installerPackageName, callingUid, params, createdMillis, stageDir, stageCid, false, false, null, SessionInfo.INVALID_ID, false, false, false, SessionInfo.NO_ERROR, ""); false, null, SessionInfo.INVALID_ID, false, false, false, SessionInfo.STAGED_SESSION_NO_ERROR, ""); synchronized (mSessions) { mSessions.put(sessionId, session); Loading services/core/java/com/android/server/pm/PackageInstallerSession.java +4 −4 Original line number Diff line number Diff line Loading @@ -267,7 +267,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { @GuardedBy("mLock") private boolean mStagedSessionFailed; @GuardedBy("mLock") private int mStagedSessionErrorCode = SessionInfo.NO_ERROR; private int mStagedSessionErrorCode = SessionInfo.STAGED_SESSION_NO_ERROR; @GuardedBy("mLock") private String mStagedSessionErrorMessage; Loading Loading @@ -2004,7 +2004,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { mStagedSessionReady = true; mStagedSessionApplied = false; mStagedSessionFailed = false; mStagedSessionErrorCode = SessionInfo.NO_ERROR; mStagedSessionErrorCode = SessionInfo.STAGED_SESSION_NO_ERROR; mStagedSessionErrorMessage = ""; } mCallback.onStagedSessionChanged(this); Loading @@ -2030,7 +2030,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { mStagedSessionReady = false; mStagedSessionApplied = true; mStagedSessionFailed = false; mStagedSessionErrorCode = SessionInfo.NO_ERROR; mStagedSessionErrorCode = SessionInfo.STAGED_SESSION_NO_ERROR; mStagedSessionErrorMessage = ""; } mCallback.onStagedSessionChanged(this); Loading Loading @@ -2298,7 +2298,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { final boolean isFailed = readBooleanAttribute(in, ATTR_IS_FAILED); final boolean isApplied = readBooleanAttribute(in, ATTR_IS_APPLIED); final int stagedSessionErrorCode = readIntAttribute(in, ATTR_STAGED_SESSION_ERROR_CODE, SessionInfo.NO_ERROR); SessionInfo.STAGED_SESSION_NO_ERROR); final String stagedSessionErrorMessage = readStringAttribute(in, ATTR_STAGED_SESSION_ERROR_MESSAGE); Loading services/core/java/com/android/server/pm/StagingManager.java +7 −6 Original line number Diff line number Diff line Loading @@ -215,7 +215,7 @@ public class StagingManager { if (!success) { session.setStagedSessionFailed( SessionInfo.VERIFICATION_FAILED, SessionInfo.STAGED_SESSION_VERIFICATION_FAILED, "APEX staging failed, check logcat messages from apexd for more details."); } Loading @@ -227,7 +227,7 @@ public class StagingManager { for (ApexInfo apexPackage : apexInfoList.apexInfos) { if (!validateApexSignature(apexPackage.packagePath, apexPackage.packageName)) { session.setStagedSessionFailed(SessionInfo.VERIFICATION_FAILED, session.setStagedSessionFailed(SessionInfo.STAGED_SESSION_VERIFICATION_FAILED, "APK-container signature verification failed for package " + apexPackage.packageName + ". Signature of file " + apexPackage.packagePath + " does not match the signature of " Loading @@ -240,7 +240,7 @@ public class StagingManager { session.setStagedSessionReady(); if (!sendMarkStagedSessionReadyRequest(session.sessionId)) { session.setStagedSessionFailed(SessionInfo.VERIFICATION_FAILED, session.setStagedSessionFailed(SessionInfo.STAGED_SESSION_VERIFICATION_FAILED, "APEX staging failed, check logcat messages from apexd for more " + "details."); } Loading Loading @@ -276,7 +276,7 @@ public class StagingManager { return; } if (apexSessionInfo.isActivationFailed || apexSessionInfo.isUnknown) { session.setStagedSessionFailed(SessionInfo.ACTIVATION_FAILED, session.setStagedSessionFailed(SessionInfo.STAGED_SESSION_ACTIVATION_FAILED, "APEX activation failed. Check logcat messages from apexd for " + "more information."); return; Loading @@ -301,8 +301,9 @@ public class StagingManager { } // The APEX part of the session is activated, proceed with the installation of APKs. if (!installApksInSession(session)) { session.setStagedSessionFailed(SessionInfo.ACTIVATION_FAILED, "APK installation for staged session " + session.sessionId + " failed."); session.setStagedSessionFailed(SessionInfo.STAGED_SESSION_ACTIVATION_FAILED, "APEX activation failed. Check logcat messages from apexd for " + "more information."); return; } session.setStagedSessionApplied(); Loading Loading
api/current.txt +4 −3 Original line number Diff line number Diff line Loading @@ -11465,11 +11465,12 @@ package android.content.pm { method public boolean isSessionReady(); method public boolean isStaged(); method public void writeToParcel(android.os.Parcel, int); field public static final int ACTIVATION_FAILED = 2; // 0x2 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 NO_ERROR = 0; // 0x0 field public static final int VERIFICATION_FAILED = 1; // 0x1 field public static final int STAGED_SESSION_ACTIVATION_FAILED = 2; // 0x2 field public static final int STAGED_SESSION_NO_ERROR = 0; // 0x0 field public static final int STAGED_SESSION_UNKNOWN = 3; // 0x3 field public static final int STAGED_SESSION_VERIFICATION_FAILED = 1; // 0x1 } public static class PackageInstaller.SessionParams implements android.os.Parcelable {
core/java/android/content/pm/PackageInstaller.java +13 −4 Original line number Diff line number Diff line Loading @@ -1625,26 +1625,35 @@ public class PackageInstaller { private static final int[] NO_SESSIONS = {}; /** @hide */ @IntDef(value = {NO_ERROR, VERIFICATION_FAILED, ACTIVATION_FAILED}) @IntDef(prefix = { "STAGED_SESSION_" }, value = { STAGED_SESSION_NO_ERROR, STAGED_SESSION_VERIFICATION_FAILED, STAGED_SESSION_ACTIVATION_FAILED, STAGED_SESSION_UNKNOWN}) @Retention(RetentionPolicy.SOURCE) public @interface StagedSessionErrorCode{} /** * Constant indicating that no error occurred during the preparation or the activation of * this staged session. */ public static final int NO_ERROR = 0; public static final int STAGED_SESSION_NO_ERROR = 0; /** * Constant indicating that an error occurred during the verification phase (pre-reboot) of * this staged session. */ public static final int VERIFICATION_FAILED = 1; public static final int STAGED_SESSION_VERIFICATION_FAILED = 1; /** * Constant indicating that an error occurred during the activation phase (post-reboot) of * this staged session. */ public static final int ACTIVATION_FAILED = 2; public static final int STAGED_SESSION_ACTIVATION_FAILED = 2; /** * Constant indicating that an unknown error occurred while processing this staged session. */ public static final int STAGED_SESSION_UNKNOWN = 3; /** {@hide} */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) Loading
services/core/java/com/android/server/pm/PackageInstallerService.java +2 −2 Original line number Diff line number Diff line Loading @@ -567,8 +567,8 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements session = new PackageInstallerSession(mInternalCallback, mContext, mPm, this, mInstallThread.getLooper(), mStagingManager, sessionId, userId, installerPackageName, callingUid, params, createdMillis, stageDir, stageCid, false, false, null, SessionInfo.INVALID_ID, false, false, false, SessionInfo.NO_ERROR, ""); false, null, SessionInfo.INVALID_ID, false, false, false, SessionInfo.STAGED_SESSION_NO_ERROR, ""); synchronized (mSessions) { mSessions.put(sessionId, session); Loading
services/core/java/com/android/server/pm/PackageInstallerSession.java +4 −4 Original line number Diff line number Diff line Loading @@ -267,7 +267,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { @GuardedBy("mLock") private boolean mStagedSessionFailed; @GuardedBy("mLock") private int mStagedSessionErrorCode = SessionInfo.NO_ERROR; private int mStagedSessionErrorCode = SessionInfo.STAGED_SESSION_NO_ERROR; @GuardedBy("mLock") private String mStagedSessionErrorMessage; Loading Loading @@ -2004,7 +2004,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { mStagedSessionReady = true; mStagedSessionApplied = false; mStagedSessionFailed = false; mStagedSessionErrorCode = SessionInfo.NO_ERROR; mStagedSessionErrorCode = SessionInfo.STAGED_SESSION_NO_ERROR; mStagedSessionErrorMessage = ""; } mCallback.onStagedSessionChanged(this); Loading @@ -2030,7 +2030,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { mStagedSessionReady = false; mStagedSessionApplied = true; mStagedSessionFailed = false; mStagedSessionErrorCode = SessionInfo.NO_ERROR; mStagedSessionErrorCode = SessionInfo.STAGED_SESSION_NO_ERROR; mStagedSessionErrorMessage = ""; } mCallback.onStagedSessionChanged(this); Loading Loading @@ -2298,7 +2298,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { final boolean isFailed = readBooleanAttribute(in, ATTR_IS_FAILED); final boolean isApplied = readBooleanAttribute(in, ATTR_IS_APPLIED); final int stagedSessionErrorCode = readIntAttribute(in, ATTR_STAGED_SESSION_ERROR_CODE, SessionInfo.NO_ERROR); SessionInfo.STAGED_SESSION_NO_ERROR); final String stagedSessionErrorMessage = readStringAttribute(in, ATTR_STAGED_SESSION_ERROR_MESSAGE); Loading
services/core/java/com/android/server/pm/StagingManager.java +7 −6 Original line number Diff line number Diff line Loading @@ -215,7 +215,7 @@ public class StagingManager { if (!success) { session.setStagedSessionFailed( SessionInfo.VERIFICATION_FAILED, SessionInfo.STAGED_SESSION_VERIFICATION_FAILED, "APEX staging failed, check logcat messages from apexd for more details."); } Loading @@ -227,7 +227,7 @@ public class StagingManager { for (ApexInfo apexPackage : apexInfoList.apexInfos) { if (!validateApexSignature(apexPackage.packagePath, apexPackage.packageName)) { session.setStagedSessionFailed(SessionInfo.VERIFICATION_FAILED, session.setStagedSessionFailed(SessionInfo.STAGED_SESSION_VERIFICATION_FAILED, "APK-container signature verification failed for package " + apexPackage.packageName + ". Signature of file " + apexPackage.packagePath + " does not match the signature of " Loading @@ -240,7 +240,7 @@ public class StagingManager { session.setStagedSessionReady(); if (!sendMarkStagedSessionReadyRequest(session.sessionId)) { session.setStagedSessionFailed(SessionInfo.VERIFICATION_FAILED, session.setStagedSessionFailed(SessionInfo.STAGED_SESSION_VERIFICATION_FAILED, "APEX staging failed, check logcat messages from apexd for more " + "details."); } Loading Loading @@ -276,7 +276,7 @@ public class StagingManager { return; } if (apexSessionInfo.isActivationFailed || apexSessionInfo.isUnknown) { session.setStagedSessionFailed(SessionInfo.ACTIVATION_FAILED, session.setStagedSessionFailed(SessionInfo.STAGED_SESSION_ACTIVATION_FAILED, "APEX activation failed. Check logcat messages from apexd for " + "more information."); return; Loading @@ -301,8 +301,9 @@ public class StagingManager { } // The APEX part of the session is activated, proceed with the installation of APKs. if (!installApksInSession(session)) { session.setStagedSessionFailed(SessionInfo.ACTIVATION_FAILED, "APK installation for staged session " + session.sessionId + " failed."); session.setStagedSessionFailed(SessionInfo.STAGED_SESSION_ACTIVATION_FAILED, "APEX activation failed. Check logcat messages from apexd for " + "more information."); return; } session.setStagedSessionApplied(); Loading