Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 028e2b02 authored by Rhed Jao's avatar Rhed Jao
Browse files

Fix wrong error code in the PackageManagerException

The PackageManagerException thrown by installApexPackages was
re-thrown in the fallback exception. It caused wrong error code
updated.

Bug: 202998706
Test: atest CtsStagedInstallHostTestCases
Change-Id: I7c41dfc30beece739c94bc100dae0a59c0638248
parent 8181f28f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1081,6 +1081,10 @@ public abstract class ApexManager {
            } catch (RemoteException e) {
                throw new PackageManagerException(PackageManager.INSTALL_FAILED_INTERNAL_ERROR,
                        "apexservice not available");
            } catch (PackageManagerException e) {
                // Catching it in order not to fall back to Exception which rethrows the
                // PackageManagerException with a common error code.
                throw e;
            } catch (Exception e) {
                // TODO(b/187864524): is INSTALL_FAILED_INTERNAL_ERROR is the right error code here?
                throw new PackageManagerException(PackageManager.INSTALL_FAILED_INTERNAL_ERROR,