summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-11-05 04:00:24 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-11-05 04:00:24 +0000
commit3fafb61357b29a92d7bdb157c261143548c9a9b0 (patch)
tree488ebd191c73095499efcfb8344768d7a50591f4
parent1d328ad35fbe05c31e4fccc1aa64cd9cc2bd5f1c (diff)
parenta83bfae4d0df4c2391e9dfed58fab7d335b27501 (diff)
downloadcts-3fafb61357b29a92d7bdb157c261143548c9a9b0.tar.gz
Snap for 7884658 from a83bfae4d0df4c2391e9dfed58fab7d335b27501 to android11-tests-release
Change-Id: I5b776171c20ae8ad2e42fa58b52f125fccfd7f91
-rw-r--r--hostsidetests/appsecurity/src/android/appsecurity/cts/StorageHostTest.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/StorageHostTest.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/StorageHostTest.java
index d7c4b3117df..f685536ef09 100644
--- a/hostsidetests/appsecurity/src/android/appsecurity/cts/StorageHostTest.java
+++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/StorageHostTest.java
@@ -31,6 +31,7 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+import static org.junit.Assume.assumeTrue;
import java.util.Map;
@@ -187,6 +188,7 @@ public class StorageHostTest extends BaseHostJUnit4Test {
@Test
public void testFullDisk() throws Exception {
+ assumeTrue(!isWatch());
// Clear all other cached and external storage data to give ourselves a
// clean slate to test against
getDevice().executeShellCommand("pm trim-caches 4096G");
@@ -256,4 +258,12 @@ public class StorageHostTest extends BaseHostJUnit4Test {
}
}
}
+
+ private boolean isWatch() {
+ try {
+ return getDevice().hasFeature("feature:android.hardware.type.watch");
+ } catch (DeviceNotAvailableException e) {
+ return false;
+ }
+ }
}