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

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

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

parents 54e4923f c7e658f7
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 {