From 4c7720ba8650b3e3b1fae5d9c0c8945de17120fe Mon Sep 17 00:00:00 2001 From: paulhu Date: Tue, 13 Apr 2021 09:41:30 +0800 Subject: [PATCH] Add [get|set]MaxManifestReceiverApiLevel to test api for CTS Bug: 185184155 Test: m update-api Change-Id: I73087f071e9cff7fd88e137eac8993738589772c --- core/api/test-current.txt | 2 ++ core/java/android/app/BroadcastOptions.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/core/api/test-current.txt b/core/api/test-current.txt index 9931bf9d78c23..69fc0284c6864 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -255,10 +255,12 @@ package android.app { public class BroadcastOptions { ctor public BroadcastOptions(@NonNull android.os.Bundle); + method public int getMaxManifestReceiverApiLevel(); method public long getTemporaryAppAllowlistDuration(); method @Nullable public String getTemporaryAppAllowlistReason(); method public int getTemporaryAppAllowlistReasonCode(); method public int getTemporaryAppAllowlistType(); + method public void setMaxManifestReceiverApiLevel(int); } public class DownloadManager { diff --git a/core/java/android/app/BroadcastOptions.java b/core/java/android/app/BroadcastOptions.java index 9da2581e449f3..bd7162c1bf3b6 100644 --- a/core/java/android/app/BroadcastOptions.java +++ b/core/java/android/app/BroadcastOptions.java @@ -250,6 +250,7 @@ public class BroadcastOptions { * them. This only applies to receivers declared in the app's AndroidManifest.xml. * @hide */ + @TestApi @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public void setMaxManifestReceiverApiLevel(int apiLevel) { mMaxManifestReceiverApiLevel = apiLevel; @@ -259,6 +260,7 @@ public class BroadcastOptions { * Return {@link #setMaxManifestReceiverApiLevel}. * @hide */ + @TestApi @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public int getMaxManifestReceiverApiLevel() { return mMaxManifestReceiverApiLevel;