summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author tomnatan <tomnatan@google.com> 2021-05-18 09:23:50 +0000
committer tomnatan <tomnatan@google.com> 2021-05-20 11:52:39 +0000
commit79fe2b53f84524e2f66f46b43edc8fb8fa92ad60 (patch)
treebffea35830ec0fa1f7e2d4325ccda214b8e8ad95
parentbd5ef4313013f5f86818a71fa1fae14e3a430a0c (diff)
Rename addPackageOverrides to putPackageOverrides.
Bug: 187738991 Test: atest FrameworksServicesTests:CompatConfigTest Test: atest FrameworksServicesTests:PlatformCompatTest Change-Id: I52e5051810cf31cbcee9ba600c92c86d335187a0
-rw-r--r--core/api/system-current.txt2
-rw-r--r--core/java/android/app/compat/CompatChanges.java11
2 files changed, 7 insertions, 6 deletions
diff --git a/core/api/system-current.txt b/core/api/system-current.txt
index bb42ddcda37f..1aa8aed7c7ec 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -1124,10 +1124,10 @@ package android.app.backup {
package android.app.compat {
public final class CompatChanges {
- method @RequiresPermission(android.Manifest.permission.OVERRIDE_COMPAT_CHANGE_CONFIG_ON_RELEASE_BUILD) public static void addPackageOverrides(@NonNull String, @NonNull java.util.Map<java.lang.Long,android.app.compat.PackageOverride>);
method public static boolean isChangeEnabled(long);
method @RequiresPermission(allOf={"android.permission.READ_COMPAT_CHANGE_CONFIG", "android.permission.LOG_COMPAT_CHANGE"}) public static boolean isChangeEnabled(long, @NonNull String, @NonNull android.os.UserHandle);
method @RequiresPermission(allOf={"android.permission.READ_COMPAT_CHANGE_CONFIG", "android.permission.LOG_COMPAT_CHANGE"}) public static boolean isChangeEnabled(long, int);
+ method @RequiresPermission(android.Manifest.permission.OVERRIDE_COMPAT_CHANGE_CONFIG_ON_RELEASE_BUILD) public static void putPackageOverrides(@NonNull String, @NonNull java.util.Map<java.lang.Long,android.app.compat.PackageOverride>);
method @RequiresPermission(android.Manifest.permission.OVERRIDE_COMPAT_CHANGE_CONFIG_ON_RELEASE_BUILD) public static void removePackageOverrides(@NonNull String, @NonNull java.util.Set<java.lang.Long>);
}
diff --git a/core/java/android/app/compat/CompatChanges.java b/core/java/android/app/compat/CompatChanges.java
index 8ca43c4a8e70..24ca72c66ab4 100644
--- a/core/java/android/app/compat/CompatChanges.java
+++ b/core/java/android/app/compat/CompatChanges.java
@@ -100,9 +100,10 @@ public final class CompatChanges {
}
/**
- * Adds app compat overrides for a given package. This will check whether the caller is allowed
- * to perform this operation on the given apk and build. Only the installer package is allowed
- * to set overrides on a non-debuggable final build and a non-test apk.
+ * Associates app compat overrides with the given package and their respective change IDs.
+ * This will check whether the caller is allowed to perform this operation on the given apk and
+ * build. Only the installer package is allowed to set overrides on a non-debuggable final
+ * build and a non-test apk.
*
* <p>Note that calling this method doesn't remove previously added overrides for the given
* package if their change ID isn't in the given map, only replaces those that have the same
@@ -112,7 +113,7 @@ public final class CompatChanges {
* @param overrides A map from change ID to the override applied for this change ID.
*/
@RequiresPermission(android.Manifest.permission.OVERRIDE_COMPAT_CHANGE_CONFIG_ON_RELEASE_BUILD)
- public static void addPackageOverrides(@NonNull String packageName,
+ public static void putPackageOverrides(@NonNull String packageName,
@NonNull Map<Long, PackageOverride> overrides) {
IPlatformCompat platformCompat = IPlatformCompat.Stub.asInterface(
ServiceManager.getService(Context.PLATFORM_COMPAT_SERVICE));
@@ -125,7 +126,7 @@ public final class CompatChanges {
}
/**
- * Removes app compat overrides for a given package. This will check whether the caller is
+ * Removes app compat overrides for the given package. This will check whether the caller is
* allowed to perform this operation on the given apk and build. Only the installer package is
* allowed to clear overrides on a non-debuggable final build and a non-test apk.
*