diff options
author | Diego Pontoriero <diegs@google.com> | 2014-08-21 03:01:39 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-08-21 03:01:39 +0000 |
commit | 2d21ec47ca46b2c037278afe4558b405a0eed63c (patch) | |
tree | 48f835e210d4c25c4c21d773dc6766aafd907598 | |
parent | 58201d9a8b050ffbaf4787bc3b21ee98bc41aaf7 (diff) | |
parent | 735c479664e6ee9ececbda9aca74a3e8653945c2 (diff) | |
download | frameworks_base-2d21ec47ca46b2c037278afe4558b405a0eed63c.zip frameworks_base-2d21ec47ca46b2c037278afe4558b405a0eed63c.tar.gz frameworks_base-2d21ec47ca46b2c037278afe4558b405a0eed63c.tar.bz2 |
am 744a16e4: am dede6854: Merge "Change CARRIER_SETUP hook in ConnectivityService to use Aeroshell API for determining carrier app instead of MCC/MNC." into lmp-dev
* commit '744a16e448533d591205fb24c46ee218e08d4e4e':
Change CARRIER_SETUP hook in ConnectivityService to use Aeroshell API for determining carrier app instead of MCC/MNC.
-rw-r--r-- | services/core/java/com/android/server/ConnectivityService.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index 67c01e5..5b216ed 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -3490,10 +3490,13 @@ public class ConnectivityService extends IConnectivityManager.Stub { mIsProvisioningNetwork.set(false); // Check for apps that can handle provisioning first Intent provisioningIntent = new Intent(TelephonyIntents.ACTION_CARRIER_SETUP); - provisioningIntent.addCategory(TelephonyIntents.CATEGORY_MCCMNC_PREFIX - + mTelephonyManager.getSimOperator()); - if (mContext.getPackageManager().resolveActivity(provisioningIntent, 0 /* flags */) - != null) { + List<String> carrierPackages = + mTelephonyManager.getCarrierPackageNamesForBroadcastIntent(provisioningIntent); + if (carrierPackages != null && !carrierPackages.isEmpty()) { + 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 | Intent.FLAG_ACTIVITY_NEW_TASK); mContext.startActivity(provisioningIntent); |