Fixing layout of audio test suite for round screens.

Problem:
- Content is chopped on round screen.
- Some content is not scrollable on round screens.

Solution:
- Box the content into a square.

Change-Id: Iab435882350e954aa01c8ae5e3d26ee903c8c3a4
(cherry picked from commit 864ba0cc54f4538bda8aeeb6ad248726846bb285)
diff --git a/apps/CtsVerifier/AndroidManifest.xml b/apps/CtsVerifier/AndroidManifest.xml
index 25a95db..85ea9f6 100644
--- a/apps/CtsVerifier/AndroidManifest.xml
+++ b/apps/CtsVerifier/AndroidManifest.xml
@@ -69,7 +69,8 @@
             android:icon="@drawable/icon"
             android:backupAgent="VerifierBackupAgent"
             android:debuggable="true"
-            android:largeHeap="true">
+            android:largeHeap="true"
+            android:theme="@android:style/Theme.DeviceDefault">
 
         <meta-data android:name="com.google.android.backup.api_key"
                 android:value="AEdPqrEAAAAIbK6ldcOzoeRtQ1u1dFVJ1A7KetRhit-a1Xa82Q" />
diff --git a/apps/CtsVerifier/res/layout/audio_dev_notify.xml b/apps/CtsVerifier/res/layout/audio_dev_notify.xml
index ceedf1c..aa6d3c4 100644
--- a/apps/CtsVerifier/res/layout/audio_dev_notify.xml
+++ b/apps/CtsVerifier/res/layout/audio_dev_notify.xml
@@ -18,12 +18,11 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:id="@+id/scrollView"
-    >
+        style="@style/RootLayoutPadding">
 
-<LinearLayout
+        <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:padding="20dp"
         android:orientation="vertical">
 
         <TextView
diff --git a/apps/CtsVerifier/res/layout/audio_frequency_line_activity.xml b/apps/CtsVerifier/res/layout/audio_frequency_line_activity.xml
index 6a755d5..41292d1 100644
--- a/apps/CtsVerifier/res/layout/audio_frequency_line_activity.xml
+++ b/apps/CtsVerifier/res/layout/audio_frequency_line_activity.xml
@@ -17,9 +17,8 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:padding="10dip"
     android:orientation="vertical"
->
+    style="@style/RootLayoutPadding">
     <ScrollView
         android:layout_width="match_parent"
         android:layout_height="match_parent"
@@ -131,4 +130,4 @@
         </LinearLayout>
     </ScrollView>
 
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
diff --git a/apps/CtsVerifier/res/layout/audio_frequency_mic_activity.xml b/apps/CtsVerifier/res/layout/audio_frequency_mic_activity.xml
index 8722f1d..bdf9e7c 100644
--- a/apps/CtsVerifier/res/layout/audio_frequency_mic_activity.xml
+++ b/apps/CtsVerifier/res/layout/audio_frequency_mic_activity.xml
@@ -17,9 +17,8 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:padding="10dip"
     android:orientation="vertical"
->
+    style="@style/RootLayoutPadding">
 
     <ScrollView
         android:layout_width="match_parent"
@@ -192,4 +191,4 @@
         </LinearLayout>
     </ScrollView>
 
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
diff --git a/apps/CtsVerifier/res/layout/audio_frequency_speaker_activity.xml b/apps/CtsVerifier/res/layout/audio_frequency_speaker_activity.xml
index 926a4c7..435f5a7 100644
--- a/apps/CtsVerifier/res/layout/audio_frequency_speaker_activity.xml
+++ b/apps/CtsVerifier/res/layout/audio_frequency_speaker_activity.xml
@@ -17,8 +17,8 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:padding="10dip"
-    android:orientation="vertical">
+    android:orientation="vertical"
+    style="@style/RootLayoutPadding">
 
     <ScrollView
        android:layout_width="match_parent"
@@ -97,4 +97,4 @@
         </LinearLayout>
       </ScrollView>
 
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
diff --git a/apps/CtsVerifier/res/layout/audio_frequency_unprocessed_activity.xml b/apps/CtsVerifier/res/layout/audio_frequency_unprocessed_activity.xml
index abc8033..2e43b5f 100644
--- a/apps/CtsVerifier/res/layout/audio_frequency_unprocessed_activity.xml
+++ b/apps/CtsVerifier/res/layout/audio_frequency_unprocessed_activity.xml
@@ -17,9 +17,8 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:padding="10dip"
     android:orientation="vertical"
