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

Commit 747c6e83 authored by Derek Tan's avatar Derek Tan Committed by Android (Google) Code Review
Browse files

Merge "Prevent any app except LPA to create logical channel to AID of ISD-R." into oc-dr1-dev

parents d99fe0de be81b0ce
Loading
Loading
Loading
Loading
+15 −7
Original line number Diff line number Diff line
@@ -157,6 +157,20 @@ public class EuiccConnector extends StateMachine implements ServiceConnection {
        return bestComponent;
    }

    /**
     * Return the component info of the EuiccService to bind to, or null if none were found.
     */
    public static ComponentInfo findBestComponent(PackageManager packageManager) {
        Intent intent = new Intent(EuiccService.EUICC_SERVICE_INTERFACE);
        List<ResolveInfo> resolveInfoList =
                packageManager.queryIntentServices(intent, EUICC_QUERY_FLAGS);
        ComponentInfo bestComponent = findBestComponent(packageManager, resolveInfoList);
        if (bestComponent == null) {
            Log.w(TAG, "No valid EuiccService implementation found");
        }
        return bestComponent;
    }

    /** Base class for all command callbacks. */
    @VisibleForTesting(visibility = PACKAGE)
    public interface BaseEuiccCommandCallback {
@@ -874,13 +888,7 @@ public class EuiccConnector extends StateMachine implements ServiceConnection {
    /** Return the service info of the EuiccService to bind to, or null if none were found. */
    @Nullable
    private ServiceInfo findBestComponent() {
        Intent intent = new Intent(EuiccService.EUICC_SERVICE_INTERFACE);
        List<ResolveInfo> resolveInfoList = mPm.queryIntentServices(intent, EUICC_QUERY_FLAGS);
        ServiceInfo bestComponent = (ServiceInfo) findBestComponent(mPm, resolveInfoList);
        if (bestComponent == null) {
            Log.w(TAG, "No valid EuiccService implementation found");
        }
        return bestComponent;
        return (ServiceInfo) findBestComponent(mPm);
    }

    /**