Loading api/system-current.txt +2 −2 Original line number Diff line number Diff line Loading @@ -999,8 +999,8 @@ package android.app.compat { public final class CompatChanges { method public static boolean isChangeEnabled(long); method public static boolean isChangeEnabled(long, @NonNull String, @NonNull android.os.UserHandle); method public static boolean isChangeEnabled(long, int); 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); } } Loading core/java/android/app/compat/CompatChanges.java +5 −6 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.app.compat; import android.annotation.NonNull; import android.annotation.RequiresPermission; import android.annotation.SystemApi; import android.compat.Compatibility; import android.content.Context; Loading Loading @@ -59,14 +60,13 @@ public final class CompatChanges { * <p> Note that this involves a binder call to the system server (unless running in the system * server). If the binder call fails, a {@code RuntimeException} will be thrown. * * <p> Caller must have android.permission.READ_COMPAT_CHANGE_CONFIG permission. If it * doesn't, a {@code RuntimeException} will be thrown. * * @param changeId The ID of the compatibility change in question. * @param packageName The package name of the app in question. * @param user The user that the operation is done for. * @return {@code true} if the change is enabled for the current app. */ @RequiresPermission(allOf = {android.Manifest.permission.READ_COMPAT_CHANGE_CONFIG, android.Manifest.permission.LOG_COMPAT_CHANGE}) public static boolean isChangeEnabled(long changeId, @NonNull String packageName, @NonNull UserHandle user) { IPlatformCompat platformCompat = IPlatformCompat.Stub.asInterface( Loading @@ -89,9 +89,6 @@ public final class CompatChanges { * <p> Note that this involves a binder call to the system server (unless running in the system * server). If the binder call fails, {@code RuntimeException} will be thrown. * * <p> Caller must have android.permission.READ_COMPAT_CHANGE_CONFIG permission. If it * doesn't, a {@code RuntimeException} will be thrown. * * <p> Returns {@code true} if there are no installed packages for the required UID, or if the * change is enabled for ALL of the installed packages associated with the provided UID. Please * use a more specific API if you want a different behaviour for multi-package UIDs. Loading @@ -100,6 +97,8 @@ public final class CompatChanges { * @param uid The UID of the app in question. * @return {@code true} if the change is enabled for the current app. */ @RequiresPermission(allOf = {android.Manifest.permission.READ_COMPAT_CHANGE_CONFIG, android.Manifest.permission.LOG_COMPAT_CHANGE}) public static boolean isChangeEnabled(long changeId, int uid) { IPlatformCompat platformCompat = IPlatformCompat.Stub.asInterface( ServiceManager.getService(Context.PLATFORM_COMPAT_SERVICE)); Loading Loading
api/system-current.txt +2 −2 Original line number Diff line number Diff line Loading @@ -999,8 +999,8 @@ package android.app.compat { public final class CompatChanges { method public static boolean isChangeEnabled(long); method public static boolean isChangeEnabled(long, @NonNull String, @NonNull android.os.UserHandle); method public static boolean isChangeEnabled(long, int); 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); } } Loading
core/java/android/app/compat/CompatChanges.java +5 −6 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.app.compat; import android.annotation.NonNull; import android.annotation.RequiresPermission; import android.annotation.SystemApi; import android.compat.Compatibility; import android.content.Context; Loading Loading @@ -59,14 +60,13 @@ public final class CompatChanges { * <p> Note that this involves a binder call to the system server (unless running in the system * server). If the binder call fails, a {@code RuntimeException} will be thrown. * * <p> Caller must have android.permission.READ_COMPAT_CHANGE_CONFIG permission. If it * doesn't, a {@code RuntimeException} will be thrown. * * @param changeId The ID of the compatibility change in question. * @param packageName The package name of the app in question. * @param user The user that the operation is done for. * @return {@code true} if the change is enabled for the current app. */ @RequiresPermission(allOf = {android.Manifest.permission.READ_COMPAT_CHANGE_CONFIG, android.Manifest.permission.LOG_COMPAT_CHANGE}) public static boolean isChangeEnabled(long changeId, @NonNull String packageName, @NonNull UserHandle user) { IPlatformCompat platformCompat = IPlatformCompat.Stub.asInterface( Loading @@ -89,9 +89,6 @@ public final class CompatChanges { * <p> Note that this involves a binder call to the system server (unless running in the system * server). If the binder call fails, {@code RuntimeException} will be thrown. * * <p> Caller must have android.permission.READ_COMPAT_CHANGE_CONFIG permission. If it * doesn't, a {@code RuntimeException} will be thrown. * * <p> Returns {@code true} if there are no installed packages for the required UID, or if the * change is enabled for ALL of the installed packages associated with the provided UID. Please * use a more specific API if you want a different behaviour for multi-package UIDs. Loading @@ -100,6 +97,8 @@ public final class CompatChanges { * @param uid The UID of the app in question. * @return {@code true} if the change is enabled for the current app. */ @RequiresPermission(allOf = {android.Manifest.permission.READ_COMPAT_CHANGE_CONFIG, android.Manifest.permission.LOG_COMPAT_CHANGE}) public static boolean isChangeEnabled(long changeId, int uid) { IPlatformCompat platformCompat = IPlatformCompat.Stub.asInterface( ServiceManager.getService(Context.PLATFORM_COMPAT_SERVICE)); Loading