Remove the PackageManager.INSTALL_UNKNOWN check (3/n)

Though unlikely, the notification will never be sent and the install
process will stuck forever if one of params.mRet equlas
PackageManager.INSTALL_UNKNOWN.

We should just treat PackageManager.INSTALL_UNKNOWN as failure.

Bug: 203026561
Test: atest CtsStagedInstallHostTestCases

Change-Id: Ib7070ce89a667bf8a5ab2ceed6b0cc4c7fac44c9
This commit is contained in:
JW Wang
2021-10-05 17:27:33 +08:00
parent 40e746c787
commit 4e73aea718

View File

@@ -758,9 +758,7 @@ final class VerificationParams extends HandlerParams {
String errorMsg = null;
for (VerificationParams params : mVerificationState) {
int status = params.mRet;
if (status == PackageManager.INSTALL_UNKNOWN) {
return;
} else if (status != PackageManager.INSTALL_SUCCEEDED) {
if (status != PackageManager.INSTALL_SUCCEEDED) {
completeStatus = status;
errorMsg = params.mErrorMessage;
break;