Merge "Add channel index AudioRecord tests" into mnc-dev
diff --git a/tests/tests/app/src/android/app/cts/ActivityManagerMemoryClassTest.java b/tests/tests/app/src/android/app/cts/ActivityManagerMemoryClassTest.java
index 88828ea..5deff5a 100644
--- a/tests/tests/app/src/android/app/cts/ActivityManagerMemoryClassTest.java
+++ b/tests/tests/app/src/android/app/cts/ActivityManagerMemoryClassTest.java
@@ -135,8 +135,8 @@
}
private void assertMemoryForScreenDensity(int memoryClass, int screenDensity, int screenSize) {
- int expectedMinimumMemory = ExpectedMemorySizesClass.getExpectedMemorySize(screenDensity,
- screenSize);
+ int expectedMinimumMemory = ExpectedMemorySizesClass.getExpectedMemorySize(screenSize,
+ screenDensity);
assertTrue("Expected to have at least " + expectedMinimumMemory
+ "mb of memory for screen density " + screenDensity,
diff --git a/tests/tests/graphics/src/android/graphics/drawable/cts/LayerDrawableTest.java b/tests/tests/graphics/src/android/graphics/drawable/cts/LayerDrawableTest.java
index c9ee330..e930671 100644
--- a/tests/tests/graphics/src/android/graphics/drawable/cts/LayerDrawableTest.java
+++ b/tests/tests/graphics/src/android/graphics/drawable/cts/LayerDrawableTest.java
@@ -22,8 +22,6 @@
import java.io.IOException;
-import android.R.attr;
-import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import android.graphics.Canvas;
import android.graphics.Color;
@@ -39,7 +37,6 @@
import android.graphics.drawable.RotateDrawable;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.StateListDrawable;
-import android.os.Debug;
import android.test.AndroidTestCase;
import android.util.AttributeSet;
import android.util.StateSet;
@@ -238,6 +235,27 @@
}
@SuppressWarnings("deprecation")
+ public void testSetDrawableByLayerId() {
+ Drawable layer1A = new ColorDrawable(Color.RED);
+ Drawable layer2A = new ColorDrawable(Color.BLUE);
+ LayerDrawable layerDrawable = new LayerDrawable(new Drawable[] { layer1A, layer2A });
+ layerDrawable.setId(0, 10);
+ layerDrawable.setId(1, 20);
+
+ Drawable layer1B = new ColorDrawable(Color.GREEN);
+ layer1B.setLevel(10000);
+ Drawable layer2B = new ColorDrawable(Color.YELLOW);
+ layer2B.setLevel(5000);
+ layerDrawable.setDrawableByLayerId(10, layer1B);
+ layerDrawable.setDrawableByLayerId(20, layer2B);
+
+ assertEquals("Level is unchanged after setDrawableByLayerId()",
+ 10000, layerDrawable.findDrawableByLayerId(10).getLevel());
+ assertEquals("Level is unchanged after setDrawableByLayerId()",
+ 5000, layerDrawable.findDrawableByLayerId(20).getLevel());
+ }
+
+ @SuppressWarnings("deprecation")
public void testSetLayerInset() {
Drawable[] array = new Drawable[] { new BitmapDrawable(), new ColorDrawable(Color.BLUE) };
LayerDrawable layerDrawable = new LayerDrawable(array);
diff --git a/tools/utils/buildCts.py b/tools/utils/buildCts.py
index b12adb0..2fd71a8 100755
--- a/tools/utils/buildCts.py
+++ b/tools/utils/buildCts.py
@@ -260,6 +260,8 @@
plan = tools.TestPlan(packages)
plan.Exclude('.*')
plan.Include(r'com\.drawelements\.')
+ # STOPSHIP(jpoyry): Do not ship with reduced test plan to avoid confusion of having multiple
+ # different deqp sets in different plans.
plan.ExcludeTests('com.drawelements.deqp.gles3', ReadFileLines(os.path.join(self.test_root, 'deqp/gles3-temporary-failures.txt')))
plan.ExcludeTests('com.drawelements.deqp.gles31', ReadFileLines(os.path.join(self.test_root, 'deqp/gles31-temporary-failures.txt')))
self.__WritePlan(plan, 'CTS-DEQP')