am 4130f9db: am 27656cae: Expose getCarrierPackageNamesForBroadcastIntent as a hidden @SystemApi

* commit '4130f9db4a6b846b703bf634eb3f05c2b080381d':
  Expose getCarrierPackageNamesForBroadcastIntent as a hidden @SystemApi
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 9cff765..2555874a 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -20,6 +20,7 @@
 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 @@
 
     /** @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 @@
     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.
      *