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

Commit c60be93e authored by Florian Mayer's avatar Florian Mayer Committed by Automerger Merge Worker
Browse files

Merge "Revert "API changes as requested by API council."" am: 6b4ecd94 am: 5e3ed641

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1683628

Change-Id: If9f9aae036070f0f49ff0f016fc164ad07a4ee00
parents a1d8ab1a 5e3ed641
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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);