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

Commit 86c329ac authored by Dario Freni's avatar Dario Freni Committed by Android (Google) Code Review
Browse files

Merge "IllegalStateException if apex is unavailable."

parents c603effc a1c5f631
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.content.pm.PackageParser;
import android.content.pm.PackageParser.PackageParserException;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.ServiceManager.ServiceNotFoundException;
import android.util.Slog;

import com.android.internal.util.IndentingPrintWriter;
@@ -50,8 +51,12 @@ class ApexManager {
    private final Map<String, PackageInfo> mActivePackagesCache;

    ApexManager() {
        try {
            mApexService = IApexService.Stub.asInterface(
            ServiceManager.getService("apexservice"));
                ServiceManager.getServiceOrThrow("apexservice"));
        } catch (ServiceNotFoundException e) {
            throw new IllegalStateException("Required service apexservice not available");
        }
        mActivePackagesCache = populateActivePackagesCache();
    }