mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 09:26:51 +00:00
Improve diags when system errors cause failing Launcher tests
Now, for example, we won't diagnose a locked phone as a "home button not showing in 3-button mode", even though it's technically correct. Change-Id: Ibdfa0741af7ff8545a811f6702dda74dc6c31c2e
This commit is contained in:
@@ -26,8 +26,6 @@ import static org.junit.Assert.assertTrue;
|
||||
|
||||
import static java.lang.System.exit;
|
||||
|
||||
import static androidx.test.InstrumentationRegistry.getInstrumentation;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.ComponentName;
|
||||
import android.content.ContentResolver;
|
||||
@@ -306,7 +304,7 @@ public abstract class AbstractLauncherUiTest {
|
||||
protected void waitForLauncherCondition(
|
||||
String message, Function<Launcher, Boolean> condition, long timeout) {
|
||||
if (!TestHelpers.isInLauncherProcess()) return;
|
||||
Wait.atMost(message, () -> getFromLauncher(condition), timeout);
|
||||
Wait.atMost(message, () -> getFromLauncher(condition), timeout, mLauncher);
|
||||
}
|
||||
|
||||
// Cannot be used in TaplTests after injecting any gesture using Tapl because this can hide
|
||||
@@ -319,7 +317,7 @@ public abstract class AbstractLauncherUiTest {
|
||||
final Object fromLauncher = getFromLauncher(f);
|
||||
output[0] = fromLauncher;
|
||||
return fromLauncher != null;
|
||||
}, timeout);
|
||||
}, timeout, mLauncher);
|
||||
return (T) output[0];
|
||||
}
|
||||
|
||||
@@ -333,7 +331,7 @@ public abstract class AbstractLauncherUiTest {
|
||||
Wait.atMost(message, () -> {
|
||||
testThreadAction.run();
|
||||
return getFromLauncher(condition);
|
||||
}, timeout);
|
||||
}, timeout, mLauncher);
|
||||
}
|
||||
|
||||
protected LauncherActivityInfo getSettingsApp() {
|
||||
|
||||
Reference in New Issue
Block a user