From 293ee3fdde0a6833c2dcf54a172b5c7fb2bf824d Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Fri, 10 Mar 2023 10:07:41 -0700 Subject: [PATCH] Update system APIs based on feedback. API council has requested that the recently added BroadcastOptions APIs be modified to better match API guidelines. Bug: 267646347 Test: treehugger Change-Id: I7e4e649b6fc46212fbfad53b32cbcee1b5a2efa7 --- core/api/system-current.txt | 2 -- core/java/android/app/BroadcastOptions.java | 4 ---- 2 files changed, 6 deletions(-) diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 7eedbc341132c..f7fd03a8722a7 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -762,11 +762,9 @@ package android.app { public class BroadcastOptions { method public void clearRequireCompatChange(); method public int getPendingIntentBackgroundActivityStartMode(); - method @Deprecated public boolean isDeferUntilActive(); method @Deprecated public boolean isPendingIntentBackgroundActivityLaunchAllowed(); method @RequiresPermission(android.Manifest.permission.ACCESS_BROADCAST_RESPONSE_STATS) public void recordResponseEventWhileInBackground(@IntRange(from=0) long); method @RequiresPermission(android.Manifest.permission.START_ACTIVITIES_FROM_BACKGROUND) public void setBackgroundActivityStartsAllowed(boolean); - method @Deprecated @NonNull public android.app.BroadcastOptions setDeferUntilActive(boolean); method public void setDontSendToRestrictedApps(boolean); method @Deprecated public void setPendingIntentBackgroundActivityLaunchAllowed(boolean); method @NonNull public android.app.BroadcastOptions setPendingIntentBackgroundActivityStartMode(int); diff --git a/core/java/android/app/BroadcastOptions.java b/core/java/android/app/BroadcastOptions.java index aa253f2ebe316..bccbb381bfb13 100644 --- a/core/java/android/app/BroadcastOptions.java +++ b/core/java/android/app/BroadcastOptions.java @@ -782,9 +782,7 @@ public class BroadcastOptions extends ComponentOptions { } /** {@hide} */ - @SystemApi @Deprecated - // STOPSHIP: remove entirely after this API change lands in AOSP public @NonNull BroadcastOptions setDeferUntilActive(boolean shouldDefer) { if (shouldDefer) { setDeferralPolicy(DEFERRAL_POLICY_UNTIL_ACTIVE); @@ -795,9 +793,7 @@ public class BroadcastOptions extends ComponentOptions { } /** {@hide} */ - @SystemApi @Deprecated - // STOPSHIP: remove entirely after this API change lands in AOSP public boolean isDeferUntilActive() { return (mDeferralPolicy == DEFERRAL_POLICY_UNTIL_ACTIVE); }