Merge "Change CARRIER_SETUP hook in WirelessSettings to use aeroshell for determining carrier app instead of MCC/MNC." into lmp-dev

This commit is contained in:
Diego Pontoriero
2014-08-21 16:34:37 +00:00
committed by Android (Google) Code Review

View File

@@ -129,9 +129,13 @@ public class WirelessSettings extends SettingsPreferenceFragment
if (mTm.hasIccCard() && (ni != null)) { if (mTm.hasIccCard() && (ni != null)) {
// Check for carrier apps that can handle provisioning first // Check for carrier apps that can handle provisioning first
Intent provisioningIntent = new Intent(TelephonyIntents.ACTION_CARRIER_SETUP); Intent provisioningIntent = new Intent(TelephonyIntents.ACTION_CARRIER_SETUP);
provisioningIntent.addCategory(TelephonyIntents.CATEGORY_MCCMNC_PREFIX List<String> carrierPackages =
+ mTm.getSimOperator()); mTm.getCarrierPackageNamesForBroadcastIntent(provisioningIntent);
if (mPm.resolveActivity(provisioningIntent, 0 /* flags */) != null) { 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); startActivity(provisioningIntent);
return; return;
} }