Expose PendingIntent APIs for exposing component/type for CTS

Bug: 177701160
Test: atest CtsAppTestCases:android.app.cts.PendingIntentTest
      #testGetIntentComponentAndType
Change-Id: I7d57f44cf5d79debb776fa93e9e97b919eb5252e
diff --git a/core/api/test-current.txt b/core/api/test-current.txt
index c237d7d..09c46c2 100644
--- a/core/api/test-current.txt
+++ b/core/api/test-current.txt
@@ -281,6 +281,7 @@
   }
 
   public final class PendingIntent implements android.os.Parcelable {
+    method @Nullable @RequiresPermission("android.permission.GET_INTENT_SENDER_INTENT") public java.util.List<android.content.pm.ResolveInfo> queryIntentComponents(int);
     field @Deprecated public static final int FLAG_MUTABLE_UNAUDITED = 33554432; // 0x2000000
   }
 
diff --git a/core/java/android/app/PendingIntent.java b/core/java/android/app/PendingIntent.java
index 8635222..534f3e2 100644
--- a/core/java/android/app/PendingIntent.java
+++ b/core/java/android/app/PendingIntent.java
@@ -1277,6 +1277,7 @@
      */
     @RequiresPermission(permission.GET_INTENT_SENDER_INTENT)
     @SystemApi(client = Client.MODULE_LIBRARIES)
+    @TestApi
     public @Nullable List<ResolveInfo> queryIntentComponents(@ResolveInfoFlags int flags) {
         try {
             return ActivityManager.getService()