From ecbb7319f87fce3822e0583ff8115863a0aca6c8 Mon Sep 17 00:00:00 2001 From: Jin Seok Park Date: Thu, 21 Jan 2021 12:03:23 +0900 Subject: [PATCH] Expose PendingIntent APIs for exposing component/type for CTS Bug: 177701160 Test: atest CtsAppTestCases:android.app.cts.PendingIntentTest #testGetIntentComponentAndType Change-Id: I7d57f44cf5d79debb776fa93e9e97b919eb5252e --- core/api/test-current.txt | 1 + core/java/android/app/PendingIntent.java | 1 + 2 files changed, 2 insertions(+) diff --git a/core/api/test-current.txt b/core/api/test-current.txt index c237d7d572382..09c46c2a6991a 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -281,6 +281,7 @@ package android.app { } public final class PendingIntent implements android.os.Parcelable { + method @Nullable @RequiresPermission("android.permission.GET_INTENT_SENDER_INTENT") public java.util.List 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 86352225292e2..534f3e25acde1 100644 --- a/core/java/android/app/PendingIntent.java +++ b/core/java/android/app/PendingIntent.java @@ -1277,6 +1277,7 @@ public final class PendingIntent implements Parcelable { */ @RequiresPermission(permission.GET_INTENT_SENDER_INTENT) @SystemApi(client = Client.MODULE_LIBRARIES) + @TestApi public @Nullable List queryIntentComponents(@ResolveInfoFlags int flags) { try { return ActivityManager.getService()