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

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

Merge "Don't force concurrent MQ in Robolectric tests" into main

parents ef86cf2a 25a65b6a
Loading
Loading
Loading
Loading
+11 −2
Original line number Original line Diff line number Diff line
@@ -145,9 +145,18 @@ public final class MessageQueue {
        }
        }


        if (Flags.forceConcurrentMessageQueue()) {
        if (Flags.forceConcurrentMessageQueue()) {
            // b/379472827: Robolectric tests use reflection to access MessageQueue.mMessages.
            // This is a hack to allow Robolectric tests to use the legacy implementation.
            try {
                Class.forName("org.robolectric.Robolectric");
            } catch (ClassNotFoundException e) {
                // This is not a Robolectric test.
                sIsProcessAllowedToUseConcurrent = true;
                sIsProcessAllowedToUseConcurrent = true;
                return;
                return;
            }
            }
            // This is a Robolectric test.
            // Continue to the following checks.
        }


        final String processName = Process.myProcessName();
        final String processName = Process.myProcessName();
        if (processName == null) {
        if (processName == null) {