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

Commit 42ebb848 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Revert "Add ChangeId for new message queue"" into main

parents d9709d9a 6cb1241a
Loading
Loading
Loading
Loading
+0 −19
Original line number Diff line number Diff line
@@ -16,19 +16,13 @@

package android.os;

import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SuppressLint;
import android.annotation.TestApi;
import android.app.compat.CompatChanges;
import android.app.ActivityThread;
import android.app.Instrumentation;
import android.compat.annotation.ChangeId;
import android.compat.annotation.Disabled;
import android.compat.annotation.EnabledAfter;
import android.compat.annotation.Overridable;
import android.compat.annotation.UnsupportedAppUsage;
import android.ravenwood.annotation.RavenwoodKeepWholeClass;
import android.ravenwood.annotation.RavenwoodRedirect;
@@ -74,16 +68,6 @@ public final class MessageQueue {
    private static final String TAG_C = "ConcurrentMessageQueue";
    private static final boolean DEBUG = false;

    /**
     * Enables concurrent message queue implementation in all applications.
     *
     * @hide
     */
    @ChangeId
    @EnabledAfter(targetSdkVersion = android.os.Build.VERSION_CODES.BAKLAVA)
    @Overridable // Can be overridden on user builds
    public static final long USE_NEW_MESSAGEQUEUE = 421623328L;

    // True if the message queue can be quit.
    @UnsupportedAppUsage
    private final boolean mQuitAllowed;
@@ -181,9 +165,6 @@ public final class MessageQueue {
    }

    private static boolean computeUseConcurrent() {
        if (CompatChanges.isChangeEnabled(USE_NEW_MESSAGEQUEUE)) {
            return true;
        }
        if (Flags.useConcurrentMessageQueueInApps()) {
            // b/379472827: Robolectric tests use reflection to access MessageQueue.mMessages.
            // This is a hack to allow Robolectric tests to use the legacy implementation.