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

Commit dbfd04d8 authored by Diego Pontoriero's avatar Diego Pontoriero Committed by Android (Google) Code Review
Browse files

Merge "Change CARRIER_SETUP hook in WirelessSettings to use aeroshell for...

Merge "Change CARRIER_SETUP hook in WirelessSettings to use aeroshell for determining carrier app instead of MCC/MNC." into lmp-dev
parents 98f61b71 ff9f67dd
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -129,9 +129,13 @@ public class WirelessSettings extends SettingsPreferenceFragment
        if (mTm.hasIccCard() && (ni != null)) {
            // Check for carrier apps that can handle provisioning first
            Intent provisioningIntent = new Intent(TelephonyIntents.ACTION_CARRIER_SETUP);
            provisioningIntent.addCategory(TelephonyIntents.CATEGORY_MCCMNC_PREFIX
                    + mTm.getSimOperator());
            if (mPm.resolveActivity(provisioningIntent, 0 /* flags */) != null) {
            List<String> carrierPackages =
                    mTm.getCarrierPackageNamesForBroadcastIntent(provisioningIntent);
            if (carrierPackages != null && !carrierPackages.isEmpty()) {
                if (carrierPackages.size() != 1) {
                    Log.w(TAG, "Multiple matching carrier apps found, launching the first.");
                }
                provisioningIntent.setPackage(carrierPackages.get(0));
                startActivity(provisioningIntent);
                return;
            }