diff options
author | Junda Liu <junda@google.com> | 2015-04-19 04:30:11 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-04-19 04:30:15 +0000 |
commit | f47c6488ea7de6bf2938ffb5bb1549bcf948da49 (patch) | |
tree | 5e1e4775adedef251275d40e1f6a26a2462502f1 /telephony | |
parent | 5f6f559a629ba2a3833e20e940c28c5b127d5572 (diff) | |
parent | 0ff9fd87d0a0d88bf46945629d0a30f6e7fb3f55 (diff) | |
download | frameworks_base-f47c6488ea7de6bf2938ffb5bb1549bcf948da49.zip frameworks_base-f47c6488ea7de6bf2938ffb5bb1549bcf948da49.tar.gz frameworks_base-f47c6488ea7de6bf2938ffb5bb1549bcf948da49.tar.bz2 |
Merge "Add multi-sim support for getCarrierPackageNamesForIntent."
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 12 | ||||
-rw-r--r-- | telephony/java/com/android/internal/telephony/ITelephony.aidl | 9 |
2 files changed, 14 insertions, 7 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 7c68de2..c62197d 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -3632,14 +3632,20 @@ public class TelephonyManager { /** @hide */ @SystemApi public List<String> getCarrierPackageNamesForIntent(Intent intent) { + return getCarrierPackageNamesForIntentAndPhone(intent, getDefaultPhone()); + } + + /** @hide */ + @SystemApi + public List<String> getCarrierPackageNamesForIntentAndPhone(Intent intent, int phoneId) { try { ITelephony telephony = getITelephony(); if (telephony != null) - return telephony.getCarrierPackageNamesForIntent(intent); + return telephony.getCarrierPackageNamesForIntentAndPhone(intent, phoneId); } catch (RemoteException ex) { - Rlog.e(TAG, "getCarrierPackageNamesForIntent RemoteException", ex); + Rlog.e(TAG, "getCarrierPackageNamesForIntentAndPhone RemoteException", ex); } catch (NullPointerException ex) { - Rlog.e(TAG, "getCarrierPackageNamesForIntent NPE", ex); + Rlog.e(TAG, "getCarrierPackageNamesForIntentAndPhone NPE", ex); } return null; } diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 0b77c26..0bd3f1c 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -744,15 +744,16 @@ interface ITelephony { int checkCarrierPrivilegesForPackage(String pkgname); /** - * Returns the package name of the carrier apps that should handle the input intent. + * Returns list of the package names of the carrier apps that should handle the input intent + * and have carrier privileges for the given phoneId. * - * @param packageManager PackageManager for getting receivers. * @param intent Intent that will be sent. - * @return list of carrier app package names that can handle the intent. + * @param phoneId The phoneId on which the carrier app has carrier privileges. + * @return list of carrier app package names that can handle the intent on phoneId. * Returns null if there is an error and an empty list if there * are no matching packages. */ - List<String> getCarrierPackageNamesForIntent(in Intent intent); + List<String> getCarrierPackageNamesForIntentAndPhone(in Intent intent, int phoneId); /** * Set the line 1 phone number string and its alphatag for the current ICCID |