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

Commit 36f4df55 authored by Sahana Rao's avatar Sahana Rao Committed by Automerger Merge Worker
Browse files

Wait for MediaStore idle state to reduce the test flake am: 51fd45cd

parents db138136 51fd45cd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import android.net.Uri;
import android.os.Bundle;
import android.os.RemoteException;
import android.os.SystemClock;
import android.provider.MediaStore;
import android.provider.Settings;
import android.support.test.uiautomator.UiObjectNotFoundException;
import android.text.TextUtils;
@@ -131,6 +132,7 @@ public class FileCopyUiTest extends ActivityTest<FilesActivity> {
        mPreTestStayAwakeValue = Settings.Global.getInt(context.getContentResolver(),
                Settings.Global.STAY_ON_WHILE_PLUGGED_IN);
        device.executeShellCommand("settings put global stay_on_while_plugged_in 3");
        MediaStore.waitForIdle(context.getContentResolver());

        mDeviceLabel = Settings.Global.getString(context.getContentResolver(),
                Settings.Global.DEVICE_NAME);