Change CARRIER_SETUP hook in WirelessSettings to use aeroshell
for determining carrier app instead of MCC/MNC. Related WirelessSettings change: http://ag/374330 Related Aeroshell change to SetupWizard: http://ag/520857 Bug: 16457806 Change-Id: I60277b27e9e205041eb3969a110a57da0fb62023
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user