diff --git a/services/storage/javatests/androidx/test/services/storage/BUILD b/services/storage/javatests/androidx/test/services/storage/BUILD index b817713a5..c2f312d10 100644 --- a/services/storage/javatests/androidx/test/services/storage/BUILD +++ b/services/storage/javatests/androidx/test/services/storage/BUILD @@ -2,7 +2,7 @@ # Tests for the test storage. load("//build_extensions:android_library_test.bzl", "axt_android_library_test") -load("//build_extensions:phone_devices.bzl", "devices") +load("//build_extensions:phone_devices.bzl", "apis", "devices") package( default_applicable_licenses = ["//services:license"], diff --git a/services/storage/javatests/androidx/test/services/storage/TestStorageTest.java b/services/storage/javatests/androidx/test/services/storage/TestStorageTest.java index 3b3e1d49b..66d7935f1 100644 --- a/services/storage/javatests/androidx/test/services/storage/TestStorageTest.java +++ b/services/storage/javatests/androidx/test/services/storage/TestStorageTest.java @@ -19,11 +19,8 @@ import static com.google.common.truth.Truth.assertThat; import static junit.framework.TestCase.fail; import static org.junit.Assert.assertEquals; -import static org.junit.Assume.assumeTrue; -import android.content.Context; import android.net.Uri; -import android.os.UserManager; import androidx.test.services.storage.file.HostedFile; import androidx.test.services.storage.internal.TestStorageUtil; import java.io.BufferedReader; @@ -113,19 +110,11 @@ public void addOutputProperties() throws Exception { @Test public void writeInternalFile() throws IOException { - // known not to work in multi-user mode - assumeTrue(isSystemUser()); try (OutputStream output = testStorage.openInternalOutputFile("path/to/file")) { output.write(new byte[] {'h', 'e', 'l', 'l', 'o'}); } } - private static boolean isSystemUser() { - - UserManager um = ((UserManager) getApplicationContext().getSystemService(Context.USER_SERVICE)); - return um.isSystemUser(); - } - @Test public void readWriteOverwriteReadFile() throws IOException { try (OutputStream output = testStorage.openOutputFile("path/to/file")) {