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

Commit 2433e8a6 authored by Orhan Uysal's avatar Orhan Uysal
Browse files

Init protolog for tests before any logging happens

Bug: 369339127
Test: atest DesktopModeTasksRepositoryTest
Flag: EXEMPT Bugfix
Change-Id: I1b1286d1f584f859e520721f74bac8fe53cb39e3
parent 7ab5adc9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.wm.shell;

import static android.view.Display.DEFAULT_DISPLAY;

import static org.junit.Assume.assumeTrue;

import android.content.Context;
@@ -45,6 +46,9 @@ public abstract class ShellTestCase {
        // Disable protolog tool when running the tests from studio
        ProtoLog.REQUIRE_PROTOLOGTOOL = false;

        // Make sure ProtoLog is initialized before any logging occurs.
        ProtoLog.init();

        MockitoAnnotations.initMocks(this);
        final Context context =
                InstrumentationRegistry.getInstrumentation().getTargetContext();