Avoid crash when calling abandonSession

This commit is contained in:
LoveSy 2023-04-05 08:43:08 +08:00 committed by John Wu
parent 9279f30e89
commit b0fc580860

View File

@ -115,7 +115,10 @@ public final class APKInstall {
var installer = context.getPackageManager().getPackageInstaller();
var info = installer.getSessionInfo(id);
if (info != null) {
installer.abandonSession(info.getSessionId());
try {
installer.abandonSession(info.getSessionId());
} catch (Throwable ignored) {
}
}
}
if (onFailure != null) {