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

* commit 'dbfd04d80abb4bb605ebd517d52137108cc24d6d':
  Change CARRIER_SETUP hook in WirelessSettings to use aeroshell for determining carrier app instead of MCC/MNC.
This commit is contained in:
Diego Pontoriero
2014-08-21 16:41:56 +00:00
committed by Android Git Automerger

View File

@@ -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;
}