am 0ba667e4: Merge "remove sending menu key at the beginning" into jb-dev
* commit '0ba667e4963f0312215f31ec0b4abb96b83a6658':
remove sending menu key at the beginning
diff --git a/tests/res/layout/textview_layout.xml b/tests/res/layout/textview_layout.xml
index 1437be9..512184f 100644
--- a/tests/res/layout/textview_layout.xml
+++ b/tests/res/layout/textview_layout.xml
@@ -33,6 +33,7 @@
android:textColorHint="@drawable/red"
android:textColorLink="@drawable/blue"
android:textScaleX="1.2"
+ android:typeface="normal"
android:textSize="20px"
android:textStyle="normal"
android:layout_width="wrap_content"
diff --git a/tests/tests/app/Android.mk b/tests/tests/app/Android.mk
index d61b87a..8d5877d 100644
--- a/tests/tests/app/Android.mk
+++ b/tests/tests/app/Android.mk
@@ -21,7 +21,7 @@
# and when built explicitly put it in the data partition
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-LOCAL_JAVA_LIBRARIES := android.test.runner
+LOCAL_JAVA_LIBRARIES := android.test.runner telephony-common
LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner
diff --git a/tests/tests/dpi/src/android/dpi/cts/ConfigurationScreenLayoutTest.java b/tests/tests/dpi/src/android/dpi/cts/ConfigurationScreenLayoutTest.java
index d4c3611..f0372e9 100644
--- a/tests/tests/dpi/src/android/dpi/cts/ConfigurationScreenLayoutTest.java
+++ b/tests/tests/dpi/src/android/dpi/cts/ConfigurationScreenLayoutTest.java
@@ -24,6 +24,7 @@
import android.test.ActivityInstrumentationTestCase2;
import android.util.DisplayMetrics;
import android.view.Display;
+import android.view.ViewConfiguration;
import android.view.WindowManager;
public class ConfigurationScreenLayoutTest
@@ -45,6 +46,9 @@
int expectedSize = expectedScreenLayout & Configuration.SCREENLAYOUT_SIZE_MASK;
int expectedLong = expectedScreenLayout & Configuration.SCREENLAYOUT_LONG_MASK;
+ // Check if the device has the navigation bar.
+ boolean navigationBar = hasNavigationBar();
+
// Check that all four orientations report the same configuration value.
for (int i = 0; i < ORIENTATIONS.length; i++) {
Activity activity = startOrientationActivity(ORIENTATIONS[i]);
@@ -52,6 +56,15 @@
int actualSize = mConfig.screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK;
int actualLong = mConfig.screenLayout & Configuration.SCREENLAYOUT_LONG_MASK;
+ if (navigationBar) {
+ // Update screenLayout value if the device has the navigation bar.
+ expectedScreenLayout = reduceScreenLayout(activity,
+ Configuration.SCREENLAYOUT_SIZE_XLARGE
+ | Configuration.SCREENLAYOUT_LONG_YES);
+ expectedSize = expectedScreenLayout & Configuration.SCREENLAYOUT_SIZE_MASK;
+ expectedLong = expectedScreenLayout & Configuration.SCREENLAYOUT_LONG_MASK;
+ }
+
assertEquals("Expected screen size value of " + expectedSize + " but got " + actualSize
+ " for orientation " + ORIENTATIONS[i], expectedSize, actualSize);
assertEquals("Expected screen long value of " + expectedLong + " but got " + actualLong
@@ -80,6 +93,11 @@
return screenLayout;
}
+ private boolean hasNavigationBar() {
+ // Check if the device has a permanent menu key available.
+ return !ViewConfiguration.get(getActivity()).hasPermanentMenuKey();
+ }
+
private Activity startOrientationActivity(int orientation) {
Intent intent = new Intent();
intent.putExtra(OrientationActivity.EXTRA_ORIENTATION, orientation);
diff --git a/tests/tests/permission/Android.mk b/tests/tests/permission/Android.mk
index db67bf4..07f20d8 100644
--- a/tests/tests/permission/Android.mk
+++ b/tests/tests/permission/Android.mk
@@ -19,7 +19,7 @@
LOCAL_MODULE_TAGS := tests
-LOCAL_JAVA_LIBRARIES := android.test.runner
+LOCAL_JAVA_LIBRARIES := android.test.runner telephony-common
LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner
diff --git a/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java b/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
index 9d89598..e8d2c70 100644
--- a/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
@@ -271,6 +271,7 @@
"/data/gpscfg",
"/data/hwvefs",
"/data/htcfs",
+ "/data/img",
"/data/install",
"/data/internal-device",
"/data/internal-device/DCIM",
@@ -292,6 +293,7 @@
"/data/local/tmp",
"/data/local/tmp/com.nuance.android.vsuite.vsuiteapp",
"/data/log",
+ "/data/logger",
"/data/lost+found",
"/data/misc",
"/data/misc/bluetooth",
diff --git a/tests/tests/permission2/Android.mk b/tests/tests/permission2/Android.mk
index 8e3d8a1..86a8bc7 100755
--- a/tests/tests/permission2/Android.mk
+++ b/tests/tests/permission2/Android.mk
@@ -19,7 +19,7 @@
LOCAL_MODULE_TAGS := tests
-LOCAL_JAVA_LIBRARIES := android.test.runner
+LOCAL_JAVA_LIBRARIES := android.test.runner telephony-common mms-common
LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner
diff --git a/tests/tests/telephony/Android.mk b/tests/tests/telephony/Android.mk
index 519f44a..e7a3336 100644
--- a/tests/tests/telephony/Android.mk
+++ b/tests/tests/telephony/Android.mk
@@ -22,7 +22,7 @@
# and when built explicitly put it in the data partition
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-LOCAL_JAVA_LIBRARIES := android.test.runner
+LOCAL_JAVA_LIBRARIES := android.test.runner telephony-common mms-common
LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner
diff --git a/tests/tests/view/src/android/view/cts/KeyEventTest.java b/tests/tests/view/src/android/view/cts/KeyEventTest.java
old mode 100644
new mode 100755
index 7c1f1c7..61d7d92
--- a/tests/tests/view/src/android/view/cts/KeyEventTest.java
+++ b/tests/tests/view/src/android/view/cts/KeyEventTest.java
@@ -105,7 +105,6 @@
assertEquals(0, keyData.number);
assertEquals('z', keyData.meta[0]);
assertEquals('Z', keyData.meta[1]);
- assertEquals(0, keyData.meta[2]);
assertEquals(0, keyData.meta[3]);
}
diff --git a/tests/tests/widget/src/android/widget/cts/TextViewTest.java b/tests/tests/widget/src/android/widget/cts/TextViewTest.java
index aba2293..e295c40 100755
--- a/tests/tests/widget/src/android/widget/cts/TextViewTest.java
+++ b/tests/tests/widget/src/android/widget/cts/TextViewTest.java
@@ -1797,7 +1797,7 @@
assertEquals(20f, mTextView.getTextSize(), 0.01f);
// getTypeface
- // getTypeface will be null if android:typeface is not set or is set to normal,
+ // getTypeface will be null if android:typeface is set to normal,
// and android:style is not set or is set to normal
assertNull(mTextView.getTypeface());
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/Test_xor_int_lit8.java b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/Test_xor_int_lit8.java
index b2a3f69..a87103b 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/Test_xor_int_lit8.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/Test_xor_int_lit8.java
@@ -34,7 +34,7 @@
}
/**
- * @title Arguments = 0xfffffff8, 0xf1
+ * @title Arguments = 0xfffffff8, 0xf1 (will be sign extended)
*/
public void testN2() {
T_xor_int_lit8_2 t = new T_xor_int_lit8_2();
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_1.d b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_1.d
index cb4d830..70c51f1 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_1.d
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_1.d
@@ -28,7 +28,7 @@
.limit regs 3
const v1, 15
- xor-int/lit16 v1, v1, 8
+ xor-int/lit8 v1, v1, 8
return v1
.end method
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_2.d b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_2.d
index 8d23bf6..d471d75 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_2.d
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_2.d
@@ -28,7 +28,7 @@
.limit regs 3
const v2, -8
- xor-int/lit16 v1, v2, -15
+ xor-int/lit8 v1, v2, -15
return v1
.end method
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_3.d b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_3.d
index 5953574..f73909d 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_3.d
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_3.d
@@ -28,7 +28,7 @@
.limit regs 3
const v1, 0
- xor-int/lit16 v1, v1, -1
+ xor-int/lit8 v1, v1, -1
return v1
.end method
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_4.d b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_4.d
index c2270c4..6832299 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_4.d
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_4.d
@@ -28,7 +28,7 @@
.limit regs 3
const v1, 2147483647
- xor-int/lit16 v1, v1, -128
+ xor-int/lit8 v1, v1, -128
return v1
.end method
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_6.d b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_6.d
index b3ab7e4..b7bc40a 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_6.d
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_6.d
@@ -27,7 +27,7 @@
.method public run()I
.limit regs 3
- xor-int/lit16 v1, v2, 1
+ xor-int/lit8 v1, v2, 1
return v1
.end method
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_7.d b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_7.d
index 74bf7e5..23e9337 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_7.d
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_7.d
@@ -27,7 +27,7 @@
.method public run(F)I
.limit regs 3
- xor-int/lit16 v1, v2, 8
+ xor-int/lit8 v1, v2, 8
return v1
.end method
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_8.d b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_8.d
index 0857ea6..0fc33fc 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_8.d
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/d/T_xor_int_lit8_8.d
@@ -27,7 +27,7 @@
.method public run(I)I
.limit regs 3
- xor-int/lit16 v1, v3, 8
+ xor-int/lit8 v1, v3, 8
return v1
.end method