Enabling screen record for some flaky tests

Bug: 187080582
Bug: 192005114
Bug: 192018189
Bug: 192010616
Test: Manual
Change-Id: I32fc0e4c9848c4def1aa6254139579bc631862cc
This commit is contained in:
Sunny Goyal
2021-06-25 12:36:22 -07:00
parent 6604eb54bf
commit 85a84e52cc
4 changed files with 91 additions and 0 deletions

View File

@@ -65,6 +65,7 @@ import com.android.launcher3.util.PackageManagerHelper;
import com.android.launcher3.util.Wait;
import com.android.launcher3.util.rule.FailureWatcher;
import com.android.launcher3.util.rule.LauncherActivityRule;
import com.android.launcher3.util.rule.ScreenRecordRule;
import com.android.launcher3.util.rule.ShellCommandRule;
import com.android.launcher3.util.rule.TestStabilityRule;
@@ -204,6 +205,9 @@ public abstract class AbstractLauncherUiTest {
public ShellCommandRule mDisableHeadsUpNotification =
ShellCommandRule.disableHeadsUpNotification();
@Rule
public ScreenRecordRule mScreenRecordRule = new ScreenRecordRule();
protected void clearPackageData(String pkg) throws IOException, InterruptedException {
final CountDownLatch count = new CountDownLatch(2);
final BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {