From baf1aad78e3b2ed8d6d3c7c4d2045f059753de97 Mon Sep 17 00:00:00 2001 From: Christopher Tate Date: Mon, 24 May 2021 13:03:41 -0700 Subject: [PATCH] Retire preliminary FGS deferral control API Now that we've settled the final API for this mechanism, retire the preliminary one. Bug: 186475652 Test: atest CtsAppTestCases:ServiceTest Test: atest CtsAppTestCases:NotificationManagerTest Change-Id: Ibe911627ad59b991f2e498689f7fa3019c19dc36 --- core/api/current.txt | 1 - core/java/android/app/Notification.java | 16 ---------------- 2 files changed, 17 deletions(-) diff --git a/core/api/current.txt b/core/api/current.txt index f546f531b08f5..d73e3a0e7af3d 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -5958,7 +5958,6 @@ package android.app { method @NonNull public android.app.Notification.Builder setRemoteInputHistory(CharSequence[]); method @NonNull public android.app.Notification.Builder setSettingsText(CharSequence); method @NonNull public android.app.Notification.Builder setShortcutId(String); - method @Deprecated @NonNull public android.app.Notification.Builder setShowForegroundImmediately(boolean); method @NonNull public android.app.Notification.Builder setShowWhen(boolean); method @NonNull public android.app.Notification.Builder setSmallIcon(@DrawableRes int); method @NonNull public android.app.Notification.Builder setSmallIcon(@DrawableRes int, int); diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index 18651411cf132..9b594b7825d06 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -4594,22 +4594,6 @@ public class Notification implements Parcelable return this; } - /** - * Set to {@code true} to require that the Notification associated with a - * foreground service is shown as soon as the service's {@code startForeground()} - * method is called, even if the system's UI policy might otherwise defer - * its visibility to a later time. - * @deprecated Use setForegroundServiceBehavior(int) instead - */ - @Deprecated - @NonNull - public Builder setShowForegroundImmediately(boolean showImmediately) { - setForegroundServiceBehavior(showImmediately - ? FOREGROUND_SERVICE_IMMEDIATE - : FOREGROUND_SERVICE_DEFAULT); - return this; - } - /** * Specify a desired visibility policy for a Notification associated with a * foreground service. By default, the system can choose to defer