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

Commit 73b07daa authored by Sukesh Ram's avatar Sukesh Ram
Browse files

Add logs for TaplAddConfigWidgetTest test

Flag: NONE
Bug: 324419890
Test: Check logs when flake is reproduced
Change-Id: I2fdb1e4f96c8095a387280c79e074ee42eb0010c
parent 189f3f86
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -176,6 +176,8 @@ public final class TestProtocol {
    public static final String SUCCESSFUL_GESTURE_MISMATCH_EVENTS = "b/324940434";
    public static final String SUCCESSFUL_GESTURE_MISMATCH_EVENTS = "b/324940434";
    public static final String TEST_DRAG_APP_ICON_TO_MULTIPLE_WORKSPACES_FAILURE = "b/326908466";
    public static final String TEST_DRAG_APP_ICON_TO_MULTIPLE_WORKSPACES_FAILURE = "b/326908466";
    public static final String TEST_TAPL_OVERVIEW_ACTIONS_MENU_FAILURE = "b/326073471";
    public static final String TEST_TAPL_OVERVIEW_ACTIONS_MENU_FAILURE = "b/326073471";
    public static final String WIDGET_CONFIG_NULL_EXTRA_INTENT = "b/324419890";
    public static final String ACTIVITY_NOT_RESUMED_AFTER_BACK = "b/322823209";


    public static final String REQUEST_EMULATE_DISPLAY = "emulate-display";
    public static final String REQUEST_EMULATE_DISPLAY = "emulate-display";
    public static final String REQUEST_STOP_EMULATE_DISPLAY = "stop-emulate-display";
    public static final String REQUEST_STOP_EMULATE_DISPLAY = "stop-emulate-display";
+11 −0
Original line number Original line Diff line number Diff line
@@ -20,6 +20,7 @@ import static android.platform.test.flag.junit.SetFlagsRule.DefaultInitValueType
import static androidx.test.InstrumentationRegistry.getInstrumentation;
import static androidx.test.InstrumentationRegistry.getInstrumentation;


import static com.android.launcher3.testing.shared.TestProtocol.ICON_MISSING;
import static com.android.launcher3.testing.shared.TestProtocol.ICON_MISSING;
import static com.android.launcher3.testing.shared.TestProtocol.WIDGET_CONFIG_NULL_EXTRA_INTENT;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;


import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertEquals;
@@ -529,13 +530,23 @@ public abstract class AbstractLauncherUiTest {


        @Override
        @Override
        public void onReceive(Context context, Intent intent) {
        public void onReceive(Context context, Intent intent) {
            Log.d(WIDGET_CONFIG_NULL_EXTRA_INTENT, intent == null
                    ? "AbstractLauncherUiTest.onReceive(): inputted intent NULL"
                    : "AbstractLauncherUiTest.onReceive(): inputted intent NOT NULL");
            mIntent = intent;
            mIntent = intent;
            latch.countDown();
            latch.countDown();
            Log.d(WIDGET_CONFIG_NULL_EXTRA_INTENT,
                    "AbstractLauncherUiTest.onReceive() Countdown Latch started");
        }
        }


        public Intent blockingGetIntent() throws InterruptedException {
        public Intent blockingGetIntent() throws InterruptedException {
            Log.d(WIDGET_CONFIG_NULL_EXTRA_INTENT,
                    "AbstractLauncherUiTest.blockingGetIntent()");
            latch.await(DEFAULT_BROADCAST_TIMEOUT_SECS, TimeUnit.SECONDS);
            latch.await(DEFAULT_BROADCAST_TIMEOUT_SECS, TimeUnit.SECONDS);
            mTargetContext.unregisterReceiver(this);
            mTargetContext.unregisterReceiver(this);
            Log.d(WIDGET_CONFIG_NULL_EXTRA_INTENT, mIntent == null
                    ? "AbstractLauncherUiTest.onReceive(): mIntent NULL"
                    : "AbstractLauncherUiTest.onReceive(): mIntent NOT NULL");
            return mIntent;
            return mIntent;
        }
        }