Removing LauncherActivityRule as it can be flaky based on when
the rule was initialized Bug: 289161193 Test: Presubmit and PostSubmit Flag: N/A Change-Id: I0e1e9c6f932d2a98a2f1e47bd1665e26f2db9eb4
This commit is contained in:
1 parent
735b18ba4c
commit
f6b79f7caf
9 files changed
+13
-224
No files matched your search
@@ -30,6 +30,7 @@ import android.view.View;
|
||||
import androidx.test.filters.LargeTest;
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.celllayout.FavoriteItemsTransaction;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
import com.android.launcher3.model.data.LauncherAppWidgetInfo;
|
||||
@@ -124,7 +125,10 @@ public class AddConfigWidgetTest extends AbstractLauncherUiTest {
|
||||
|
||||
@Override
|
||||
public boolean isTrue() throws Throwable {
|
||||
return mMainThreadExecutor.submit(mActivityMonitor.itemExists(this)).get();
|
||||
return mMainThreadExecutor.submit(() -> {
|
||||
Launcher l = Launcher.ACTIVITY_TRACKER.getCreatedActivity();
|
||||
return l != null && l.getWorkspace().getFirstMatch(this) != null;
|
||||
}).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user