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

Commit 7a6a0afc authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Call MediaStore#waitForIdle only on Build SDK R and above" into tm-mainline-prod

parents 99301e3a 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);