->
+    style="@style/RootLayoutPadding">
 
     <ScrollView
         android:layout_width="match_parent"
@@ -77,4 +76,4 @@
         </LinearLayout>
     </ScrollView>
 
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
diff --git a/apps/CtsVerifier/res/layout/audio_input_routingnotifications_test.xml b/apps/CtsVerifier/res/layout/audio_input_routingnotifications_test.xml
index 60a12ef..e09475c 100644
--- a/apps/CtsVerifier/res/layout/audio_input_routingnotifications_test.xml
+++ b/apps/CtsVerifier/res/layout/audio_input_routingnotifications_test.xml
@@ -18,12 +18,11 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:id="@+id/scrollView"
-    >
+        style="@style/RootLayoutPadding">
 
 <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:padding = "20dp"
         android:orientation="vertical">
 
         <TextView
diff --git a/apps/CtsVerifier/res/layout/audio_loopback_activity.xml b/apps/CtsVerifier/res/layout/audio_loopback_activity.xml
index 350f428..89d2e19 100644
--- a/apps/CtsVerifier/res/layout/audio_loopback_activity.xml
+++ b/apps/CtsVerifier/res/layout/audio_loopback_activity.xml
@@ -17,9 +17,8 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:padding="10dip"
     android:orientation="vertical"
->
+    style="@style/RootLayoutPadding">
 
     <ScrollView
         android:layout_width="match_parent"
@@ -151,4 +150,4 @@
         </LinearLayout>
     </ScrollView>
 
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
diff --git a/apps/CtsVerifier/res/layout/audio_output_routingnotifications_test.xml b/apps/CtsVerifier/res/layout/audio_output_routingnotifications_test.xml
index d039691..dc55e2a 100644
--- a/apps/CtsVerifier/res/layout/audio_output_routingnotifications_test.xml
+++ b/apps/CtsVerifier/res/layout/audio_output_routingnotifications_test.xml
@@ -18,12 +18,11 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:id="@+id/scrollView"
-    >
+        style="@style/RootLayoutPadding">
 
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:padding="20dp"
         android:orientation="vertical">
 
         <TextView
diff --git a/apps/CtsVerifier/res/layout/ble_advertiser_hardware_scan_filter.xml b/apps/CtsVerifier/res/layout/ble_advertiser_hardware_scan_filter.xml
index a545727..a20dea4 100644
--- a/apps/CtsVerifier/res/layout/ble_advertiser_hardware_scan_filter.xml
+++ b/apps/CtsVerifier/res/layout/ble_advertiser_hardware_scan_filter.xml
@@ -17,8 +17,7 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:orientation="vertical"
-        android:padding="10dip"
-        >
+        style="@style/RootLayoutPadding">
     <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
diff --git a/apps/CtsVerifier/res/layout/ble_advertiser_power_level.xml b/apps/CtsVerifier/res/layout/ble_advertiser_power_level.xml
index c8e0133..5a4ef24 100644
--- a/apps/CtsVerifier/res/layout/ble_advertiser_power_level.xml
+++ b/apps/CtsVerifier/res/layout/ble_advertiser_power_level.xml
@@ -17,8 +17,7 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:orientation="vertical"
-        android:padding="10dip"
-        >
+        style="@style/RootLayoutPadding">
     <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
             android:layout_width="fill_parent"
             android:layout_height="wrap_content">
diff --git a/apps/CtsVerifier/res/layout/ble_advertiser_test.xml b/apps/CtsVerifier/res/layout/ble_advertiser_test.xml
index 7db2b4e..58b7e56 100644
--- a/apps/CtsVerifier/res/layout/ble_advertiser_test.xml
+++ b/apps/CtsVerifier/res/layout/ble_advertiser_test.xml
@@ -17,8 +17,7 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:orientation="vertical"
-        android:padding="10dip"
-        >
+        style="@style/RootLayoutPadding">
     <ListView android:id="@+id/ble_advertiser_tests"
             android:layout_height="fill_parent"
             android:layout_width="match_parent"
