commit | b597bc6cc78c6920542945de296649dab73f1156 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Thu Dec 17 10:13:22 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Dec 17 10:13:22 2020 +0000 |
tree | 1d77333eee41a97cb9fa6ba4b407932d92d4368b | |
parent | b57fc5c9c8729647183b9f4c41cda2c4e7b12c21 [diff] | |
parent | da75bba326f5b7bb6a6af38e2f883f57f0d75268 [diff] |
Merge "Relax /data/data check in AppDataIsolationTests" am: f66877199d am: da75bba326 Original change: https://android-review.googlesource.com/c/platform/cts/+/1532498 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I41f9c78d3a755456c59bb9f2b8218dd994479822
diff --git a/hostsidetests/appsecurity/test-apps/AppDataIsolationTestApp/AppB/src/com/android/cts/appdataisolation/appb/AppBTests.java b/hostsidetests/appsecurity/test-apps/AppDataIsolationTestApp/AppB/src/com/android/cts/appdataisolation/appb/AppBTests.java index 9229fa6..41ca80d 100644 --- a/hostsidetests/appsecurity/test-apps/AppDataIsolationTestApp/AppB/src/com/android/cts/appdataisolation/appb/AppBTests.java +++ b/hostsidetests/appsecurity/test-apps/AppDataIsolationTestApp/AppB/src/com/android/cts/appdataisolation/appb/AppBTests.java
@@ -24,6 +24,7 @@ import android.content.Context; import android.content.pm.ApplicationInfo; +import android.os.UserHandle; import androidx.test.filters.SmallTest; import androidx.test.platform.app.InstrumentationRegistry; @@ -59,7 +60,9 @@ ApplicationInfo applicationInfo = mContext.getApplicationInfo(); assertDirIsAccessible(replacePackageBWithPackageA(applicationInfo.dataDir)); assertDirIsAccessible(replacePackageBWithPackageA(applicationInfo.deviceProtectedDataDir)); - assertDirIsAccessible("/data/data/" + APPA_PKG); + if (getCurrentUserId() == UserHandle.USER_SYSTEM) { + assertDirIsAccessible("/data/data/" + APPA_PKG); + } assertFileIsAccessible("/data/misc/profiles/cur/" + getCurrentUserId() + "/" + APPA_PKG + "/primary.prof"); assertDirIsNotAccessible("/data/misc/profiles/ref");