Merge "Merge "Disabling EncryptionTests on Android television" into nougat-cts-dev am: f775c8b531" into nougat-mr1-cts-dev
diff --git a/tests/tests/security/src/android/security/cts/EncryptionTest.java b/tests/tests/security/src/android/security/cts/EncryptionTest.java
index 85d82e2..2f18866 100644
--- a/tests/tests/security/src/android/security/cts/EncryptionTest.java
+++ b/tests/tests/security/src/android/security/cts/EncryptionTest.java
@@ -22,6 +22,7 @@
import junit.framework.TestCase;
import android.app.ActivityManager;
+import android.content.pm.PackageManager;
import android.content.Context;
import android.util.Log;
import java.io.BufferedReader;
@@ -79,7 +80,7 @@
private boolean isRequired() {
// Optional before MIN_API_LEVEL or if the device has low RAM
- return PropertyUtil.getFirstApiLevel() >= MIN_API_LEVEL && !hasLowRAM();
+ return PropertyUtil.getFirstApiLevel() >= MIN_API_LEVEL && !hasLowRAM() && !isTelevision();
}
public void testConfig() throws Exception {
@@ -105,6 +106,12 @@
}
}
+ private boolean isTelevision() {
+ PackageManager pm = getContext().getPackageManager();
+ return pm.hasSystemFeature(PackageManager.FEATURE_TELEVISION)
+ || pm.hasSystemFeature(PackageManager.FEATURE_LEANBACK);
+ }
+
public void testEncryption() throws Exception {
if (!isRequired() || deviceIsEncrypted()) {
return;