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

Commit 7261855a authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Compat-framework on ravenwood

Flag: EXEMPT host test change only
Bug: 367706429
Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh
Change-Id: Ibef0180fe3e5acb919cb6cbab09574c508e6d894
Merged-In: Ibef0180fe3e5acb919cb6cbab09574c508e6d894
parent 6e5eb8a7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import java.util.Arrays;
 *
 * @hide
 */
@android.ravenwood.annotation.RavenwoodKeepWholeClass
public final class AppCompatCallbacks implements Compatibility.BehaviorChangeDelegate {
    private final long[] mDisabledChanges;
    private final long[] mLoggableChanges;
+12 −1
Original line number Diff line number Diff line
@@ -29,13 +29,24 @@ import com.android.internal.compat.IPlatformCompat;
 * Handles caching of calls to {@link com.android.internal.compat.IPlatformCompat}
 * @hide
 */
@android.ravenwood.annotation.RavenwoodKeepWholeClass
public final class ChangeIdStateCache
        extends PropertyInvalidatedCache<ChangeIdStateQuery, Boolean> {
    private static final String CACHE_KEY = "cache_key.is_compat_change_enabled";
    private static final int MAX_ENTRIES = 64;
    private static boolean sDisabled = false;
    private static boolean sDisabled = getDefaultDisabled();
    private volatile IPlatformCompat mPlatformCompat;


    @android.ravenwood.annotation.RavenwoodReplace
    private static boolean getDefaultDisabled() {
        return false;
    }

    private static boolean getDefaultDisabled$ravenwood() {
        return true; // TODO(b/376676753) Disable the cache for now.
    }

    /** @hide */
    public ChangeIdStateCache() {
        super(MAX_ENTRIES, CACHE_KEY);
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ import java.util.Objects;
 * @hide
 */
@Immutable
@android.ravenwood.annotation.RavenwoodKeepWholeClass
final class ChangeIdStateQuery {

    static final int QUERY_BY_PACKAGE_NAME = 0;
+1 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ import java.util.Set;
 * @hide
 */
@SystemApi
@android.ravenwood.annotation.RavenwoodKeepWholeClass
public final class CompatChanges {
    private static final ChangeIdStateCache QUERY_CACHE = new ChangeIdStateCache();

+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import java.util.Objects;
 * @hide
 */
@SystemApi
@android.ravenwood.annotation.RavenwoodKeepWholeClass
public final class PackageOverride {

    /** @hide */
Loading