Don't special case for non-apex staged sessions.
So that we can reuse the existing call into rollback manager when rollback is enabled. Bug: 124221060 Test: adb install --staged file.apk Test: adb install file.apex Test: adb install-multi-package --staged file.apk Test: adb install-multi-package file.apex Test: adb install-multi-package file.apk file.apex Test: atest StagedRollbackTest (test currently under development). Change-Id: I8e8e417db11d07dd7404318240ee16235061ab4d
This commit is contained in:
@@ -156,12 +156,8 @@ public class StagingManager {
|
||||
boolean success = true;
|
||||
|
||||
// STOPSHIP: TODO(b/123753157): Verify APKs through Package Verifier.
|
||||
if (!sessionContainsApex(session)) {
|
||||
// TODO: Decide whether we want to fail fast by detecting signature mismatches for APKs,
|
||||
// right away.
|
||||
session.setStagedSessionReady();
|
||||
return;
|
||||
}
|
||||
// TODO: Decide whether we want to fail fast by detecting signature mismatches for APKs,
|
||||
// right away.
|
||||
|
||||
final ApexInfoList apexInfoList = new ApexInfoList();
|
||||
// APEX checks. For single-package sessions, check if they contain an APEX. For
|
||||
@@ -227,7 +223,8 @@ public class StagingManager {
|
||||
}
|
||||
|
||||
session.setStagedSessionReady();
|
||||
if (!mApexManager.markStagedSessionReady(session.sessionId)) {
|
||||
if (sessionContainsApex(session)
|
||||
&& !mApexManager.markStagedSessionReady(session.sessionId)) {
|
||||
session.setStagedSessionFailed(SessionInfo.STAGED_SESSION_VERIFICATION_FAILED,
|
||||
"APEX staging failed, check logcat messages from apexd for more "
|
||||
+ "details.");
|
||||
|
||||
Reference in New Issue
Block a user