summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2024-06-08 12:07:47 +0100
committer Paul Duffin <paulduffin@google.com> 2024-06-10 19:15:44 +0100
commit083f9ad5d6ba48ec2f990aad68ca5cff0cb9b06c (patch)
tree78c93a4cf82dc600ebaada09f7f202a24b3b5803
parent6c865749f6e92e52ea7dd3c0748e34c029fd8100 (diff)
Fix some discrepancies in @Deprecated handling in Metalava
Previously, Metalava had some inconsistencies in the handling of deprecated status which lead to some inconsistencies in the API signature files. This change fixes those signatures. * `onGetLayoutInflater` was removed because the code to determine whether a method is elided from the signature files because it matches an overridden method will only elide a method if it has the same deprecated status as the overridden method. However, in some cases it would not take into account that the method, while not explicitly deprecated was a member of a deprecated class. That meant that `onGetLayoutInflater` was kept in the API signature file when it should not have been. That issue is fixed in this topic and so this change removes it. * `setPackagesSuspended` had an `@Deprecated` annotation added to it because while the API signature writing was supposed to add an `@Deprecated` annotation for a method that was explicitly deprecated or a member of a deprecated class in some cases the latter was ignored. That issue is fixed in this topic and so this change adds the previously missing `@Deprecated` annotation. Bug: 315206833 Test: m checkapi Change-Id: I0ef23d32c5b5b11f964aeb93c2bb0346d75cea83
-rw-r--r--core/api/current.txt1
-rw-r--r--test-mock/api/system-current.txt2
2 files changed, 1 insertions, 2 deletions
diff --git a/core/api/current.txt b/core/api/current.txt
index 588396ac2140..14ebfba8a058 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -5518,7 +5518,6 @@ package android.app {
method @Deprecated public void onCancel(android.content.DialogInterface);
method @Deprecated public android.app.Dialog onCreateDialog(android.os.Bundle);
method @Deprecated public void onDismiss(android.content.DialogInterface);
- method public android.view.LayoutInflater onGetLayoutInflater(android.os.Bundle);
method @Deprecated public void setCancelable(boolean);
method @Deprecated public void setShowsDialog(boolean);
method @Deprecated public void setStyle(int, int);
diff --git a/test-mock/api/system-current.txt b/test-mock/api/system-current.txt
index f35095743738..7d891c8150fd 100644
--- a/test-mock/api/system-current.txt
+++ b/test-mock/api/system-current.txt
@@ -28,7 +28,7 @@ package android.test.mock {
method @Deprecated public void removeOnPermissionsChangeListener(android.content.pm.PackageManager.OnPermissionsChangedListener);
method @Deprecated public void revokeRuntimePermission(String, String, android.os.UserHandle);
method @Deprecated public boolean setDefaultBrowserPackageNameAsUser(String, int);
- method public String[] setPackagesSuspended(String[], boolean, android.os.PersistableBundle, android.os.PersistableBundle, String);
+ method @Deprecated public String[] setPackagesSuspended(String[], boolean, android.os.PersistableBundle, android.os.PersistableBundle, String);
method @Deprecated public void setUpdateAvailable(String, boolean);
method @Deprecated public boolean updateIntentVerificationStatusAsUser(String, int, int);
method @Deprecated public void updatePermissionFlags(String, String, int, int, android.os.UserHandle);