diff --git a/apps/CtsVerifier/res/layout/bt_toggle.xml b/apps/CtsVerifier/res/layout/bt_toggle.xml
index 71def84..87e8f7a 100644
--- a/apps/CtsVerifier/res/layout/bt_toggle.xml
+++ b/apps/CtsVerifier/res/layout/bt_toggle.xml
@@ -17,8 +17,7 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:orientation="vertical"
-        android:padding="10dip"
-        >
+        style="@style/RootLayoutPadding">
     <TextView android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_alignParentTop="true"
diff --git a/apps/CtsVerifier/res/layout/hifi_ultrasound.xml b/apps/CtsVerifier/res/layout/hifi_ultrasound.xml
index 7d2de5a..8ad3fbd 100644
--- a/apps/CtsVerifier/res/layout/hifi_ultrasound.xml
+++ b/apps/CtsVerifier/res/layout/hifi_ultrasound.xml
@@ -14,17 +14,19 @@
      limitations under the License.
 -->
 
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
               android:layout_width="match_parent"
               android:layout_height="match_parent"
-              android:orientation="vertical">
+              style="@style/RootLayoutPadding">
+
+<LinearLayout
+      android:layout_width="match_parent"
+      android:layout_height="match_parent"
+      android:orientation="vertical">
 
   <TextView
       android:layout_width="match_parent"
-      android:layout_height="0dp"
-      android:layout_weight="7"
-      android:scrollbars="vertical"
-      android:gravity="bottom"
+      android:layout_height="wrap_content"
       android:id="@+id/info_text"/>
 
   <LinearLayout
@@ -46,6 +48,6 @@
         android:id="@+id/player_button"/>
   </LinearLayout>
 
-  <include layout="@layout/pass_fail_buttons" />
-
-</LinearLayout>
+      <include layout="@layout/pass_fail_buttons" />
+      </LinearLayout>
+</ScrollView>
diff --git a/apps/CtsVerifier/res/layout/network_screen_off.xml b/apps/CtsVerifier/res/layout/network_screen_off.xml
index 5a2446d..c0eeee8 100644
--- a/apps/CtsVerifier/res/layout/network_screen_off.xml
+++ b/apps/CtsVerifier/res/layout/network_screen_off.xml
@@ -15,7 +15,8 @@
 -->
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
         android:layout_width="match_parent"
-        android:layout_height="match_parent">
+        android:layout_height="match_parent"
+        style="@style/RootLayoutPadding">
 
     <Button android:id="@+id/start_btn"
             android:text="@string/network_screen_off_test_start"
diff --git a/apps/CtsVerifier/res/values-round/styles.xml b/apps/CtsVerifier/res/values-round/styles.xml
new file mode 100644
index 0000000..31e3c17
--- /dev/null
+++ b/apps/CtsVerifier/res/values-round/styles.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <style name="RootLayoutPadding">
+        <item name="android:paddingEnd">?android:listPreferredItemPaddingEnd</item>
+        <item name="android:paddingBottom">?android:dialogPreferredPadding</item>
+        <item name="android:paddingLeft">?android:listPreferredItemPaddingLeft</item>
+        <item name="android:paddingRight">?android:listPreferredItemPaddingRight</item>
+        <item name="android:paddingStart">?android:listPreferredItemPaddingStart</item>
+        <item name="android:paddingTop">?android:dialogPreferredPadding</item>
+    </style>
+</resources>
diff --git a/apps/CtsVerifier/res/values/styles.xml b/apps/CtsVerifier/res/values/styles.xml
index 16fa87f..fa82169 100644
--- a/apps/CtsVerifier/res/values/styles.xml
+++ b/apps/CtsVerifier/res/values/styles.xml
@@ -10,4 +10,12 @@
         <item name="android:textSize">18sp</item>
         <item name="android:padding">5dp</item>
     </style>
+    <style name="RootLayoutPadding">
+      <item name="android:paddingEnd">?android:attr/listPreferredItemPaddingEnd</item>
+      <item name="android:paddingBottom">?android:attr/dialogPreferredPadding</item>
+      <item name="android:paddingLeft">?android:attr/listPreferredItemPaddingLeft</item>
+      <item name="android:paddingRight">?android:attr/listPreferredItemPaddingRight</item>
+      <item name="android:paddingStart">?android:attr/listPreferredItemPaddingStart</item>
+      <item name="android:paddingTop">?android:attr/dialogPreferredPadding</item>
+    </style>
 </resources>