summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorFlorian Mayer <fmayer@google.com>2021-04-22 14:41:34 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-04-22 14:41:34 +0000
commitc60be93eefbcc3fb04dcb9214f443d02170dafa1 (patch)
tree3df238dbb57218d01475a437021a6bd23e080506 /core/java
parenta1d8ab1ac9a2f6e56f73194dd0d09c683aed2977 (diff)
parent5e3ed6416af1a63ee60860538cb0dc99c6fc0a45 (diff)
Merge "Revert "API changes as requested by API council."" am: 6b4ecd94c1 am: 5e3ed6416a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1683628 Change-Id: If9f9aae036070f0f49ff0f016fc164ad07a4ee00
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/AppCompatCallbacks.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/java/android/app/AppCompatCallbacks.java b/core/java/android/app/AppCompatCallbacks.java
index 134cef5b6bfa..28a21f767283 100644
--- a/core/java/android/app/AppCompatCallbacks.java
+++ b/core/java/android/app/AppCompatCallbacks.java
@@ -28,7 +28,7 @@ import java.util.Arrays;
*
* @hide
*/
-public final class AppCompatCallbacks implements Compatibility.BehaviorChangeDelegate {
+public final class AppCompatCallbacks extends Compatibility.Callbacks {
private final long[] mDisabledChanges;
private final ChangeReporter mChangeReporter;
@@ -38,7 +38,7 @@ public final class AppCompatCallbacks implements Compatibility.BehaviorChangeDel
* @param disabledChanges Set of compatibility changes that are disabled for this process.
*/
public static void install(long[] disabledChanges) {
- Compatibility.setBehaviorChangeDelegate(new AppCompatCallbacks(disabledChanges));
+ Compatibility.setCallbacks(new AppCompatCallbacks(disabledChanges));
}
private AppCompatCallbacks(long[] disabledChanges) {
@@ -48,11 +48,11 @@ public final class AppCompatCallbacks implements Compatibility.BehaviorChangeDel
ChangeReporter.SOURCE_APP_PROCESS);
}
- public void onChangeReported(long changeId) {
+ protected void reportChange(long changeId) {
reportChange(changeId, ChangeReporter.STATE_LOGGED);
}
- public boolean isChangeEnabled(long changeId) {
+ protected boolean isChangeEnabled(long changeId) {
if (Arrays.binarySearch(mDisabledChanges, changeId) < 0) {
// Not present in the disabled array
reportChange(changeId, ChangeReporter.STATE_ENABLED);