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

Commit 41d81544 authored by Shai Barack's avatar Shai Barack Committed by Android (Google) Code Review
Browse files

Merge "Reland "Don't fall back to legacy MessageQueue when Instrumenting"" into main

parents 280009c1 e710c85e
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -130,7 +130,7 @@ public final class MessageQueue {

    MessageQueue(boolean quitAllowed) {
        initIsProcessAllowedToUseConcurrent();
        mUseConcurrent = sIsProcessAllowedToUseConcurrent && !isInstrumenting();
        mUseConcurrent = sIsProcessAllowedToUseConcurrent;
        mQuitAllowed = quitAllowed;
        mPtr = nativeInit();
        mThread = Thread.currentThread();
@@ -202,15 +202,6 @@ public final class MessageQueue {
        return;
    }

    private static boolean isInstrumenting() {
        final ActivityThread activityThread = ActivityThread.currentActivityThread();
        if (activityThread == null) {
            return false;
        }
        final Instrumentation instrumentation = activityThread.getInstrumentation();
        return instrumentation != null && instrumentation.isInstrumenting();
    }

    @Override
    protected void finalize() throws Throwable {
        try {