diff options
author | Shishir Agrawal <shishir@google.com> | 2014-07-21 13:17:33 -0700 |
---|---|---|
committer | Shishir Agrawal <shishir@google.com> | 2014-07-23 15:29:50 -0700 |
commit | 63c4c06be44fe8bd4506e6f9f57361d31e947c21 (patch) | |
tree | abf37c2b07fa4f8e930a1468e0a6a6fc2eb7eaa8 /telephony | |
parent | 73b7a4db4116774156fda3a510cc3afa14be9ffd (diff) | |
download | frameworks_base-63c4c06be44fe8bd4506e6f9f57361d31e947c21.zip frameworks_base-63c4c06be44fe8bd4506e6f9f57361d31e947c21.tar.gz frameworks_base-63c4c06be44fe8bd4506e6f9f57361d31e947c21.tar.bz2 |
Expose getCarrierPackageNamesForBroadcastIntent as a hidden @SystemApi
It will be required by setup wizard to delegate initialization to the carrier
app.
Change-Id: Icc0fc728e1e24235632ac38a482b06a7b829de78
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 14 | ||||
-rw-r--r-- | telephony/java/com/android/internal/telephony/ITelephony.aidl | 12 |
2 files changed, 26 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 9cff765..2555874 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -20,6 +20,7 @@ import android.annotation.SystemApi; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.content.Context; +import android.content.Intent; import android.os.Bundle; import android.os.RemoteException; import android.os.ServiceManager; @@ -2980,6 +2981,19 @@ public class TelephonyManager { /** @hide */ @SystemApi + public List<String> getCarrierPackageNamesForBroadcastIntent(Intent intent) { + try { + return getITelephony().getCarrierPackageNamesForBroadcastIntent(intent); + } catch (RemoteException ex) { + Rlog.e(TAG, "getCarrierPackageNamesForBroadcastIntent RemoteException", ex); + } catch (NullPointerException ex) { + Rlog.e(TAG, "getCarrierPackageNamesForBroadcastIntent NPE", ex); + } + return null; + } + + /** @hide */ + @SystemApi public void dial(String number) { try { getITelephony().dial(number); diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 435c334..ec7b8ae 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -16,6 +16,7 @@ package com.android.internal.telephony; +import android.content.Intent; import android.os.Bundle; import java.util.List; import android.telephony.NeighboringCellInfo; @@ -660,6 +661,17 @@ interface ITelephony { int checkCarrierPrivilegesForPackage(String pkgname); /** + * Returns the package name of the carrier apps that should handle the input intent. + * + * @param packageManager PackageManager for getting receivers. + * @param intent Intent that will be broadcast. + * @return list of carrier app package names that can handle the intent. + * Returns null if there is an error and an empty list if there + * are no matching packages. + */ + List<String> getCarrierPackageNamesForBroadcastIntent(in Intent intent); + + /** * Set whether Android should display a simplified Mobile Network Settings UI. * The setting won't be persisted during power cycle. * |