Add logs for TaplAddConfigWidgetTest test
Flag: NONE Bug: 324419890 Test: Check logs when flake is reproduced Change-Id: I2fdb1e4f96c8095a387280c79e074ee42eb0010c
This commit is contained in:
@@ -20,6 +20,7 @@ import static android.platform.test.flag.junit.SetFlagsRule.DefaultInitValueType
|
||||
import static androidx.test.InstrumentationRegistry.getInstrumentation;
|
||||
|
||||
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 org.junit.Assert.assertEquals;
|
||||
@@ -529,13 +530,23 @@ public abstract class AbstractLauncherUiTest {
|
||||
|
||||
@Override
|
||||
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;
|
||||
latch.countDown();
|
||||
Log.d(WIDGET_CONFIG_NULL_EXTRA_INTENT,
|
||||
"AbstractLauncherUiTest.onReceive() Countdown Latch started");
|
||||
}
|
||||
|
||||
public Intent blockingGetIntent() throws InterruptedException {
|
||||
Log.d(WIDGET_CONFIG_NULL_EXTRA_INTENT,
|
||||
"AbstractLauncherUiTest.blockingGetIntent()");
|
||||
latch.await(DEFAULT_BROADCAST_TIMEOUT_SECS, TimeUnit.SECONDS);
|
||||
mTargetContext.unregisterReceiver(this);
|
||||
Log.d(WIDGET_CONFIG_NULL_EXTRA_INTENT, mIntent == null
|
||||
? "AbstractLauncherUiTest.onReceive(): mIntent NULL"
|
||||
: "AbstractLauncherUiTest.onReceive(): mIntent NOT NULL");
|
||||
return mIntent;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user