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

Commit 235b457e authored by Presubmit Automerger Backend's avatar Presubmit Automerger Backend
Browse files

[automerge] Call MediaStore#waitForIdle only on Build SDK R and above 2p: ece63d64

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/DocumentsUI/+/19801759

Bug: 238066569
Change-Id: I1fa06f37dfdd5d010bca61a3178f091c22be0852
parents 0a751300 ece63d64
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ import com.android.documentsui.base.RootInfo;
import com.android.documentsui.files.FilesActivity;
import com.android.documentsui.filters.HugeLongTest;
import com.android.documentsui.services.TestNotificationService;
import com.android.modules.utils.build.SdkLevel;

import java.util.ArrayList;
import java.util.HashMap;
@@ -132,7 +133,10 @@ 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");

        if (SdkLevel.isAtLeastR()) {
            MediaStore.waitForIdle(context.getContentResolver());
        }

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