summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--OldCtsTestCaseList.mk1
-rw-r--r--apps/CtsVerifier/src/com/android/cts/verifier/audio/AudioLoopbackActivity.java4
-rw-r--r--tests/tests/calllog/Android.mk38
-rw-r--r--tests/tests/calllog/AndroidManifest.xml38
-rw-r--r--tests/tests/calllog/AndroidTest.xml24
-rw-r--r--tests/tests/calllog/src/android/calllog/cts/CallLogBackupTest.java337
-rw-r--r--tests/tests/calllog/src/android/calllog/cts/TestUtils.java74
-rw-r--r--tests/tests/media/src/android/media/cts/NativeClearKeySystemTest.java64
-rw-r--r--tools/cts-tradefed/res/config/cts-known-failures.xml3
-rwxr-xr-xtools/utils/buildCts.py3
10 files changed, 55 insertions, 531 deletions
diff --git a/OldCtsTestCaseList.mk b/OldCtsTestCaseList.mk
index a1a7d5a169e..ca299eea180 100644
--- a/OldCtsTestCaseList.mk
+++ b/OldCtsTestCaseList.mk
@@ -171,7 +171,6 @@ cts_test_packages := \
CtsBackupTestCases \
CtsBluetoothTestCases \
CtsCalendarcommon2TestCases \
- CtsCallLogTestCases \
CtsCameraTestCases \
CtsCarTestCases \
CtsContentTestCases \
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/audio/AudioLoopbackActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/audio/AudioLoopbackActivity.java
index 9e52d959c19..f5cf4e1039e 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/audio/AudioLoopbackActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/audio/AudioLoopbackActivity.java
@@ -58,8 +58,8 @@ public class AudioLoopbackActivity extends PassFailButtons.Activity {
private static final double CONFIDENCE_THRESHOLD = 0.6;
private Correlation mCorrelation = new Correlation();
- // TODO: remove this when no longer necessary
- private int mNumFramesToIgnore = mSamplingRate / 10; // ignore first 100 ms
+ // TODO: remove this variable
+ private int mNumFramesToIgnore = 0;
OnBtnClickListener mBtnClickListener = new OnBtnClickListener();
Context mContext;
diff --git a/tests/tests/calllog/Android.mk b/tests/tests/calllog/Android.mk
deleted file mode 100644
index 105f1885aec..00000000000
--- a/tests/tests/calllog/Android.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright (C) 2015 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_PACKAGE_NAME := CtsCallLogTestCases
-
-# Don't include this package in any target.
-LOCAL_MODULE_TAGS := optional
-
-# When built, explicitly put it in the data partition.
-LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-
-LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner
-
-LOCAL_JAVA_LIBRARIES := bouncycastle
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_SDK_VERSION := current
-
-# Tag this module as a cts test artifact
-LOCAL_COMPATIBILITY_SUITE := cts
-
-include $(BUILD_CTS_PACKAGE)
diff --git a/tests/tests/calllog/AndroidManifest.xml b/tests/tests/calllog/AndroidManifest.xml
deleted file mode 100644
index d66559fc1e1..00000000000
--- a/tests/tests/calllog/AndroidManifest.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="android.calllog.cts">
- <uses-sdk android:minSdkVersion="21" />
-
- <uses-permission android:name="android.permission.READ_CALL_LOG" />
- <uses-permission android:name="android.permission.WRITE_CALL_LOG" />
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
- <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
- <uses-permission android:name="android.permission.INTERNET" />
-
- <application>
- <uses-library android:name="android.test.runner" />
- </application>
-
- <instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
- android:targetPackage="android.calllog.cts"
- android:label="CTS tests for android.calllog package">
- <meta-data android:name="listener"
- android:value="com.android.cts.runner.CtsTestRunListener" />
- </instrumentation>
-</manifest>
-
diff --git a/tests/tests/calllog/AndroidTest.xml b/tests/tests/calllog/AndroidTest.xml
deleted file mode 100644
index 408aaac9434..00000000000
--- a/tests/tests/calllog/AndroidTest.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<configuration description="Config for CTS Call Log test cases">
- <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
- <option name="cleanup-apks" value="true" />
- <option name="test-file-name" value="CtsCallLogTestCases.apk" />
- </target_preparer>
- <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
- <option name="package" value="android.calllog.cts" />
- </test>
-</configuration> \ No newline at end of file
diff --git a/tests/tests/calllog/src/android/calllog/cts/CallLogBackupTest.java b/tests/tests/calllog/src/android/calllog/cts/CallLogBackupTest.java
deleted file mode 100644
index 1ae735a21df..00000000000
--- a/tests/tests/calllog/src/android/calllog/cts/CallLogBackupTest.java
+++ /dev/null
@@ -1,337 +0,0 @@
-/*
- * Copyright (C) 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.calllog.cts;
-
-import android.content.ContentResolver;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.pm.PackageManager;
-import android.database.Cursor;
-import android.provider.CallLog;
-import android.provider.CallLog.Calls;
-import android.provider.Settings;
-import android.test.InstrumentationTestCase;
-import android.util.Log;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Objects;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * Verifies the behavior of CallLogBackup.
- *
- * This tests three import things:
- * 1. That call log gets backed up and restored using the standard BackupAgent implementation.
- * - To test we create call-log entries back them up, clear the call log, and restore them.
- * - We leverage the LocalTransport backup implementation to do this.
- * 2. The call log backup is implemented by the expected package: {@link #CALLLOG_BACKUP_PACKAGE}.
- * - We always trigger the expected package for backup/restore within the tests.
- * 3. The backup format for call log is as expected so that backup works across android devices
- * by different OEMs.
- * - We peek into the backup files saved by LocalTransport and verify their binary output is
- * as expected.
- */
-public class CallLogBackupTest extends InstrumentationTestCase {
- private static final String TAG = "CallLogBackupTest";
-
- private static final String LOCAL_BACKUP_COMPONENT =
- "android/com.android.internal.backup.LocalTransport";
-
- private static final String CALLLOG_BACKUP_PACKAGE = "com.android.providers.calllogbackup";
- private static final String ALT_CALLLOG_BACKUP_PACKAGE = "com.android.calllogbackup";
-
- private static final String TEST_NUMBER = "555-1234";
- private static final int CALL_START_TIME = 0;
- private static final int CALL_DURATION = 2000;
- private static final int TIMEOUT_BACKUP = 10000;
- private static final String TEST_POST_DIAL_DIGITS = ";1234";
- private static final String TEST_VIA_NUMBER = "555-1112";
-
- private static final Pattern BMGR_ENABLED_PATTERN = Pattern.compile(
- "^Backup Manager currently (enabled|disabled)$");
-
- private static final String[] CALL_LOG_PROJECTION = new String[] {
- CallLog.Calls._ID,
- CallLog.Calls.DATE,
- CallLog.Calls.DURATION,
- CallLog.Calls.NUMBER,
- CallLog.Calls.TYPE,
- CallLog.Calls.COUNTRY_ISO,
- CallLog.Calls.GEOCODED_LOCATION,
- CallLog.Calls.NUMBER_PRESENTATION,
- CallLog.Calls.PHONE_ACCOUNT_COMPONENT_NAME,
- CallLog.Calls.PHONE_ACCOUNT_ID,
- CallLog.Calls.DATA_USAGE,
- CallLog.Calls.FEATURES,
- CallLog.Calls.POST_DIAL_DIGITS,
- CallLog.Calls.VIA_NUMBER
- };
-
- protected interface Condition {
- Object expected();
- Object actual();
- }
-
- class Call {
- int id;
- long date;
- long duration;
- String number;
- int type;
- String phoneAccountComponent;
- String phoneAccountId;
- int presentation;
- String postDialDigits;
- String viaNumber;
- }
-
- private String mCallLogBackupPackageName;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- PackageManager pm = getContext().getPackageManager();
- try {
- pm.getPackageInfo(CALLLOG_BACKUP_PACKAGE, 0);
- mCallLogBackupPackageName = CALLLOG_BACKUP_PACKAGE;
- } catch (PackageManager.NameNotFoundException e) {
- mCallLogBackupPackageName = ALT_CALLLOG_BACKUP_PACKAGE;
- }
- }
-
- /**
- * Test:
- * 1) Clear the call log
- * 2) Add a single call
- * 3) Run backup
- * 4) clear the call log
- * 5) Run restore
- * 6) Verify that we the call from step (2)
- */
- public void testSingleCallBackup() throws Exception {
- if (!getContext().getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) {
- Log.i(TAG, "Skipping calllog tests: no telephony feature");
- return;
- }
- // This CTS test depends on the local transport and so if it is not present,
- // skip the test with success.
- if (!hasBackupTransport(LOCAL_BACKUP_COMPONENT)) {
- Log.i(TAG, "skipping calllog tests: no local transport");
- return;
- }
-
- // Turn on backup and set to the local backup agent.
- boolean previouslyEnabled = enableBackup(true /* enable */);
- String oldTransport = setBackupTransport(LOCAL_BACKUP_COMPONENT);
- int previousFullDataBackupAware = Settings.Secure.getInt(getContext().getContentResolver(),
- "user_full_data_backup_aware", 0);
- enableFullDataBackupAware(1);
-
- // Clear the call log
- Log.i(TAG, "Clearing the call log");
- clearCallLog();
- clearBackups();
-
- // Add a single call and verify it exists
- Log.i(TAG, "Adding a call");
- addCall();
- verifyCall();
-
- // Run backup for the call log (saves the single call).
- Log.i(TAG, "Running backup");
- runBackupFor(mCallLogBackupPackageName);
-
- // Clear the call log and verify that it is empty
- Log.i(TAG, "Clearing the call log");
- clearCallLog();
- assertEquals(0, getCalls().size());
-
- // Restore from the previous backup and verify we have the new call again.
- Log.i(TAG, "Restoring the single call");
- runRestoreFor(mCallLogBackupPackageName);
-
- verifyCall();
-
- // Clean up after ourselves
- clearCallLog();
-
- // Reset backup manager to original state.
- Log.i(TAG, "Reseting backup");
- setBackupTransport(oldTransport);
- enableBackup(previouslyEnabled);
- enableFullDataBackupAware(previousFullDataBackupAware);
- }
-
- private Call verifyCall() {
- waitUntilConditionIsTrueOrTimeout(new Condition() {
- @Override
- public Object expected() {
- return 1;
- }
-
- @Override
- public Object actual() {
- return getCalls().size();
- }
- }, TIMEOUT_BACKUP);
-
- List<Call> calls = getCalls();
- Call call = calls.get(0);
- assertEquals(TEST_NUMBER, call.number);
- assertEquals(CALL_START_TIME, call.date);
- assertEquals(CALL_DURATION, call.duration);
- assertEquals(Calls.OUTGOING_TYPE, call.type);
- assertEquals(TEST_POST_DIAL_DIGITS, call.postDialDigits);
- assertEquals(TEST_VIA_NUMBER, call.viaNumber);
- return call;
- }
-
- private boolean enableBackup(boolean enable) throws Exception {
- // Check to see the previous state of the backup service
- boolean previouslyEnabled = false;
- String output = exec("bmgr enabled");
- Matcher matcher = BMGR_ENABLED_PATTERN.matcher(output.trim());
- if (matcher.find()) {
- previouslyEnabled = "enabled".equals(matcher.group(1));
- } else {
- throw new RuntimeException("Backup output format changed. No longer matches"
- + " expected regex: " + BMGR_ENABLED_PATTERN + "\nactual: '" + output + "'");
- }
-
- exec("bmgr enable " + enable);
- return previouslyEnabled;
- }
-
- private void runBackupFor(String packageName) throws Exception {
- exec("bmgr backupnow " + packageName);
- }
-
- private void runRestoreFor(String packageName) throws Exception {
- exec("bmgr restore " + packageName);
- }
-
- private void enableFullDataBackupAware(int status) throws Exception {
- exec("settings put secure user_full_data_backup_aware " + status);
- }
-
- private String setBackupTransport(String transport) throws Exception {
- String output = exec("bmgr transport " + transport);
- Pattern pattern = Pattern.compile("\\(formerly (.*)\\)$");
- Matcher matcher = pattern.matcher(output);
- if (matcher.find()) {
- return matcher.group(1);
- } else {
- throw new Exception("non-parsable output setting bmgr transport: " + output);
- }
- }
-
- /**
- * Checks the list of supported transports and verifies that the specified transport
- * is included.
- */
- private boolean hasBackupTransport(String transport) throws Exception {
- String output = exec("bmgr list transports");
- for (String t : output.split(" ")) {
- if ("*".equals(t)) {
- // skip the current selection marker.
- continue;
- } else if (Objects.equals(transport, t)) {
- return true;
- }
- }
- return false;
- }
-
- private void clearCallLog() {
- ContentResolver resolver = getContext().getContentResolver();
- resolver.delete(Calls.CONTENT_URI, null, null);
- }
-
- private void clearBackups() throws Exception {
- exec("bmgr wipe " + LOCAL_BACKUP_COMPONENT + " " + mCallLogBackupPackageName);
- }
-
- private void addCall() {
- ContentValues values = new ContentValues(6);
- values.put(Calls.NUMBER, TEST_NUMBER);
- values.put(Calls.NUMBER_PRESENTATION, Calls.PRESENTATION_ALLOWED);
- values.put(Calls.TYPE, Integer.valueOf(Calls.OUTGOING_TYPE));
- values.put(Calls.DATE, Long.valueOf(CALL_START_TIME));
- values.put(Calls.DURATION, Long.valueOf(CALL_DURATION));
- values.put(Calls.NEW, Integer.valueOf(1));
- values.put(Calls.POST_DIAL_DIGITS, TEST_POST_DIAL_DIGITS);
- values.put(Calls.VIA_NUMBER, TEST_VIA_NUMBER);
-
- getContext().getContentResolver().insert(Calls.CONTENT_URI, values);
- }
-
- void waitUntilConditionIsTrueOrTimeout(Condition condition, long timeout) {
- final long start = System.currentTimeMillis();
- while (!condition.expected().equals(condition.actual())
- && System.currentTimeMillis() - start < timeout) {
- try {
- Thread.sleep(100);
- } catch (InterruptedException e) {
- // ignore
- }
- }
- assertEquals(condition.expected(), condition.actual());
- }
-
- private List<Call> getCalls() {
- List<Call> calls = new LinkedList<>();
-
- ContentResolver resolver = getContext().getContentResolver();
- Cursor cursor = resolver.query(Calls.CONTENT_URI, CALL_LOG_PROJECTION, null, null, null);
- if (cursor != null) {
- try {
- while (cursor.moveToNext()) {
- Call call = new Call();
- call.id = cursor.getInt(cursor.getColumnIndex(Calls._ID));
- call.number = cursor.getString(cursor.getColumnIndex(Calls.NUMBER));
- call.date = cursor.getLong(cursor.getColumnIndex(Calls.DATE));
- call.duration = cursor.getLong(cursor.getColumnIndex(Calls.DURATION));
- call.type = cursor.getInt(cursor.getColumnIndex(Calls.TYPE));
- call.phoneAccountComponent = cursor.getString(
- cursor.getColumnIndex(Calls.PHONE_ACCOUNT_COMPONENT_NAME));
- call.phoneAccountId = cursor.getString(
- cursor.getColumnIndex(Calls.PHONE_ACCOUNT_ID));
- call.presentation = cursor.getInt(
- cursor.getColumnIndex(Calls.NUMBER_PRESENTATION));
- call.postDialDigits = cursor.getString(
- cursor.getColumnIndex(Calls.POST_DIAL_DIGITS));
- call.viaNumber = cursor.getString(
- cursor.getColumnIndex(Calls.VIA_NUMBER));
- calls.add(call);
- }
- } finally {
- cursor.close();
- }
- }
- return calls;
- }
-
- private Context getContext() {
- return getInstrumentation().getContext();
- }
-
- private String exec(String command) throws Exception {
- return TestUtils.executeShellCommand(getInstrumentation(), command);
- }
-}
diff --git a/tests/tests/calllog/src/android/calllog/cts/TestUtils.java b/tests/tests/calllog/src/android/calllog/cts/TestUtils.java
deleted file mode 100644
index d2c57a5ead4..00000000000
--- a/tests/tests/calllog/src/android/calllog/cts/TestUtils.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package android.calllog.cts;
-
-import android.app.Instrumentation;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.pm.PackageManager;
-import android.os.Build;
-import android.os.ParcelFileDescriptor;
-import android.telecom.PhoneAccountHandle;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.nio.charset.StandardCharsets;
-
-public class TestUtils {
- /**
- * Executes the given shell command and returns the output in a string. Note that even
- * if we don't care about the output, we have to read the stream completely to make the
- * command execute.
- */
- public static String executeShellCommand(Instrumentation instrumentation,
- String command) throws Exception {
- BufferedReader br = null;
- try (InputStream in = executeStreamedShellCommand(instrumentation, command)) {
- br = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8));
- String str = null;
- StringBuilder out = new StringBuilder();
- while ((str = br.readLine()) != null) {
- out.append(str);
- }
- return out.toString();
- } finally {
- if (br != null) {
- closeQuietly(br);
- }
- }
- }
-
- public static FileInputStream executeStreamedShellCommand(Instrumentation instrumentation,
- String command) throws Exception {
- final ParcelFileDescriptor pfd =
- instrumentation.getUiAutomation().executeShellCommand(command);
- return new FileInputStream(pfd.getFileDescriptor());
- }
-
- private static void closeQuietly(AutoCloseable closeable) {
- if (closeable != null) {
- try {
- closeable.close();
- } catch (RuntimeException rethrown) {
- throw rethrown;
- } catch (Exception ignored) {
- }
- }
- }
-}
diff --git a/tests/tests/media/src/android/media/cts/NativeClearKeySystemTest.java b/tests/tests/media/src/android/media/cts/NativeClearKeySystemTest.java
index 9ead8fb4b0f..649496e58d6 100644
--- a/tests/tests/media/src/android/media/cts/NativeClearKeySystemTest.java
+++ b/tests/tests/media/src/android/media/cts/NativeClearKeySystemTest.java
@@ -191,14 +191,52 @@ public class NativeClearKeySystemTest extends MediaPlayerTestBase {
params.surface.release();
}
- private ArrayList<Integer> intVersion(String version) {
- String versions[] = version.split("\\.");
+ /*
+ * Compare version strings
+ *
+ * @param actual Actual platform's Android version
+ * @param expected Minimum Android version
+ *
+ * @return 0 if the versions are identical
+ * @return +v if actual is greater than expected
+ * @return -ve if actual is less than expected
+ */
+ private static Integer compareVersion(String actual, String expected) {
+ String[] part1 = actual.split("\\.");
+ String[] part2 = expected.split("\\.");
+
+ int idx = 0;
+ for (; idx < part1.length && idx < part2.length; idx++) {
+ String p1 = part1[idx];
+ String p2 = part2[idx];
+
+ int cmp;
+ if (p1.matches("\\d+") && p2.matches("\\d+")) {
+ cmp = new Integer(p1).compareTo(new Integer(p2));
+ } else {
+ cmp = part1[idx].compareTo(part2[idx]);
+ }
+ if (cmp != 0) return cmp;
+ }
- ArrayList<Integer> versionNumbers = Lists.newArrayList();
- for (String subVersion : versions) {
- versionNumbers.add(Integer.parseInt(subVersion));
+ if (part1.length == part2.length) {
+ return 0;
+ } else {
+ boolean left = part1.length > idx;
+ String[] parts = left ? part1 : part2;
+
+ for (; idx < parts.length; idx++) {
+ String p = parts[idx];
+ int cmp;
+ if (p.matches("\\d+")) {
+ cmp = new Integer(p).compareTo(0);
+ } else {
+ cmp = 1;
+ }
+ if (cmp != 0) return left ? cmp : -cmp;
+ }
+ return 0;
}
- return versionNumbers;
}
private static native boolean isCryptoSchemeSupportedNative(final byte[] uuid);
@@ -212,10 +250,14 @@ public class NativeClearKeySystemTest extends MediaPlayerTestBase {
private static native boolean testPsshNative(final byte[] uuid, final String videoUrl);
public void testClearKeyPlaybackCenc() throws Exception {
- testClearKeyPlayback(
- ISO_BMFF_VIDEO_MIME_TYPE,
- CENC_AUDIO_URL,
- CENC_CLEARKEY_VIDEO_URL,
- VIDEO_WIDTH_CENC, VIDEO_HEIGHT_CENC);
+ if (compareVersion(Build.VERSION.RELEASE, "7.1.2") >= 0) {
+ testClearKeyPlayback(
+ ISO_BMFF_VIDEO_MIME_TYPE,
+ CENC_AUDIO_URL,
+ CENC_CLEARKEY_VIDEO_URL,
+ VIDEO_WIDTH_CENC, VIDEO_HEIGHT_CENC);
+ } else {
+ Log.i(TAG, "Skip test, which is intended for Android 7.1.2 and above.");
+ }
}
}
diff --git a/tools/cts-tradefed/res/config/cts-known-failures.xml b/tools/cts-tradefed/res/config/cts-known-failures.xml
index 3275ea9362a..ad164e07cad 100644
--- a/tools/cts-tradefed/res/config/cts-known-failures.xml
+++ b/tools/cts-tradefed/res/config/cts-known-failures.xml
@@ -60,9 +60,6 @@
<option name="compatibility:exclude-filter" value="CtsAssistTestCases android.assist.cts.TextViewTest#testTextView" />
<option name="compatibility:exclude-filter" value="CtsAssistTestCases android.assist.cts.WebViewTest#testWebView" />
- <!-- b/23776099 -->
- <option name="compatibility:exclude-filter" value="CtsCallLogTestCases" />
-
<!-- b/17530117 -->
<option name="compatibility:exclude-filter" value="CtsCameraTestCases android.hardware.camera2.cts.AllocationTest#testBlackWhite" />
<option name="compatibility:exclude-filter" value="CtsCameraTestCases android.hardware.camera2.cts.AllocationTest#testParamSensitivity" />
diff --git a/tools/utils/buildCts.py b/tools/utils/buildCts.py
index f983b15ab95..8dec71dec11 100755
--- a/tools/utils/buildCts.py
+++ b/tools/utils/buildCts.py
@@ -531,9 +531,6 @@ def BuildCtsTemporarilyKnownFailureList():
'android.assist.cts.TextViewTest',
'android.assist.cts.WebViewTest',
],
- 'android.calllog' : [
- 'android.calllog.cts.CallLogBackupTest#testSingleCallBackup',
- ],
'android.dumpsys' : [
'android.dumpsys.cts.DumpsysHostTest#testBatterystatsOutput',
'android.dumpsys.cts.DumpsysHostTest#testGfxinfoFramestats',