From 79a19effee0de8c6363815893223d58ee830bbd0 Mon Sep 17 00:00:00 2001 From: Ian Pedowitz Date: Thu, 2 May 2019 00:54:39 +0000 Subject: [PATCH] Revert "RESTRICT AUTOMERGE Remove deprecated System APIs added in Q." This reverts commit 02014297fd1c0e6673a91cf4b4215d4d2da8f133. Reason for revert: QT SDK Finalization. Will be merged again on/after May 13th Bug: 129975435 Change-Id: Ia054b193a982dee669630555974d2d7831fe2b50 --- api/system-current.txt | 14 +++++ api/system-removed.txt | 52 ------------------- api/test-current.txt | 2 + api/test-removed.txt | 9 ---- core/java/android/app/AppOpsManager.java | 1 - .../android/app/backup/RestoreSession.java | 2 - .../android/app/prediction/AppTarget.java | 3 -- .../android/content/pm/PackageItemInfo.java | 3 -- .../ContentSuggestionsService.java | 4 -- .../java/android/telecom/TelecomManager.java | 1 - 10 files changed, 16 insertions(+), 75 deletions(-) diff --git a/api/system-current.txt b/api/system-current.txt index 93c35209c647c..2ce1ee15d98d0 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -317,6 +317,7 @@ package android.app { public class AppOpsManager { method @RequiresPermission(android.Manifest.permission.GET_APP_OPS_STATS) public void getHistoricalOps(@NonNull android.app.AppOpsManager.HistoricalOpsRequest, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer); method public static String[] getOpStrs(); + method @Deprecated @NonNull @RequiresPermission(android.Manifest.permission.GET_APP_OPS_STATS) public java.util.List getOpsForPackage(int, @NonNull String, @Nullable int[]); method @NonNull @RequiresPermission(android.Manifest.permission.GET_APP_OPS_STATS) public java.util.List getOpsForPackage(int, @NonNull String, @Nullable java.lang.String...); method @NonNull @RequiresPermission(android.Manifest.permission.GET_APP_OPS_STATS) public java.util.List getPackagesForOps(@Nullable String[]); method public static int opToDefaultMode(@NonNull String); @@ -935,6 +936,8 @@ package android.app.backup { method public int restorePackage(String, android.app.backup.RestoreObserver); method public int restorePackages(long, @Nullable android.app.backup.RestoreObserver, @NonNull java.util.Set, @Nullable android.app.backup.BackupManagerMonitor); method public int restorePackages(long, @Nullable android.app.backup.RestoreObserver, @NonNull java.util.Set); + method @Deprecated public int restoreSome(long, android.app.backup.RestoreObserver, android.app.backup.BackupManagerMonitor, String[]); + method @Deprecated public int restoreSome(long, android.app.backup.RestoreObserver, String[]); } public class RestoreSet implements android.os.Parcelable { @@ -1089,11 +1092,14 @@ package android.app.prediction { } public static final class AppTarget.Builder { + ctor @Deprecated public AppTarget.Builder(@NonNull android.app.prediction.AppTargetId); ctor public AppTarget.Builder(@NonNull android.app.prediction.AppTargetId, @NonNull String, @NonNull android.os.UserHandle); ctor public AppTarget.Builder(@NonNull android.app.prediction.AppTargetId, @NonNull android.content.pm.ShortcutInfo); method @NonNull public android.app.prediction.AppTarget build(); method @NonNull public android.app.prediction.AppTarget.Builder setClassName(@NonNull String); method @NonNull public android.app.prediction.AppTarget.Builder setRank(@IntRange(from=0) int); + method @Deprecated @NonNull public android.app.prediction.AppTarget.Builder setTarget(@NonNull String, @NonNull android.os.UserHandle); + method @Deprecated @NonNull public android.app.prediction.AppTarget.Builder setTarget(@NonNull android.content.pm.ShortcutInfo); } public final class AppTargetEvent implements android.os.Parcelable { @@ -1596,6 +1602,9 @@ package android.content.pm { method public static void forceSafeLabels(); method @Deprecated @NonNull public CharSequence loadSafeLabel(@NonNull android.content.pm.PackageManager); method @NonNull public CharSequence loadSafeLabel(@NonNull android.content.pm.PackageManager, @FloatRange(from=0) float, int); + field @Deprecated public static final int SAFE_LABEL_FLAG_FIRST_LINE = 4; // 0x4 + field @Deprecated public static final int SAFE_LABEL_FLAG_SINGLE_LINE = 2; // 0x2 + field @Deprecated public static final int SAFE_LABEL_FLAG_TRIM = 1; // 0x1 } public abstract class PackageManager { @@ -6391,10 +6400,14 @@ package android.service.contentsuggestions { public abstract class ContentSuggestionsService extends android.app.Service { ctor public ContentSuggestionsService(); + method @Deprecated public void classifyContentSelections(@NonNull android.app.contentsuggestions.ClassificationsRequest, @NonNull android.app.contentsuggestions.ContentSuggestionsManager.ClassificationsCallback); + method @Deprecated public void notifyInteraction(@NonNull String, @NonNull android.os.Bundle); method public void onClassifyContentSelections(@NonNull android.app.contentsuggestions.ClassificationsRequest, @NonNull android.app.contentsuggestions.ContentSuggestionsManager.ClassificationsCallback); method public void onNotifyInteraction(@NonNull String, @NonNull android.os.Bundle); method public void onProcessContextImage(int, @Nullable android.graphics.Bitmap, @NonNull android.os.Bundle); method public void onSuggestContentSelections(@NonNull android.app.contentsuggestions.SelectionsRequest, @NonNull android.app.contentsuggestions.ContentSuggestionsManager.SelectionsCallback); + method @Deprecated public void processContextImage(int, @Nullable android.graphics.Bitmap, @NonNull android.os.Bundle); + method @Deprecated public void suggestContentSelections(@NonNull android.app.contentsuggestions.SelectionsRequest, @NonNull android.app.contentsuggestions.ContentSuggestionsManager.SelectionsCallback); field public static final String SERVICE_INTERFACE = "android.service.contentsuggestions.ContentSuggestionsService"; } @@ -7092,6 +7105,7 @@ package android.telecom { method @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public java.util.List getPhoneAccountsSupportingScheme(String); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean isInEmergencyCall(); method @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isRinging(); + method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.MODIFY_PHONE_STATE, android.Manifest.permission.WRITE_SECURE_SETTINGS}) public boolean setDefaultDialer(@Nullable String); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setUserSelectedOutgoingPhoneAccount(@Nullable android.telecom.PhoneAccountHandle); field public static final String EXTRA_CALL_BACK_INTENT = "android.telecom.extra.CALL_BACK_INTENT"; field public static final String EXTRA_CLEAR_MISSED_CALLS_INTENT = "android.telecom.extra.CLEAR_MISSED_CALLS_INTENT"; diff --git a/api/system-removed.txt b/api/system-removed.txt index 6709b0e6f8b7c..8f7112266457d 100644 --- a/api/system-removed.txt +++ b/api/system-removed.txt @@ -9,10 +9,6 @@ package android { package android.app { - public class AppOpsManager { - method @Deprecated @NonNull @RequiresPermission(android.Manifest.permission.GET_APP_OPS_STATS) public java.util.List getOpsForPackage(int, @NonNull String, @Nullable int[]); - } - public class Notification implements android.os.Parcelable { method public static Class getNotificationStyleClass(String); } @@ -32,25 +28,6 @@ package android.app.admin { } -package android.app.backup { - - public class RestoreSession { - method @Deprecated public int restoreSome(long, android.app.backup.RestoreObserver, android.app.backup.BackupManagerMonitor, String[]); - method @Deprecated public int restoreSome(long, android.app.backup.RestoreObserver, String[]); - } - -} - -package android.app.prediction { - - public static final class AppTarget.Builder { - ctor @Deprecated public AppTarget.Builder(@NonNull android.app.prediction.AppTargetId); - method @Deprecated @NonNull public android.app.prediction.AppTarget.Builder setTarget(@NonNull String, @NonNull android.os.UserHandle); - method @Deprecated @NonNull public android.app.prediction.AppTarget.Builder setTarget(@NonNull android.content.pm.ShortcutInfo); - } - -} - package android.content { public class Intent implements java.lang.Cloneable android.os.Parcelable { @@ -83,16 +60,6 @@ package android.content { } -package android.content.pm { - - public class PackageItemInfo { - field @Deprecated public static final int SAFE_LABEL_FLAG_FIRST_LINE = 4; // 0x4 - field @Deprecated public static final int SAFE_LABEL_FLAG_SINGLE_LINE = 2; // 0x2 - field @Deprecated public static final int SAFE_LABEL_FLAG_TRIM = 1; // 0x1 - } - -} - package android.hardware.hdmi { public final class HdmiControlManager { @@ -171,17 +138,6 @@ package android.provider { } -package android.service.contentsuggestions { - - public abstract class ContentSuggestionsService extends android.app.Service { - method @Deprecated public void classifyContentSelections(@NonNull android.app.contentsuggestions.ClassificationsRequest, @NonNull android.app.contentsuggestions.ContentSuggestionsManager.ClassificationsCallback); - method @Deprecated public void notifyInteraction(@NonNull String, @NonNull android.os.Bundle); - method @Deprecated public void processContextImage(int, @Nullable android.graphics.Bitmap, @NonNull android.os.Bundle); - method @Deprecated public void suggestContentSelections(@NonNull android.app.contentsuggestions.SelectionsRequest, @NonNull android.app.contentsuggestions.ContentSuggestionsManager.SelectionsCallback); - } - -} - package android.service.notification { public abstract class NotificationListenerService extends android.app.Service { @@ -202,14 +158,6 @@ package android.service.notification { } -package android.telecom { - - public class TelecomManager { - method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.MODIFY_PHONE_STATE, android.Manifest.permission.WRITE_SECURE_SETTINGS}) public boolean setDefaultDialer(@Nullable String); - } - -} - package android.telephony { public class TelephonyManager { diff --git a/api/test-current.txt b/api/test-current.txt index d3b6b5e5cb850..77c3a94f1d108 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -520,6 +520,8 @@ package android.app.prediction { method @NonNull public android.app.prediction.AppTarget build(); method @NonNull public android.app.prediction.AppTarget.Builder setClassName(@NonNull String); method @NonNull public android.app.prediction.AppTarget.Builder setRank(@IntRange(from=0) int); + method @Deprecated @NonNull public android.app.prediction.AppTarget.Builder setTarget(@NonNull String, @NonNull android.os.UserHandle); + method @Deprecated @NonNull public android.app.prediction.AppTarget.Builder setTarget(@NonNull android.content.pm.ShortcutInfo); } public final class AppTargetEvent implements android.os.Parcelable { diff --git a/api/test-removed.txt b/api/test-removed.txt index ef0aac7eac9aa..83a5708a2eb3a 100644 --- a/api/test-removed.txt +++ b/api/test-removed.txt @@ -1,13 +1,4 @@ // Signature format: 2.0 -package android.app.prediction { - - public static final class AppTarget.Builder { - method @Deprecated @NonNull public android.app.prediction.AppTarget.Builder setTarget(@NonNull String, @NonNull android.os.UserHandle); - method @Deprecated @NonNull public android.app.prediction.AppTarget.Builder setTarget(@NonNull android.content.pm.ShortcutInfo); - } - -} - package android.provider { public final class DeviceConfig { diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java index 2957813a5a7db..713fd1cf68794 100644 --- a/core/java/android/app/AppOpsManager.java +++ b/core/java/android/app/AppOpsManager.java @@ -4337,7 +4337,6 @@ public class AppOpsManager { * {@link #getOpsForPackage(int, String, String...)})}. * * @hide - * @removed */ @Deprecated @SystemApi diff --git a/core/java/android/app/backup/RestoreSession.java b/core/java/android/app/backup/RestoreSession.java index 933670415f2e0..084b13b616174 100644 --- a/core/java/android/app/backup/RestoreSession.java +++ b/core/java/android/app/backup/RestoreSession.java @@ -214,7 +214,6 @@ public class RestoreSession { * * @deprecated use {@link RestoreSession#restorePackages(long, RestoreObserver, * BackupManagerMonitor, Set)} instead. - * @removed */ @Deprecated public int restoreSome(long token, RestoreObserver observer, BackupManagerMonitor monitor, @@ -241,7 +240,6 @@ public class RestoreSession { * * @deprecated use {@link RestoreSession#restorePackages(long, RestoreObserver, Set)} * instead. - * @removed */ @Deprecated public int restoreSome(long token, RestoreObserver observer, String[] packages) { diff --git a/core/java/android/app/prediction/AppTarget.java b/core/java/android/app/prediction/AppTarget.java index 147c5000e3331..61e4569c1228b 100644 --- a/core/java/android/app/prediction/AppTarget.java +++ b/core/java/android/app/prediction/AppTarget.java @@ -206,7 +206,6 @@ public final class AppTarget implements Parcelable { /** * @deprecated Use the other Builder constructors. * @hide - * @removed */ @Deprecated @SystemApi @@ -245,7 +244,6 @@ public final class AppTarget implements Parcelable { /** * @deprecated Use the appropriate constructor. - * @removed */ @NonNull @Deprecated @@ -260,7 +258,6 @@ public final class AppTarget implements Parcelable { /** * @deprecated Use the appropriate constructor. - * @removed */ @NonNull @Deprecated diff --git a/core/java/android/content/pm/PackageItemInfo.java b/core/java/android/content/pm/PackageItemInfo.java index 081c5ad78762a..ff7b34773268a 100644 --- a/core/java/android/content/pm/PackageItemInfo.java +++ b/core/java/android/content/pm/PackageItemInfo.java @@ -62,7 +62,6 @@ public class PackageItemInfo { * * @deprecated Use {@link TextUtils#SAFE_STRING_FLAG_TRIM} instead * @hide - * @removed */ @Deprecated @SystemApi @@ -76,7 +75,6 @@ public class PackageItemInfo { * * @deprecated Use {@link TextUtils#SAFE_STRING_FLAG_SINGLE_LINE} instead * @hide - * @removed */ @Deprecated @SystemApi @@ -90,7 +88,6 @@ public class PackageItemInfo { * * @deprecated Use {@link TextUtils#SAFE_STRING_FLAG_FIRST_LINE} instead * @hide - * @removed */ @Deprecated @SystemApi diff --git a/core/java/android/service/contentsuggestions/ContentSuggestionsService.java b/core/java/android/service/contentsuggestions/ContentSuggestionsService.java index 9b41398fc98b2..55e61410b9e23 100644 --- a/core/java/android/service/contentsuggestions/ContentSuggestionsService.java +++ b/core/java/android/service/contentsuggestions/ContentSuggestionsService.java @@ -184,7 +184,6 @@ public abstract class ContentSuggestionsService extends Service { /** * For temporary compat reason, remove with b/127532182 * @deprecated use {@link #onProcessContextImage(int, Bitmap, Bundle)} instead. - * @removed */ @Deprecated public void processContextImage( @@ -195,7 +194,6 @@ public abstract class ContentSuggestionsService extends Service { * For temporary compat reason, remove with b/127532182 * @deprecated use {@link #onSuggestContentSelections(SelectionsRequest, * ContentSuggestionsManager.SelectionsCallback)} instead. - * @removed */ @Deprecated public void suggestContentSelections(@NonNull SelectionsRequest request, @@ -206,7 +204,6 @@ public abstract class ContentSuggestionsService extends Service { * For temporary compat reason, remove with b/127532182 * @deprecated use {@link #onClassifyContentSelections(ClassificationsRequest, * ContentSuggestionsManager.ClassificationsCallback)} instead. - * @removed */ @Deprecated public void classifyContentSelections(@NonNull ClassificationsRequest request, @@ -216,7 +213,6 @@ public abstract class ContentSuggestionsService extends Service { /** * For temporary compat reason, remove with b/127532182 * @deprecated use {@link #onNotifyInteraction(String, Bundle)} instead. - * @removed */ @Deprecated public void notifyInteraction(@NonNull String requestId, @NonNull Bundle interaction) { diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java index 8ddf1c863d6ae..db63198715406 100644 --- a/telecomm/java/android/telecom/TelecomManager.java +++ b/telecomm/java/android/telecom/TelecomManager.java @@ -1218,7 +1218,6 @@ public class TelecomManager { * @deprecated Use * {@link android.app.role.RoleManager#addRoleHolderAsUser(String, String, int, UserHandle, * Executor, java.util.function.Consumer)} instead. - * @removed */ @SystemApi @Deprecated