Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 083f9ad5 authored by Paul Duffin's avatar Paul Duffin
Browse files

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
parent 6c865749
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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);