Merge "Change CARRIER_SETUP hook in ConnectivityService to use Aeroshell API for determining carrier app instead of MCC/MNC." into lmp-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
b0b5d7eb83
@@ -3490,10 +3490,13 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
mIsProvisioningNetwork.set(false);
|
mIsProvisioningNetwork.set(false);
|
||||||
// Check for apps that can handle provisioning first
|
// Check for 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 =
|
||||||
+ mTelephonyManager.getSimOperator());
|
mTelephonyManager.getCarrierPackageNamesForBroadcastIntent(provisioningIntent);
|
||||||
if (mContext.getPackageManager().resolveActivity(provisioningIntent, 0 /* flags */)
|
if (carrierPackages != null && !carrierPackages.isEmpty()) {
|
||||||
!= null) {
|
if (carrierPackages.size() != 1) {
|
||||||
|
if (DBG) log("Multiple matching carrier apps found, launching the first.");
|
||||||
|
}
|
||||||
|
provisioningIntent.setPackage(carrierPackages.get(0));
|
||||||
provisioningIntent.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT |
|
provisioningIntent.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT |
|
||||||
Intent.FLAG_ACTIVITY_NEW_TASK);
|
Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
mContext.startActivity(provisioningIntent);
|
mContext.startActivity(provisioningIntent);
|
||||||
|
|||||||
Reference in New Issue
Block a user