Merge cherrypicks of [2476230, 2476289, 2476272, 2476118, 2475997, 2476251, 2476119, 2476341, 2476252, 2476290, 2476232, 2476274, 2475999, 2476343, 2476275, 2476216, 2476381, 2476256, 2476000, 2476362, 2476345, 2476364, 2476234, 2476346, 2476347, 2476365, 2476276, 2476219, 2476277, 2476402, 2476348, 2476235, 2476383, 2476257, 2476278, 2476236, 2476350, 2476351, 2476307, 2476403, 2476308, 2476258] into oc-release
Change-Id: I5e25851429cca2a3dbf3f1a6239373297303c0bd
diff --git a/apps/CtsVerifier/res/layout/telecom_enable_phone_account.xml b/apps/CtsVerifier/res/layout/telecom_enable_phone_account.xml
index 981fbf5..d28515b 100644
--- a/apps/CtsVerifier/res/layout/telecom_enable_phone_account.xml
+++ b/apps/CtsVerifier/res/layout/telecom_enable_phone_account.xml
@@ -15,84 +15,90 @@
~ limitations under the License
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical" android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <TextView
+<ScrollView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+ <LinearLayout
+ android:orientation="vertical"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/telecom_enable_phone_account_info"/>
+ android:layout_height="wrap_content">
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/js_padding"
- android:layout_marginBottom="@dimen/js_padding">
-
- <ImageView
- android:id="@+id/step_1_status"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/fs_indeterminate"
- android:layout_marginRight="@dimen/js_padding"
- android:layout_alignParentStart="true"
- android:layout_alignParentTop="true" />
<TextView
- android:id="@+id/step_1_instructions"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="@string/telecom_enable_phone_account_step_1"
- android:textSize="16dp"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
- android:layout_toRightOf="@id/step_1_status" />
- <Button
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/step_1_instructions"
- android:layout_marginLeft="20dip"
- android:layout_marginRight="20dip"
- android:layout_toRightOf="@id/step_1_status"
- android:id="@+id/telecom_enable_phone_account_register_button"
- android:text="@string/telecom_enable_phone_account_register_button"/>
- </RelativeLayout>
+ android:text="@string/telecom_enable_phone_account_info"/>
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/js_padding"
- android:layout_marginBottom="@dimen/js_padding">
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/js_padding"
+ android:layout_marginBottom="@dimen/js_padding">
- <ImageView
- android:id="@+id/step_2_status"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/fs_indeterminate"
- android:layout_marginRight="@dimen/js_padding"
- android:layout_alignParentStart="true"
- android:layout_alignParentTop="true" />
- <TextView
- android:id="@+id/step_2_instructions"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/telecom_enable_phone_account_step_2"
- android:textSize="16dp"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
- android:layout_toRightOf="@id/step_2_status" />
- <Button
- android:id="@+id/telecom_enable_phone_account_confirm_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/step_2_instructions"
- android:layout_marginLeft="20dip"
- android:layout_marginRight="20dip"
- android:layout_toRightOf="@id/step_2_status"
- android:text="@string/telecom_enable_phone_account_confirm_button"/>
- </RelativeLayout>
+ <ImageView
+ android:id="@+id/step_1_status"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/fs_indeterminate"
+ android:layout_marginRight="@dimen/js_padding"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentTop="true" />
+ <TextView
+ android:id="@+id/step_1_instructions"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/telecom_enable_phone_account_step_1"
+ android:textSize="16dp"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentTop="true"
+ android:layout_toRightOf="@id/step_1_status" />
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_below="@id/step_1_instructions"
+ android:layout_marginLeft="20dip"
+ android:layout_marginRight="20dip"
+ android:layout_toRightOf="@id/step_1_status"
+ android:id="@+id/telecom_enable_phone_account_register_button"
+ android:text="@string/telecom_enable_phone_account_register_button"/>
+ </RelativeLayout>
- <include layout="@layout/pass_fail_buttons" />
-</LinearLayout>
\ No newline at end of file
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/js_padding"
+ android:layout_marginBottom="@dimen/js_padding">
+
+ <ImageView
+ android:id="@+id/step_2_status"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/fs_indeterminate"
+ android:layout_marginRight="@dimen/js_padding"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentTop="true" />
+ <TextView
+ android:id="@+id/step_2_instructions"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/telecom_enable_phone_account_step_2"
+ android:textSize="16dp"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentTop="true"
+ android:layout_toRightOf="@id/step_2_status" />
+ <Button
+ android:id="@+id/telecom_enable_phone_account_confirm_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_below="@id/step_2_instructions"
+ android:layout_marginLeft="20dip"
+ android:layout_marginRight="20dip"
+ android:layout_toRightOf="@id/step_2_status"
+ android:text="@string/telecom_enable_phone_account_confirm_button"/>
+ </RelativeLayout>
+
+ <include layout="@layout/pass_fail_buttons" />
+ </LinearLayout>
+</ScrollView>
\ No newline at end of file
diff --git a/apps/CtsVerifier/res/layout/telecom_incoming_call.xml b/apps/CtsVerifier/res/layout/telecom_incoming_call.xml
index 9151292..bf3681d 100644
--- a/apps/CtsVerifier/res/layout/telecom_incoming_call.xml
+++ b/apps/CtsVerifier/res/layout/telecom_incoming_call.xml
@@ -15,128 +15,135 @@
~ limitations under the License
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical" android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <TextView
+<ScrollView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+ <LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/telecom_incoming_call_test_info"/>
+ android:layout_height="wrap_content">
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/js_padding"
- android:layout_marginBottom="@dimen/js_padding">
-
- <ImageView
- android:id="@+id/step_1_status"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/fs_indeterminate"
- android:layout_marginRight="@dimen/js_padding"
- android:layout_alignParentStart="true"
- android:layout_alignParentTop="true" />
<TextView
- android:id="@+id/step_1_instructions"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="@string/telecom_incoming_call_step_1"
- android:textSize="16dp"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
- android:layout_toRightOf="@id/step_1_status" />
- <Button
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/step_1_instructions"
- android:layout_marginLeft="20dip"
- android:layout_marginRight="20dip"
- android:layout_toRightOf="@id/step_1_status"
- android:id="@+id/telecom_incoming_call_register_enable_phone_account_button"
- android:text="@string/telecom_incoming_call_register_enable_phone_account_button"/>
- <Button
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/telecom_incoming_call_register_enable_phone_account_button"
- android:layout_marginLeft="20dip"
- android:layout_marginRight="20dip"
- android:id="@+id/telecom_incoming_call_confirm_register_button"
- android:text="@string/telecom_incoming_call_confirm_register_button"/>
- </RelativeLayout>
+ android:text="@string/telecom_incoming_call_test_info"/>
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/js_padding"
- android:layout_marginBottom="@dimen/js_padding">
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/js_padding"
+ android:layout_marginBottom="@dimen/js_padding">
- <ImageView
- android:id="@+id/step_2_status"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/fs_indeterminate"
- android:layout_marginRight="@dimen/js_padding"
- android:layout_alignParentStart="true"
- android:layout_alignParentTop="true" />
- <TextView
- android:id="@+id/step_2_instructions"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/telecom_incoming_call_step_2"
- android:textSize="16dp"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
- android:layout_toRightOf="@id/step_2_status" />
- <Button
- android:id="@+id/telecom_incoming_call_dial_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/step_2_instructions"
- android:layout_marginLeft="20dip"
- android:layout_marginRight="20dip"
- android:layout_toRightOf="@id/step_2_status"
- android:text="@string/telecom_incoming_call_dial_button"/>
- </RelativeLayout>
+ <ImageView
+ android:id="@+id/step_1_status"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/fs_indeterminate"
+ android:layout_marginRight="@dimen/js_padding"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentTop="true" />
+ <TextView
+ android:id="@+id/step_1_instructions"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/telecom_incoming_call_step_1"
+ android:textSize="16dp"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentTop="true"
+ android:layout_toRightOf="@id/step_1_status" />
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_below="@id/step_1_instructions"
+ android:layout_marginLeft="20dip"
+ android:layout_marginRight="20dip"
+ android:layout_toRightOf="@id/step_1_status"
+ android:id="@+id/telecom_incoming_call_register_enable_phone_account_button"
+ android:text="@string/telecom_incoming_call_register_enable_phone_account_button"/>
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_below="@id/telecom_incoming_call_register_enable_phone_account_button"
+ android:layout_marginLeft="20dip"
+ android:layout_marginRight="20dip"
+ android:id="@+id/telecom_incoming_call_confirm_register_button"
+ android:text="@string/telecom_incoming_call_confirm_register_button"/>
+ </RelativeLayout>
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/js_padding"
- android:layout_marginBottom="@dimen/js_padding">
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/js_padding"
+ android:layout_marginBottom="@dimen/js_padding">
- <ImageView
- android:id="@+id/step_3_status"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/fs_indeterminate"
- android:layout_marginRight="@dimen/js_padding"
- android:layout_alignParentStart="true"
- android:layout_alignParentTop="true" />
- <TextView
- android:id="@+id/step_3_instructions"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/telecom_incoming_call_step_3"
- android:textSize="16dp"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
- android:layout_toRightOf="@id/step_3_status" />
- <Button
- android:id="@+id/telecom_incoming_call_confirm_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/step_3_instructions"
- android:layout_marginLeft="20dip"
- android:layout_marginRight="20dip"
- android:layout_toRightOf="@id/step_3_status"
- android:text="@string/telecom_incoming_call_confirm_button"/>
- </RelativeLayout>
+ <ImageView
+ android:id="@+id/step_2_status"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/fs_indeterminate"
+ android:layout_marginRight="@dimen/js_padding"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentTop="true" />
+ <TextView
+ android:id="@+id/step_2_instructions"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/telecom_incoming_call_step_2"
+ android:textSize="16dp"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentTop="true"
+ android:layout_toRightOf="@id/step_2_status" />
+ <Button
+ android:id="@+id/telecom_incoming_call_dial_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_below="@id/step_2_instructions"
+ android:layout_marginLeft="20dip"
+ android:layout_marginRight="20dip"
+ android:layout_toRightOf="@id/step_2_status"
+ android:text="@string/telecom_incoming_call_dial_button"/>
+ </RelativeLayout>
- <include layout="@layout/pass_fail_buttons" />
-</LinearLayout>
\ No newline at end of file
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/js_padding"
+ android:layout_marginBottom="@dimen/js_padding">
+
+ <ImageView
+ android:id="@+id/step_3_status"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/fs_indeterminate"
+ android:layout_marginRight="@dimen/js_padding"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentTop="true" />
+ <TextView
+ android:id="@+id/step_3_instructions"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/telecom_incoming_call_step_3"
+ android:textSize="16dp"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentTop="true"
+ android:layout_toRightOf="@id/step_3_status" />
+ <Button
+ android:id="@+id/telecom_incoming_call_confirm_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_below="@id/step_3_instructions"
+ android:layout_marginLeft="20dip"
+ android:layout_marginRight="20dip"
+ android:layout_toRightOf="@id/step_3_status"
+ android:text="@string/telecom_incoming_call_confirm_button"/>
+ </RelativeLayout>
+
+ <include layout="@layout/pass_fail_buttons" />
+ </LinearLayout>
+</ScrollView>
\ No newline at end of file
diff --git a/apps/CtsVerifier/res/layout/telecom_outgoing_call.xml b/apps/CtsVerifier/res/layout/telecom_outgoing_call.xml
index c1d6cad..b69a21f 100644
--- a/apps/CtsVerifier/res/layout/telecom_outgoing_call.xml
+++ b/apps/CtsVerifier/res/layout/telecom_outgoing_call.xml
@@ -15,128 +15,135 @@
~ limitations under the License
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical" android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <TextView
+<ScrollView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+ <LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/telecom_outgoing_call_test_info"/>
+ android:layout_height="wrap_content">
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/js_padding"
- android:layout_marginBottom="@dimen/js_padding">
-
- <ImageView
- android:id="@+id/step_1_status"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/fs_indeterminate"
- android:layout_marginRight="@dimen/js_padding"
- android:layout_alignParentStart="true"
- android:layout_alignParentTop="true" />
<TextView
- android:id="@+id/step_1_instructions"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="@string/telecom_outgoing_call_step_1"
- android:textSize="16dp"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
- android:layout_toRightOf="@id/step_1_status" />
- <Button
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/step_1_instructions"
- android:layout_marginLeft="20dip"
- android:layout_marginRight="20dip"
- android:layout_toRightOf="@id/step_1_status"
- android:id="@+id/telecom_outgoing_call_register_enable_phone_account_button"
- android:text="@string/telecom_outgoing_call_register_enable_phone_account_button"/>
- <Button
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/telecom_outgoing_call_register_enable_phone_account_button"
- android:layout_marginLeft="20dip"
- android:layout_marginRight="20dip"
- android:id="@+id/telecom_outgoing_call_confirm_register_button"
- android:text="@string/telecom_outgoing_call_confirm_register_button"/>
- </RelativeLayout>
+ android:text="@string/telecom_outgoing_call_test_info"/>
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/js_padding"
- android:layout_marginBottom="@dimen/js_padding">
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/js_padding"
+ android:layout_marginBottom="@dimen/js_padding">
- <ImageView
- android:id="@+id/step_2_status"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/fs_indeterminate"
- android:layout_marginRight="@dimen/js_padding"
- android:layout_alignParentStart="true"
- android:layout_alignParentTop="true" />
- <TextView
- android:id="@+id/step_2_instructions"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/telecom_outgoing_call_step_2"
- android:textSize="16dp"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
- android:layout_toRightOf="@id/step_2_status" />
- <Button
- android:id="@+id/telecom_outgoing_call_dial_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/step_2_instructions"
- android:layout_marginLeft="20dip"
- android:layout_marginRight="20dip"
- android:layout_toRightOf="@id/step_2_status"
- android:text="@string/telecom_outgoing_call_dial_button"/>
- </RelativeLayout>
+ <ImageView
+ android:id="@+id/step_1_status"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/fs_indeterminate"
+ android:layout_marginRight="@dimen/js_padding"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentTop="true" />
+ <TextView
+ android:id="@+id/step_1_instructions"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/telecom_outgoing_call_step_1"
+ android:textSize="16dp"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentTop="true"
+ android:layout_toRightOf="@id/step_1_status" />
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_below="@id/step_1_instructions"
+ android:layout_marginLeft="20dip"
+ android:layout_marginRight="20dip"
+ android:layout_toRightOf="@id/step_1_status"
+ android:id="@+id/telecom_outgoing_call_register_enable_phone_account_button"
+ android:text="@string/telecom_outgoing_call_register_enable_phone_account_button"/>
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_below="@id/telecom_outgoing_call_register_enable_phone_account_button"
+ android:layout_marginLeft="20dip"
+ android:layout_marginRight="20dip"
+ android:id="@+id/telecom_outgoing_call_confirm_register_button"
+ android:text="@string/telecom_outgoing_call_confirm_register_button"/>
+ </RelativeLayout>
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/js_padding"
- android:layout_marginBottom="@dimen/js_padding">
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/js_padding"
+ android:layout_marginBottom="@dimen/js_padding">
- <ImageView
- android:id="@+id/step_3_status"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/fs_indeterminate"
- android:layout_marginRight="@dimen/js_padding"
- android:layout_alignParentStart="true"
- android:layout_alignParentTop="true" />
- <TextView
- android:id="@+id/step_3_instructions"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/telecom_outgoing_call_step_3"
- android:textSize="16dp"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
- android:layout_toRightOf="@id/step_3_status" />
- <Button
- android:id="@+id/telecom_outgoing_call_confirm_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/step_3_instructions"
- android:layout_marginLeft="20dip"
- android:layout_marginRight="20dip"
- android:layout_toRightOf="@id/step_3_status"
- android:text="@string/telecom_outgoing_call_confirm_button"/>
- </RelativeLayout>
+ <ImageView
+ android:id="@+id/step_2_status"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/fs_indeterminate"
+ android:layout_marginRight="@dimen/js_padding"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentTop="true" />
+ <TextView
+ android:id="@+id/step_2_instructions"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/telecom_outgoing_call_step_2"
+ android:textSize="16dp"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentTop="true"
+ android:layout_toRightOf="@id/step_2_status" />
+ <Button
+ android:id="@+id/telecom_outgoing_call_dial_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_below="@id/step_2_instructions"
+ android:layout_marginLeft="20dip"
+ android:layout_marginRight="20dip"
+ android:layout_toRightOf="@id/step_2_status"
+ android:text="@string/telecom_outgoing_call_dial_button"/>
+ </RelativeLayout>
- <include layout="@layout/pass_fail_buttons" />
-</LinearLayout>
\ No newline at end of file
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/js_padding"
+ android:layout_marginBottom="@dimen/js_padding">
+
+ <ImageView
+ android:id="@+id/step_3_status"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/fs_indeterminate"
+ android:layout_marginRight="@dimen/js_padding"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentTop="true" />
+ <TextView
+ android:id="@+id/step_3_instructions"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/telecom_outgoing_call_step_3"
+ android:textSize="16dp"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentTop="true"
+ android:layout_toRightOf="@id/step_3_status" />
+ <Button
+ android:id="@+id/telecom_outgoing_call_confirm_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_below="@id/step_3_instructions"
+ android:layout_marginLeft="20dip"
+ android:layout_marginRight="20dip"
+ android:layout_toRightOf="@id/step_3_status"
+ android:text="@string/telecom_outgoing_call_confirm_button"/>
+ </RelativeLayout>
+
+ <include layout="@layout/pass_fail_buttons" />
+ </LinearLayout>
+</ScrollView>
\ No newline at end of file
diff --git a/apps/CtsVerifier/res/layout/telecom_self_managed_answer.xml b/apps/CtsVerifier/res/layout/telecom_self_managed_answer.xml
index 27aa55a..0b0d9d9 100644
--- a/apps/CtsVerifier/res/layout/telecom_self_managed_answer.xml
+++ b/apps/CtsVerifier/res/layout/telecom_self_managed_answer.xml
@@ -15,119 +15,126 @@
~ limitations under the License
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical" android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <TextView
+<ScrollView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+ <LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/telecom_incoming_self_mgd_info"/>
+ android:layout_height="wrap_content">
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/js_padding"
- android:layout_marginBottom="@dimen/js_padding">
-
- <ImageView
- android:id="@+id/step_1_status"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/fs_indeterminate"
- android:layout_marginRight="@dimen/js_padding"
- android:layout_alignParentStart="true"
- android:layout_alignParentTop="true" />
<TextView
- android:id="@+id/step_1_instructions"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="@string/telecom_incoming_self_mgd_step_1"
- android:textSize="16dp"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
- android:layout_toRightOf="@id/step_1_status" />
- <Button
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/step_1_instructions"
- android:layout_marginLeft="20dip"
- android:layout_marginRight="20dip"
- android:layout_toRightOf="@id/step_1_status"
- android:id="@+id/telecom_incoming_self_mgd_register_button"
- android:text="@string/telecom_incoming_self_mgd_register_button"/>
- </RelativeLayout>
+ android:text="@string/telecom_incoming_self_mgd_info"/>
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/js_padding"
- android:layout_marginBottom="@dimen/js_padding">
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/js_padding"
+ android:layout_marginBottom="@dimen/js_padding">
- <ImageView
- android:id="@+id/step_2_status"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/fs_indeterminate"
- android:layout_marginRight="@dimen/js_padding"
- android:layout_alignParentStart="true"
- android:layout_alignParentTop="true" />
- <TextView
- android:id="@+id/step_2_instructions"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/telecom_incoming_self_mgd_step_2"
- android:textSize="16dp"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
- android:layout_toRightOf="@id/step_2_status" />
- <Button
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/step_2_instructions"
- android:layout_marginLeft="20dip"
- android:layout_marginRight="20dip"
- android:layout_toRightOf="@id/step_2_status"
- android:id="@+id/telecom_incoming_self_mgd_show_ui_button"
- android:text="@string/telecom_incoming_self_mgd_show_ui_button"/>
- </RelativeLayout>
+ <ImageView
+ android:id="@+id/step_1_status"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/fs_indeterminate"
+ android:layout_marginRight="@dimen/js_padding"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentTop="true" />
+ <TextView
+ android:id="@+id/step_1_instructions"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/telecom_incoming_self_mgd_step_1"
+ android:textSize="16dp"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentTop="true"
+ android:layout_toRightOf="@id/step_1_status" />
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_below="@id/step_1_instructions"
+ android:layout_marginLeft="20dip"
+ android:layout_marginRight="20dip"
+ android:layout_toRightOf="@id/step_1_status"
+ android:id="@+id/telecom_incoming_self_mgd_register_button"
+ android:text="@string/telecom_incoming_self_mgd_register_button"/>
+ </RelativeLayout>
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/js_padding"
- android:layout_marginBottom="@dimen/js_padding">
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/js_padding"
+ android:layout_marginBottom="@dimen/js_padding">
- <ImageView
- android:id="@+id/step_3_status"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/fs_indeterminate"
- android:layout_marginRight="@dimen/js_padding"
- android:layout_alignParentStart="true"
- android:layout_alignParentTop="true" />
- <TextView
- android:id="@+id/step_3_instructions"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/telecom_incoming_self_mgd_step_3"
- android:textSize="16dp"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
- android:layout_toRightOf="@id/step_3_status" />
- <Button
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/step_3_instructions"
- android:layout_marginLeft="20dip"
- android:layout_marginRight="20dip"
- android:layout_toRightOf="@id/step_3_status"
- android:id="@+id/telecom_incoming_self_mgd_confirm_answer_button"
- android:text="@string/telecom_incoming_self_mgd_confirm_answer_button"/>
- </RelativeLayout>
+ <ImageView
+ android:id="@+id/step_2_status"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/fs_indeterminate"
+ android:layout_marginRight="@dimen/js_padding"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentTop="true" />
+ <TextView
+ android:id="@+id/step_2_instructions"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/telecom_incoming_self_mgd_step_2"
+ android:textSize="16dp"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentTop="true"
+ android:layout_toRightOf="@id/step_2_status" />
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_below="@id/step_2_instructions"
+ android:layout_marginLeft="20dip"
+ android:layout_marginRight="20dip"
+ android:layout_toRightOf="@id/step_2_status"
+ android:id="@+id/telecom_incoming_self_mgd_show_ui_button"
+ android:text="@string/telecom_incoming_self_mgd_show_ui_button"/>
+ </RelativeLayout>
- <include layout="@layout/pass_fail_buttons" />
-</LinearLayout>
\ No newline at end of file
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/js_padding"
+ android:layout_marginBottom="@dimen/js_padding">
+
+ <ImageView
+ android:id="@+id/step_3_status"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/fs_indeterminate"
+ android:layout_marginRight="@dimen/js_padding"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentTop="true" />
+ <TextView
+ android:id="@+id/step_3_instructions"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/telecom_incoming_self_mgd_step_3"
+ android:textSize="16dp"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentTop="true"
+ android:layout_toRightOf="@id/step_3_status" />
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_below="@id/step_3_instructions"
+ android:layout_marginLeft="20dip"
+ android:layout_marginRight="20dip"
+ android:layout_toRightOf="@id/step_3_status"
+ android:id="@+id/telecom_incoming_self_mgd_confirm_answer_button"
+ android:text="@string/telecom_incoming_self_mgd_confirm_answer_button"/>
+ </RelativeLayout>
+
+ <include layout="@layout/pass_fail_buttons" />
+ </LinearLayout>
+</ScrollView>
\ No newline at end of file
diff --git a/apps/CtsVerifier/res/values/strings.xml b/apps/CtsVerifier/res/values/strings.xml
index 45e1ff3..405a2fc 100755
--- a/apps/CtsVerifier/res/values/strings.xml
+++ b/apps/CtsVerifier/res/values/strings.xml
@@ -479,6 +479,7 @@
including showing the dialog to the user to verify a device, as well as updating an internal
record once the user made the choice and then removing it.\n\n
Before proceeding, make sure you have a bluetooth device nearby and discoverable.
+ Also, make sure that bluetooth is turned on on this device.
Once you press the button, wait for a dialog to pop up and select your device from the list.
</string>
@@ -1227,28 +1228,33 @@
<string name="p2p_service_discovery_requester">Service Discovery Requester</string>
<string name="p2p_go_neg_responder_info">
- Go to the Wi-Fi settings and forget all remembered networks. Then
- start the \"GO Negotiation Requester Test\" on the other device and follow
+ Go to the Security and Location settings and ensure that Location is enabled. Then go to the
+ Wi-Fi settings and forget all remembered networks. Then start the \"GO Negotiation
+ Requester Test\" on the other device and follow
the instructions.</string>
<string name="p2p_accept_client_info">
- Go to the Wi-Fi settings and forget all remembered networks. Then
- start the \"Group Client Test\" on the other device and follow
+ Go to the Security and Location settings and ensure that Location is enabled. Then go to the
+ Wi-Fi settings and forget all remembered networks. Then start the \"Group Client Test\" on
+ the other device and follow
the instructions.</string>
<string name="p2p_service_discovery_responder_info">
Start the \"Service Discovery Requester Test\" on the other device and follow
the instructions.</string>
<string name="p2p_go_neg_requester_info">
- Go to the Wi-Fi settings and forget all remembered networks. Then
- start the \"GO Negotiation Responder Test\" on the other device.
+ Go to the Security and Location settings and ensure that Location is enabled. Then go to the
+ Wi-Fi settings and forget all remembered networks. Then start the \"GO Negotiation
+ Responder Test\" on the other device.
Then run each test individually by clicking on its name.</string>
<string name="p2p_join_go_info">
- Go to the Wi-Fi settings and forget all remembered networks. Then
- start the \"Group Owner Test\" on the other device.
+ Go to the Security and Location settings and ensure that Location is enabled. Then go to the
+ Wi-Fi settings and forget all remembered networks. Then start the \"Group Owner Test\" on
+ the other device.
Then run each test individually by clicking on its name.</string>
<string name="p2p_service_discovery_requester_info">
- Go to the Wi-Fi settings and forget all remembered networks. Then
- start the \"Service Discovery Responder Test\" on the other device.
+ Go to the Security and Location settings and ensure that Location is enabled. Then go to the
+ Wi-Fi settings and forget all remembered networks. Then start the \"Service Discovery
+ Responder Test\" on the other device.
Then run each test individually by clicking on its name.</string>
<string name="p2p_not_enabled">Wi-Fi is not enabled</string>
@@ -1260,20 +1266,23 @@
<string name="p2p_go_neg_responder_ready">
The go negotiation responder is now ready to start.
- Go to the Wi-Fi settings and forget all remembered networks. Then
- start the \"GO Negotiation Requester Test\" on the other device.
+ Go to the Security and Location settings and ensure that Location is enabled. Then go to the
+ Wi-Fi settings and forget all remembered networks. Then start the \"GO Negotiation
+ Requester Test\" on the other device.
Keep the screen here until all tests on the other device are
finished.</string>
<string name="p2p_go_ready">
The group owner is now ready to start.
- Go to the Wi-Fi settings and forget all remembered networks. Then
- start the \"Join Group Test\" on the other device.
+ Go to the Security and Location settings and ensure that Location is enabled. Then go to the
+ Wi-Fi settings and forget all remembered networks. Then start the \"Join Group Test\" on
+ the other device.
Keep the screen here until all tests on the other device are
finished.</string>
<string name="p2p_service_responder_ready">
The service responder is now ready to start.
- Go to the Wi-Fi settings and forget all remembered networks. Then
- start the \"Service Discovery Requester Test\" on the other device.
+ Go to the Security and Location settings and ensure that Location is enabled. Then go to the
+ Wi-Fi settings and forget all remembered networks. Then start the \"Service Discovery
+ Requester Test\" on the other device.
Keep the screen here until all tests on the other device are
finished.</string>
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/security/FingerprintBoundKeysTest.java b/apps/CtsVerifier/src/com/android/cts/verifier/security/FingerprintBoundKeysTest.java
index eb0fc59..764ecb3 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/security/FingerprintBoundKeysTest.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/security/FingerprintBoundKeysTest.java
@@ -219,6 +219,7 @@
private void showAuthenticationScreen() {
mFingerprintDialog = new FingerprintAuthDialogFragment();
+ mFingerprintDialog.setActivity(this);
mFingerprintDialog.show(getFragmentManager(), "fingerprint_dialog");
}
@@ -227,9 +228,11 @@
.show();
}
- public class FingerprintAuthDialogFragment extends DialogFragment {
+ public static class FingerprintAuthDialogFragment extends DialogFragment {
+ private FingerprintBoundKeysTest mActivity;
private CancellationSignal mCancellationSignal;
+ private FingerprintManager mFingerprintManager;
private FingerprintManagerCallback mFingerprintManagerCallback;
private boolean mSelfCancelled;
@@ -262,9 +265,9 @@
if (DEBUG) {
Log.i(TAG,"onAuthenticationSucceeded");
}
- if (tryEncrypt()) {
+ if (mActivity.tryEncrypt()) {
showToast("Test passed.");
- getPassButton().setEnabled(true);
+ mActivity.getPassButton().setEnabled(true);
FingerprintAuthDialogFragment.this.dismiss();
} else {
showToast("Test failed. Key not accessible after auth");
@@ -278,12 +281,24 @@
mSelfCancelled = true;
}
+ private void setActivity(FingerprintBoundKeysTest activity) {
+ mActivity = activity;
+ }
+
+ private void showToast(String message) {
+ Toast.makeText(getContext(), message, Toast.LENGTH_LONG)
+ .show();
+ }
+
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
mCancellationSignal = new CancellationSignal();
mSelfCancelled = false;
+ mFingerprintManager =
+ (FingerprintManager) getContext().getSystemService(Context.FINGERPRINT_SERVICE);
mFingerprintManagerCallback = new FingerprintManagerCallback();
- mFingerprintManager.authenticate(new FingerprintManager.CryptoObject(mCipher),
+ mFingerprintManager.authenticate(
+ new FingerprintManager.CryptoObject(mActivity.mCipher),
mCancellationSignal, 0, mFingerprintManagerCallback, null);
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setMessage(R.string.sec_fp_dialog_message);
diff --git a/common/device-side/util/src/com/android/compatibility/common/util/MediaPerfUtils.java b/common/device-side/util/src/com/android/compatibility/common/util/MediaPerfUtils.java
index 469e99a..23d7e96 100644
--- a/common/device-side/util/src/com/android/compatibility/common/util/MediaPerfUtils.java
+++ b/common/device-side/util/src/com/android/compatibility/common/util/MediaPerfUtils.java
@@ -31,10 +31,10 @@
private static final int MOVING_AVERAGE_NUM_FRAMES = 10;
private static final int MOVING_AVERAGE_WINDOW_MS = 1000;
- // allow a variance of 2x for measured frame rates (e.g. half of lower-limit to double of
- // upper-limit of the published values). Also allow an extra 10% margin. This also acts as
+ // allow a variance of 2.5x for measured frame rates (e.g. 40% of lower-limit to 2.5x of
+ // upper-limit of the published values). Also allow an extra 20% margin. This also acts as
// a limit for the size of the published rates (e.g. upper-limit / lower-limit <= tolerance).
- private static final double FRAMERATE_TOLERANCE = 2.0 * 1.1;
+ private static final double FRAMERATE_TOLERANCE = 2.5 * 1.2;
/*
* ------------------ HELPER METHODS FOR ACHIEVABLE FRAME RATES ------------------
diff --git a/hostsidetests/media/src/android/media/cts/BaseMultiUserTest.java b/hostsidetests/media/src/android/media/cts/BaseMultiUserTest.java
index ef8ba5b..7e52737 100644
--- a/hostsidetests/media/src/android/media/cts/BaseMultiUserTest.java
+++ b/hostsidetests/media/src/android/media/cts/BaseMultiUserTest.java
@@ -17,6 +17,7 @@
package android.media.cts;
import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper;
+import com.android.ddmlib.Log.LogLevel;
import com.android.ddmlib.testrunner.RemoteAndroidTestRunner;
import com.android.ddmlib.testrunner.TestIdentifier;
import com.android.ddmlib.testrunner.TestResult;
@@ -31,6 +32,7 @@
import java.io.FileNotFoundException;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -82,47 +84,65 @@
private Set<String> mExistingPackages;
private List<Integer> mExistingUsers;
+ private HashSet<String> mAvailableFeatures;
+ protected boolean mHasManagedUsersFeature;
@Override
protected void setUp() throws Exception {
+ super.setUp();
// Ensure that build has been set before test is run.
assertNotNull(mCtsBuild);
- mExistingPackages = getDevice().getInstalledPackageNames();
+ mHasManagedUsersFeature = hasDeviceFeature("android.software.managed_users");
- // Disable the package verifier to avoid the dialog when installing an app
- mPackageVerifier = getSettings(SETTINGS_PACKAGE_VERIFIER_NAMESPACE,
- SETTINGS_PACKAGE_VERIFIER_NAME, USER_ALL);
- putSettings(SETTINGS_PACKAGE_VERIFIER_NAMESPACE,
- SETTINGS_PACKAGE_VERIFIER_NAME, "0", USER_ALL);
+ if (mHasManagedUsersFeature) {
+ mExistingPackages = getDevice().getInstalledPackageNames();
- mExistingUsers = new ArrayList();
- int primaryUserId = getDevice().getPrimaryUserId();
- mExistingUsers.add(primaryUserId);
- mExistingUsers.add(USER_SYSTEM);
+ // Disable the package verifier to avoid the dialog when installing an app
+ mPackageVerifier =
+ getSettings(
+ SETTINGS_PACKAGE_VERIFIER_NAMESPACE,
+ SETTINGS_PACKAGE_VERIFIER_NAME,
+ USER_ALL);
+ putSettings(
+ SETTINGS_PACKAGE_VERIFIER_NAMESPACE,
+ SETTINGS_PACKAGE_VERIFIER_NAME,
+ "0",
+ USER_ALL);
- executeShellCommand("am switch-user " + primaryUserId);
- executeShellCommand("wm dismiss-keyguard");
+ mExistingUsers = new ArrayList();
+ int primaryUserId = getDevice().getPrimaryUserId();
+ mExistingUsers.add(primaryUserId);
+ mExistingUsers.add(USER_SYSTEM);
+
+ executeShellCommand("am switch-user " + primaryUserId);
+ executeShellCommand("wm dismiss-keyguard");
+ }
}
@Override
protected void tearDown() throws Exception {
- // Reset the package verifier setting to its original value.
- putSettings(SETTINGS_PACKAGE_VERIFIER_NAMESPACE, SETTINGS_PACKAGE_VERIFIER_NAME,
- mPackageVerifier, USER_ALL);
+ if (mHasManagedUsersFeature) {
+ // Reset the package verifier setting to its original value.
+ putSettings(
+ SETTINGS_PACKAGE_VERIFIER_NAMESPACE,
+ SETTINGS_PACKAGE_VERIFIER_NAME,
+ mPackageVerifier,
+ USER_ALL);
- // Remove users created during the test.
- for (int userId : getDevice().listUsers()) {
- if (!mExistingUsers.contains(userId)) {
- removeUser(userId);
+ // Remove users created during the test.
+ for (int userId : getDevice().listUsers()) {
+ if (!mExistingUsers.contains(userId)) {
+ removeUser(userId);
+ }
}
- }
- // Remove packages installed during the test.
- for (String packageName : getDevice().getUninstallablePackageNames()) {
- if (mExistingPackages.contains(packageName)) {
- continue;
+ // Remove packages installed during the test.
+ for (String packageName : getDevice().getUninstallablePackageNames()) {
+ if (mExistingPackages.contains(packageName)) {
+ continue;
+ }
+ CLog.d("Removing leftover package: " + packageName);
+ getDevice().uninstallPackage(packageName);
}
- CLog.d("Removing leftover package: " + packageName);
- getDevice().uninstallPackage(packageName);
}
super.tearDown();
}
@@ -327,4 +347,34 @@
+ " " + value);
}
}
+
+ protected boolean hasDeviceFeature(String requiredFeature) throws DeviceNotAvailableException {
+ if (mAvailableFeatures == null) {
+ // TODO: Move this logic to ITestDevice.
+ String command = "pm list features";
+ String commandOutput = getDevice().executeShellCommand(command);
+ CLog.i("Output for command " + command + ": " + commandOutput);
+
+ // Extract the id of the new user.
+ mAvailableFeatures = new HashSet<>();
+ for (String feature : commandOutput.split("\\s+")) {
+ // Each line in the output of the command has the format "feature:{FEATURE_VALUE}".
+ String[] tokens = feature.split(":");
+ assertTrue(
+ "\"" + feature + "\" expected to have format feature:{FEATURE_VALUE}",
+ tokens.length > 1);
+ assertEquals(feature, "feature", tokens[0]);
+ mAvailableFeatures.add(tokens[1]);
+ }
+ }
+ boolean result = mAvailableFeatures.contains(requiredFeature);
+ if (!result) {
+ CLog.logAndDisplay(
+ LogLevel.INFO,
+ "Device doesn't have required feature "
+ + requiredFeature
+ + ". Test won't run.");
+ }
+ return result;
+ }
}
diff --git a/hostsidetests/media/src/android/media/session/cts/MediaSessionManagerHostTest.java b/hostsidetests/media/src/android/media/session/cts/MediaSessionManagerHostTest.java
index d665f5f..1067a85 100644
--- a/hostsidetests/media/src/android/media/session/cts/MediaSessionManagerHostTest.java
+++ b/hostsidetests/media/src/android/media/session/cts/MediaSessionManagerHostTest.java
@@ -70,6 +70,10 @@
@Override
public void tearDown() throws Exception {
+ if (!mHasManagedUsersFeature) {
+ return;
+ }
+
// Cleanup
for (int userId : mNotificationListeners.keySet()) {
String notificationListener = mNotificationListeners.get(userId);
@@ -84,6 +88,10 @@
*/
@RequiresDevice
public void testGetActiveSessions() throws Exception {
+ if (!mHasManagedUsersFeature) {
+ return;
+ }
+
// Ensure that the previously running media session test helper app doesn't exist.
getDevice().uninstallPackage(MEDIA_SESSION_TEST_HELPER_PKG);
@@ -126,6 +134,7 @@
installAppAsUser(DEVICE_SIDE_TEST_APK, newUser);
allowGetActiveSessionForTest(newUser);
runTestAsUser("testGetActiveSessions_noMediaSession", newUser);
+ removeUser(newUser);
}
private void runTest(String testMethodName) throws DeviceNotAvailableException {
diff --git a/hostsidetests/services/activityandwindowmanager/activitymanager/src/android/server/cts/ActivityManagerDisplayTests.java b/hostsidetests/services/activityandwindowmanager/activitymanager/src/android/server/cts/ActivityManagerDisplayTests.java
index 57347ff..ad45a9c 100644
--- a/hostsidetests/services/activityandwindowmanager/activitymanager/src/android/server/cts/ActivityManagerDisplayTests.java
+++ b/hostsidetests/services/activityandwindowmanager/activitymanager/src/android/server/cts/ActivityManagerDisplayTests.java
@@ -527,6 +527,52 @@
}
/**
+ * Tests launching a not embedded activity on virtual display. It should land on the
+ * default display.
+ */
+ public void testLaunchNotEmbeddedOnVirtualDisplay() throws Exception {
+ if (!supportsMultiDisplay()) { return; }
+
+ // Create new virtual display.
+ final DisplayState newDisplay = new VirtualDisplayBuilder(this).build();
+
+ final String logSeparator = clearLogcat();
+
+ // Launch other activity with different uid and check it is launched on primary display.
+ final String broadcastAction = SECOND_PACKAGE_NAME + ".LAUNCH_BROADCAST_ACTION";
+ final String includeStoppedPackagesFlag = " -f 0x00000020";
+ executeShellCommand("am broadcast -a " + broadcastAction + " -p " + SECOND_PACKAGE_NAME
+ + " --ei target_display " + newDisplay.mDisplayId + includeStoppedPackagesFlag
+ + " --es package_name " + componentName
+ + " --es target_activity " + TEST_ACTIVITY_NAME);
+
+ int tries = 0;
+ boolean match = false;
+ final Pattern pattern = Pattern.compile(".*SecurityException launching activity.*");
+ while (tries < 5 && !match) {
+ String[] logs = getDeviceLogsForComponent("LaunchBroadcastReceiver", logSeparator);
+ for (String line : logs) {
+ Matcher m = pattern.matcher(line);
+ if (m.matches()) {
+ match = true;
+ break;
+ }
+ }
+ tries++;
+ try {
+ Thread.sleep(500);
+ } catch (InterruptedException e) {
+ }
+ }
+
+ assertTrue("Expected exception not found", match);
+
+ mAmWmState.computeState(mDevice, new String[] {TEST_ACTIVITY_NAME});
+ assertFalse("Restricted activity must not be launched",
+ mAmWmState.getAmState().containsActivity(TEST_ACTIVITY_NAME));
+ }
+
+ /**
* Tests launching an activity on virtual display and then launching another activity via shell
* command and without specifying the display id - the second activity must appear on the
* primary display.
@@ -592,32 +638,6 @@
}
/**
- * Tests launching an activity to secondary display from activity on primary display.
- */
- public void testLaunchActivityFromAppToSecondaryDisplay() throws Exception {
- if (!supportsMultiDisplay()) { return; }
-
- // Start launching activity.
- launchActivity(LAUNCHING_ACTIVITY);
- // Create new virtual display.
- final DisplayState newDisplay = new VirtualDisplayBuilder(this).build();
-
- // Launch activity on secondary display from the app on primary display.
- getLaunchActivityBuilder().setTargetActivityName(TEST_ACTIVITY_NAME)
- .setDisplayId(newDisplay.mDisplayId).execute();
-
- // Check that activity is launched on external display.
- mAmWmState.computeState(mDevice, new String[] {TEST_ACTIVITY_NAME});
- mAmWmState.assertFocusedActivity("Activity launched on secondary display must be focused",
- TEST_ACTIVITY_NAME);
- final int frontStackId = mAmWmState.getAmState().getFrontStackId(newDisplay.mDisplayId);
- final ActivityManagerState.ActivityStack frontStack
- = mAmWmState.getAmState().getStackById(frontStackId);
- assertEquals("Launched activity must be resumed in front stack",
- getActivityComponentName(TEST_ACTIVITY_NAME), frontStack.mResumedActivity);
- }
-
- /**
* Tests launching activities on secondary and then on primary display to see if the stack
* visibility is not affected.
*/
@@ -874,53 +894,6 @@
externalFocusedStackId, mAmWmState.getAmState().getFocusedStackId());
}
- /** Test that launching from app that is on external display is allowed. */
- public void testPermissionLaunchFromAppOnSecondary() throws Exception {
- if (!supportsMultiDisplay()) { return; }
-
- // Create new virtual display.
- final DisplayState newDisplay = new VirtualDisplayBuilder(this).build();
- mAmWmState.assertVisibility(VIRTUAL_DISPLAY_ACTIVITY, true /* visible */);
- mAmWmState.assertFocusedActivity("Virtual display activity must be focused",
- VIRTUAL_DISPLAY_ACTIVITY);
- final int defaultDisplayFocusedStackId = mAmWmState.getAmState().getFocusedStackId();
- ActivityManagerState.ActivityStack focusedStack
- = mAmWmState.getAmState().getStackById(defaultDisplayFocusedStackId);
- assertEquals("Focus must remain on primary display", DEFAULT_DISPLAY_ID,
- focusedStack.mDisplayId);
-
- // Launch activity with different uid on secondary display.
- final String startCmd = "am start -n " + SECOND_PACKAGE_NAME + "/." + SECOND_ACTIVITY_NAME;
- final String displayTarget = " --display " + newDisplay.mDisplayId;
- executeShellCommand(startCmd + displayTarget);
-
- mAmWmState.waitForValidState(mDevice, new String[] {SECOND_ACTIVITY_NAME},
- null /* stackIds */, false /* compareTaskAndStackBounds */, SECOND_PACKAGE_NAME);
- mAmWmState.assertFocusedActivity("Focus must be on newly launched app",
- SECOND_PACKAGE_NAME, SECOND_ACTIVITY_NAME);
- final int externalFocusedStackId = mAmWmState.getAmState().getFocusedStackId();
- focusedStack = mAmWmState.getAmState().getStackById(externalFocusedStackId);
- assertEquals("Focused stack must be on secondary display", newDisplay.mDisplayId,
- focusedStack.mDisplayId);
-
- // Launch another activity with third different uid from app on secondary display and check
- // it is launched on secondary display.
- final String broadcastAction = SECOND_PACKAGE_NAME + ".LAUNCH_BROADCAST_ACTION";
- final String targetActivity = " --es target_activity " + THIRD_ACTIVITY_NAME
- + " --es package_name " + THIRD_PACKAGE_NAME
- + " --ei target_display " + newDisplay.mDisplayId;
- final String includeStoppedPackagesFlag = " -f 0x00000020";
- executeShellCommand("am broadcast -a " + broadcastAction + " -p " + SECOND_PACKAGE_NAME
- + targetActivity + includeStoppedPackagesFlag);
-
- mAmWmState.waitForValidState(mDevice, new String[] {THIRD_ACTIVITY_NAME},
- null /* stackIds */, false /* compareTaskAndStackBounds */, THIRD_PACKAGE_NAME);
- mAmWmState.assertFocusedActivity("Focus must be on newly launched app",
- THIRD_PACKAGE_NAME, THIRD_ACTIVITY_NAME);
- assertEquals("Activity launched by app on secondary display must be on that display",
- externalFocusedStackId, mAmWmState.getAmState().getFocusedStackId());
- }
-
/** Tests that an activity can launch an activity from a different UID into its own task. */
public void testPermissionLaunchMultiUidTask() throws Exception {
if (!supportsMultiDisplay()) { return; }
@@ -952,50 +925,6 @@
}
/**
- * Test that launching from display owner is allowed even when the the display owner
- * doesn't have anything on the display.
- */
- public void testPermissionLaunchFromOwner() throws Exception {
- if (!supportsMultiDisplay()) { return; }
-
- // Create new virtual display.
- final DisplayState newDisplay = new VirtualDisplayBuilder(this).build();
- mAmWmState.assertVisibility(VIRTUAL_DISPLAY_ACTIVITY, true /* visible */);
- mAmWmState.assertFocusedActivity("Virtual display activity must be focused",
- VIRTUAL_DISPLAY_ACTIVITY);
- final int defaultDisplayFocusedStackId = mAmWmState.getAmState().getFocusedStackId();
- ActivityManagerState.ActivityStack focusedStack
- = mAmWmState.getAmState().getStackById(defaultDisplayFocusedStackId);
- assertEquals("Focus must remain on primary display", DEFAULT_DISPLAY_ID,
- focusedStack.mDisplayId);
-
- // Launch other activity with different uid on secondary display.
- final String startCmd = "am start -n " + SECOND_PACKAGE_NAME + "/." + SECOND_ACTIVITY_NAME;
- final String displayTarget = " --display " + newDisplay.mDisplayId;
- executeShellCommand(startCmd + displayTarget);
-
- mAmWmState.waitForValidState(mDevice, new String[] {SECOND_ACTIVITY_NAME},
- null /* stackIds */, false /* compareTaskAndStackBounds */, SECOND_PACKAGE_NAME);
- mAmWmState.assertFocusedActivity("Focus must be on newly launched app",
- SECOND_PACKAGE_NAME, SECOND_ACTIVITY_NAME);
- final int externalFocusedStackId = mAmWmState.getAmState().getFocusedStackId();
- focusedStack = mAmWmState.getAmState().getStackById(externalFocusedStackId);
- assertEquals("Focused stack must be on secondary display", newDisplay.mDisplayId,
- focusedStack.mDisplayId);
-
- // Check that owner uid can launch its own activity on secondary display.
- final String broadcastAction = componentName + ".LAUNCH_BROADCAST_ACTION";
- executeShellCommand("am broadcast -a " + broadcastAction + " -p " + componentName
- + " --ez launch_activity true --ez new_task true --ez multiple_task true"
- + " --ei display_id " + newDisplay.mDisplayId);
-
- mAmWmState.waitForValidState(mDevice, TEST_ACTIVITY_NAME);
- mAmWmState.assertFocusedActivity("Focus must be on newly launched app", TEST_ACTIVITY_NAME);
- assertEquals("Activity launched by owner must be on external display",
- externalFocusedStackId, mAmWmState.getAmState().getFocusedStackId());
- }
-
- /**
* Test that launching from app that is not present on external display and doesn't own it to
* that external display is not allowed.
*/
@@ -1419,28 +1348,6 @@
// All overrides will be cleared in tearDown.
}
- /**
- * Tests than an immediate launch after new display creation is handled correctly.
- */
- public void testImmediateLaunchOnNewDisplay() throws Exception {
- if (!supportsMultiDisplay()) { return; }
-
- // Create new virtual display and immediately launch an activity on it.
- final DisplayState newDisplay = new VirtualDisplayBuilder(this)
- .setLaunchActivity(TEST_ACTIVITY_NAME).build();
-
- // Check that activity is launched and placed correctly.
- mAmWmState.waitForActivityState(mDevice, TEST_ACTIVITY_NAME, STATE_RESUMED);
- mAmWmState.assertResumedActivity("Test activity must be launched on a new display",
- TEST_ACTIVITY_NAME);
- final int frontStackId = mAmWmState.getAmState().getFrontStackId(newDisplay.mDisplayId);
- final ActivityManagerState.ActivityStack firstFrontStack =
- mAmWmState.getAmState().getStackById(frontStackId);
- assertEquals("Activity launched on secondary display must be resumed",
- getActivityComponentName(TEST_ACTIVITY_NAME), firstFrontStack.mResumedActivity);
- mAmWmState.assertFocusedStack("Focus must be on secondary display", frontStackId);
- }
-
/** Get physical and override display metrics from WM. */
private ReportedDisplayMetrics getDisplayMetrics() throws Exception {
mDumpLines.clear();
diff --git a/tests/tests/media/src/android/media/cts/DecoderTest.java b/tests/tests/media/src/android/media/cts/DecoderTest.java
index 08d8d74..34e8a82 100755
--- a/tests/tests/media/src/android/media/cts/DecoderTest.java
+++ b/tests/tests/media/src/android/media/cts/DecoderTest.java
@@ -1856,7 +1856,7 @@
if (checkTv()) {
assertTrue(MediaUtils.canDecodeVideo(
MediaFormat.MIMETYPE_VIDEO_HEVC, 1920, 1080, 30,
- HEVCProfileMain, HEVCMainTierLevel41, 10000000));
+ HEVCProfileMain, HEVCMainTierLevel41, 5000000));
}
}
diff --git a/tests/tests/widget/src/android/widget/cts/ListViewTest.java b/tests/tests/widget/src/android/widget/cts/ListViewTest.java
index 8cd85b1..d97c66e 100644
--- a/tests/tests/widget/src/android/widget/cts/ListViewTest.java
+++ b/tests/tests/widget/src/android/widget/cts/ListViewTest.java
@@ -931,10 +931,6 @@
assertNotNull(childView1);
assertNotNull(childView2);
- // Make sure that the childView1 has focus.
- mActivityRule.runOnUiThread(childView1::requestFocus);
- PollingCheck.waitFor(1000, childView1::isFocused);
-
// Make sure that ListView#requestLayout() is optimized when nothing is changed.
WidgetTestUtils.runOnMainAndDrawSync(mActivityRule, mListView, mListView::requestLayout);
assertEquals(childView0, mListView.getChildAt(0));