Merge "Removed test from knownfailures" into marshmallow-cts-dev am: 5fff4fb4b6 am: 45dc994694
am: 25a9336676

* commit '25a9336676bfc9701ac42027ba56872c645a6822':
  Removed test from knownfailures
diff --git a/apps/CtsVerifier/res/layout-land/sensor_test.xml b/apps/CtsVerifier/res/layout-land/sensor_test.xml
index f547978..5dbd95a 100644
--- a/apps/CtsVerifier/res/layout-land/sensor_test.xml
+++ b/apps/CtsVerifier/res/layout-land/sensor_test.xml
@@ -13,11 +13,11 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<android.support.wearable.view.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.cts.verifier.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
-    <LinearLayout app:layout_box="all"
+    <LinearLayout app:ctsv_layout_box="all"
             android:orientation="vertical"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
@@ -55,4 +55,4 @@
         <include layout="@layout/snsr_next_button" />
 
     </LinearLayout>
-</android.support.wearable.view.BoxInsetLayout>
+</com.android.cts.verifier.BoxInsetLayout>
diff --git a/apps/CtsVerifier/res/layout-port/sensor_test.xml b/apps/CtsVerifier/res/layout-port/sensor_test.xml
index b4eca4d..024a3f3 100644
--- a/apps/CtsVerifier/res/layout-port/sensor_test.xml
+++ b/apps/CtsVerifier/res/layout-port/sensor_test.xml
@@ -13,11 +13,11 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<android.support.wearable.view.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.cts.verifier.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
-    <LinearLayout app:layout_box="all"
+    <LinearLayout app:ctsv_layout_box="all"
             android:orientation="vertical"
             android:layout_width="match_parent"
             android:layout_height="match_parent">
@@ -44,4 +44,4 @@
         <include layout="@layout/snsr_next_button"/>
 
     </LinearLayout>
-</android.support.wearable.view.BoxInsetLayout>
+</com.android.cts.verifier.BoxInsetLayout>
diff --git a/apps/CtsVerifier/res/layout-small/sensor_test.xml b/apps/CtsVerifier/res/layout-small/sensor_test.xml
index eefa5fa..96cf30a 100644
--- a/apps/CtsVerifier/res/layout-small/sensor_test.xml
+++ b/apps/CtsVerifier/res/layout-small/sensor_test.xml
@@ -13,12 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<android.support.wearable.view.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.cts.verifier.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
     <ScrollView android:id="@+id/log_scroll_view"
-            app:layout_box="all"
+            app:ctsv_layout_box="all"
             android:fillViewport="true"
             android:layout_height="match_parent"
             android:layout_width="match_parent">
@@ -42,4 +42,4 @@
         </LinearLayout>
 
     </ScrollView>
-</android.support.wearable.view.BoxInsetLayout>
+</com.android.cts.verifier.BoxInsetLayout>
diff --git a/apps/CtsVerifier/res/layout/ca_boot_notify.xml b/apps/CtsVerifier/res/layout/ca_boot_notify.xml
index 0ceece1..f56209d 100644
--- a/apps/CtsVerifier/res/layout/ca_boot_notify.xml
+++ b/apps/CtsVerifier/res/layout/ca_boot_notify.xml
@@ -14,11 +14,11 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<android.support.wearable.view.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.cts.verifier.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
-    <LinearLayout app:layout_box="all"
+    <LinearLayout app:ctsv_layout_box="all"
       android:orientation="vertical" android:layout_width="fill_parent"
       android:layout_height="fill_parent">
 
@@ -70,4 +70,4 @@
         </LinearLayout>
       </ScrollView>
     </LinearLayout>
-</android.support.wearable.view.BoxInsetLayout>
+</com.android.cts.verifier.BoxInsetLayout>
diff --git a/apps/CtsVerifier/res/layout/cainstallnotify_main.xml b/apps/CtsVerifier/res/layout/cainstallnotify_main.xml
index 6cb6160..0182a0f 100644
--- a/apps/CtsVerifier/res/layout/cainstallnotify_main.xml
+++ b/apps/CtsVerifier/res/layout/cainstallnotify_main.xml
@@ -14,7 +14,7 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<android.support.wearable.view.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.cts.verifier.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
@@ -47,4 +47,4 @@
             layout="@layout/pass_fail_buttons" />
 
     </LinearLayout>
-</android.support.wearable.view.BoxInsetLayout>
+</com.android.cts.verifier.BoxInsetLayout>
diff --git a/apps/CtsVerifier/res/layout/car_dock_test_main.xml b/apps/CtsVerifier/res/layout/car_dock_test_main.xml
index c568b54..4a9c47e 100644
--- a/apps/CtsVerifier/res/layout/car_dock_test_main.xml
+++ b/apps/CtsVerifier/res/layout/car_dock_test_main.xml
@@ -13,11 +13,11 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<android.support.wearable.view.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.cts.verifier.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
-    <LinearLayout app:layout_box="all"
+    <LinearLayout app:ctsv_layout_box="all"
         android:layout_width="fill_parent"
         android:layout_height="fill_parent"
         android:orientation="vertical" >
@@ -29,4 +29,4 @@
             android:layout_gravity="center"
             android:text="@string/car_mode_enable" />
     </LinearLayout>
-</android.support.wearable.view.BoxInsetLayout>
+</com.android.cts.verifier.BoxInsetLayout>
diff --git a/apps/CtsVerifier/res/layout/fs_main.xml b/apps/CtsVerifier/res/layout/fs_main.xml
index 8a78c81..ad46048 100644
--- a/apps/CtsVerifier/res/layout/fs_main.xml
+++ b/apps/CtsVerifier/res/layout/fs_main.xml
@@ -13,11 +13,11 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<android.support.wearable.view.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.cts.verifier.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
-    <LinearLayout app:layout_box="all"
+    <LinearLayout app:ctsv_layout_box="all"
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:layout_height="match_parent">
@@ -43,4 +43,4 @@
         <include layout="@layout/pass_fail_buttons" />
 
     </LinearLayout>
-</android.support.wearable.view.BoxInsetLayout>
+</com.android.cts.verifier.BoxInsetLayout>
diff --git a/apps/CtsVerifier/res/layout/intent_driven_test.xml b/apps/CtsVerifier/res/layout/intent_driven_test.xml
index bd9e4ca..dbb54c9 100644
--- a/apps/CtsVerifier/res/layout/intent_driven_test.xml
+++ b/apps/CtsVerifier/res/layout/intent_driven_test.xml
@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 
-<android.support.wearable.view.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.cts.verifier.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
-    <LinearLayout app:layout_box="all"
+    <LinearLayout app:ctsv_layout_box="all"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:orientation="vertical">
@@ -33,4 +33,4 @@
             <include layout="@layout/pass_fail_buttons"/>
         </LinearLayout>
     </LinearLayout>
-</android.support.wearable.view.BoxInsetLayout>
+</com.android.cts.verifier.BoxInsetLayout>
diff --git a/apps/CtsVerifier/res/layout/js_charging.xml b/apps/CtsVerifier/res/layout/js_charging.xml
index 2888714..e0986ba 100644
--- a/apps/CtsVerifier/res/layout/js_charging.xml
+++ b/apps/CtsVerifier/res/layout/js_charging.xml
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
-<android.support.wearable.view.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.cts.verifier.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
-    <ScrollView app:layout_box="all"
+    <ScrollView app:ctsv_layout_box="all"
         android:layout_width="match_parent"
         android:layout_height="match_parent">
         <LinearLayout
@@ -95,4 +95,4 @@
             <include layout="@layout/pass_fail_buttons" />
         </LinearLayout>
     </ScrollView>
-</android.support.wearable.view.BoxInsetLayout>
+</com.android.cts.verifier.BoxInsetLayout>
diff --git a/apps/CtsVerifier/res/layout/js_connectivity.xml b/apps/CtsVerifier/res/layout/js_connectivity.xml
index b0e2824..0fbd48f 100644
--- a/apps/CtsVerifier/res/layout/js_connectivity.xml
+++ b/apps/CtsVerifier/res/layout/js_connectivity.xml
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
-<android.support.wearable.view.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.cts.verifier.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
-    <ScrollView app:layout_box="all"
+    <ScrollView app:ctsv_layout_box="all"
         android:layout_width="match_parent"
         android:layout_height="match_parent">
         <LinearLayout
@@ -88,4 +88,4 @@
             <include layout="@layout/pass_fail_buttons" />
         </LinearLayout>
     </ScrollView>
-</android.support.wearable.view.BoxInsetLayout>
+</com.android.cts.verifier.BoxInsetLayout>
diff --git a/apps/CtsVerifier/res/layout/js_idle.xml b/apps/CtsVerifier/res/layout/js_idle.xml
index 5289b98..732f503 100644
--- a/apps/CtsVerifier/res/layout/js_idle.xml
+++ b/apps/CtsVerifier/res/layout/js_idle.xml
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
-<android.support.wearable.view.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.cts.verifier.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
-    <ScrollView app:layout_box="all"
+    <ScrollView app:ctsv_layout_box="all"
         android:layout_width="match_parent"
         android:layout_height="match_parent">
         <LinearLayout
@@ -69,4 +69,4 @@
             <include layout="@layout/pass_fail_buttons" />
         </LinearLayout>
     </ScrollView>
-</android.support.wearable.view.BoxInsetLayout>
+</com.android.cts.verifier.BoxInsetLayout>
diff --git a/apps/CtsVerifier/res/layout/keychain_main.xml b/apps/CtsVerifier/res/layout/keychain_main.xml
index 3f695cd..b134908 100644
--- a/apps/CtsVerifier/res/layout/keychain_main.xml
+++ b/apps/CtsVerifier/res/layout/keychain_main.xml
@@ -14,7 +14,7 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<android.support.wearable.view.BoxInsetLayout
+<com.android.cts.verifier.BoxInsetLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
@@ -92,4 +92,4 @@
             layout="@layout/pass_fail_buttons" />
 
     </LinearLayout>
-</android.support.wearable.view.BoxInsetLayout>
+</com.android.cts.verifier.BoxInsetLayout>
diff --git a/apps/CtsVerifier/res/layout/list_content.xml b/apps/CtsVerifier/res/layout/list_content.xml
index 8670283..e7de596 100644
--- a/apps/CtsVerifier/res/layout/list_content.xml
+++ b/apps/CtsVerifier/res/layout/list_content.xml
@@ -15,14 +15,14 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License
   -->
-<android.support.wearable.view.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.cts.verifier.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
 
     <ListView
         android:id="@android:id/list"
-        app:layout_box="all"
+        app:ctsv_layout_box="all"
         android:layout_width="match_parent"
         android:layout_height="match_parent" />
-</android.support.wearable.view.BoxInsetLayout>
+</com.android.cts.verifier.BoxInsetLayout>
diff --git a/apps/CtsVerifier/res/layout/location_mode_main.xml b/apps/CtsVerifier/res/layout/location_mode_main.xml
index 1768434..58ac069 100644
--- a/apps/CtsVerifier/res/layout/location_mode_main.xml
+++ b/apps/CtsVerifier/res/layout/location_mode_main.xml
@@ -14,11 +14,11 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<android.support.wearable.view.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.cts.verifier.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
-    <LinearLayout app:layout_box="all"
+    <LinearLayout app:ctsv_layout_box="all"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:orientation="vertical"
@@ -47,4 +47,4 @@
             layout="@layout/pass_fail_buttons" />
 
     </LinearLayout>
-</android.support.wearable.view.BoxInsetLayout>
+</com.android.cts.verifier.BoxInsetLayout>
diff --git a/apps/CtsVerifier/res/layout/pa_main.xml b/apps/CtsVerifier/res/layout/pa_main.xml
index 832af71..b748123 100644
--- a/apps/CtsVerifier/res/layout/pa_main.xml
+++ b/apps/CtsVerifier/res/layout/pa_main.xml
@@ -13,11 +13,11 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<android.support.wearable.view.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.cts.verifier.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
-    <RelativeLayout app:layout_box="all"
+    <RelativeLayout app:ctsv_layout_box="all"
         android:layout_width="match_parent"
         android:layout_height="match_parent" >
 
@@ -33,4 +33,4 @@
             android:layout_below="@id/pass_fail_buttons" />
 
     </RelativeLayout>
-</android.support.wearable.view.BoxInsetLayout>
+</com.android.cts.verifier.BoxInsetLayout>
diff --git a/apps/CtsVerifier/res/layout/pass_fail_list.xml b/apps/CtsVerifier/res/layout/pass_fail_list.xml
index cdd40e1..575e630 100644
--- a/apps/CtsVerifier/res/layout/pass_fail_list.xml
+++ b/apps/CtsVerifier/res/layout/pass_fail_list.xml
@@ -13,12 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<android.support.wearable.view.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.cts.verifier.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
 
-    <LinearLayout app:layout_box="all"
+    <LinearLayout app:ctsv_layout_box="all"
             android:orientation="vertical"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
@@ -39,4 +39,4 @@
         <include layout="@layout/pass_fail_buttons" />
 
     </LinearLayout>
-</android.support.wearable.view.BoxInsetLayout>
+</com.android.cts.verifier.BoxInsetLayout>
diff --git a/apps/CtsVerifier/res/layout/poa_main.xml b/apps/CtsVerifier/res/layout/poa_main.xml
index 41bade0..b3c5588 100644
--- a/apps/CtsVerifier/res/layout/poa_main.xml
+++ b/apps/CtsVerifier/res/layout/poa_main.xml
@@ -13,11 +13,11 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<android.support.wearable.view.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.cts.verifier.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
-    <LinearLayout app:layout_box="all"
+    <LinearLayout app:ctsv_layout_box="all"
         android:layout_width="fill_parent"
         android:layout_height="fill_parent"
         android:orientation="vertical" >
@@ -31,4 +31,4 @@
             android:textAppearance="@style/InstructionsFont" />
 
     </LinearLayout>
-</android.support.wearable.view.BoxInsetLayout>
+</com.android.cts.verifier.BoxInsetLayout>
diff --git a/apps/CtsVerifier/res/layout/pwa_widgets.xml b/apps/CtsVerifier/res/layout/pwa_widgets.xml
index 6204d3e..7ead0cb 100644
--- a/apps/CtsVerifier/res/layout/pwa_widgets.xml
+++ b/apps/CtsVerifier/res/layout/pwa_widgets.xml
@@ -13,19 +13,19 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<android.support.wearable.view.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.cts.verifier.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
 
      <TextureView
-         app:layout_box="all"
+         app:ctsv_layout_box="all"
          android:id="@+id/texture_view"
          android:layout_width="match_parent"
          android:layout_height="match_parent" />
 
      <LinearLayout
-         app:layout_box="all"
+         app:ctsv_layout_box="all"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical" >
@@ -59,4 +59,4 @@
          </LinearLayout>
      </LinearLayout>
 
-</android.support.wearable.view.BoxInsetLayout>
+</com.android.cts.verifier.BoxInsetLayout>
diff --git a/apps/CtsVerifier/res/values/attrs.xml b/apps/CtsVerifier/res/values/attrs.xml
index 71a1ba6..9490c87 100644
--- a/apps/CtsVerifier/res/values/attrs.xml
+++ b/apps/CtsVerifier/res/values/attrs.xml
@@ -15,7 +15,7 @@
   -->
 <resources>
     <declare-styleable name="BoxInsetLayout_Layout">
-        <attr name="layout_box">
+        <attr name="ctsv_layout_box">
             <flag name="left" value="0x01" />
             <flag name="top" value="0x02" />
             <flag name="right" value="0x04" />
diff --git a/apps/CtsVerifier/src/android/support/wearable/view/BoxInsetLayout.java b/apps/CtsVerifier/src/com/android/cts/verifier/BoxInsetLayout.java
similarity index 97%
rename from apps/CtsVerifier/src/android/support/wearable/view/BoxInsetLayout.java
rename to apps/CtsVerifier/src/com/android/cts/verifier/BoxInsetLayout.java
index 77d6a21..2edddf8 100644
--- a/apps/CtsVerifier/src/android/support/wearable/view/BoxInsetLayout.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/BoxInsetLayout.java
@@ -14,9 +14,7 @@
  * limitations under the License
  */
 
-package android.support.wearable.view;
-
-import com.android.cts.verifier.R;
+package com.android.cts.verifier;
 
 import android.annotation.TargetApi;
 import android.os.Build;
@@ -34,10 +32,10 @@
 /**
  * BoxInsetLayout is a screen shape-aware FrameLayout that can box its children
  * in the center square of a round screen by using the
- * {@code layout_box} attribute. The values for this attribute specify the
+ * {@code ctsv_layout_box} attribute. The values for this attribute specify the
  * child's edges to be boxed in:
  * {@code left|top|right|bottom} or {@code all}.
- * The {@code layout_box} attribute is ignored on a device with a rectangular
+ * The {@code ctsv_layout_box} attribute is ignored on a device with a rectangular
  * screen.
  */
 @TargetApi(Build.VERSION_CODES.KITKAT_WATCH)
@@ -383,7 +381,7 @@
     }
 
     /**
-     * adds {@code layout_box} attribute to layout parameters
+     * adds {@code ctsv_layout_box} attribute to layout parameters
      */
     public static class LayoutParams extends FrameLayout.LayoutParams {
 
@@ -399,7 +397,7 @@
         public LayoutParams(Context context, AttributeSet attrs) {
             super(context, attrs);
             TypedArray a = context.obtainStyledAttributes(attrs,  R.styleable.BoxInsetLayout_Layout, 0, 0);
-            boxedEdges = a.getInt(R.styleable.BoxInsetLayout_Layout_layout_box, BOX_NONE);
+            boxedEdges = a.getInt(R.styleable.BoxInsetLayout_Layout_ctsv_layout_box, BOX_NONE);
             a.recycle();
         }
 
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/ManifestTestListAdapter.java b/apps/CtsVerifier/src/com/android/cts/verifier/ManifestTestListAdapter.java
index 6b9316f..44e2e0f 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/ManifestTestListAdapter.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/ManifestTestListAdapter.java
@@ -154,6 +154,7 @@
     List<ResolveInfo> getResolveInfosForParent() {
         Intent mainIntent = new Intent(Intent.ACTION_MAIN);
         mainIntent.addCategory(CATEGORY_MANUAL_TEST);
+        mainIntent.setPackage(mContext.getPackageName());
 
         PackageManager packageManager = mContext.getPackageManager();
         List<ResolveInfo> list = packageManager.queryIntentActivities(mainIntent,
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/PassFailButtons.java b/apps/CtsVerifier/src/com/android/cts/verifier/PassFailButtons.java
index 2c3d35d..4a8004a 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/PassFailButtons.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/PassFailButtons.java
@@ -59,7 +59,7 @@
     private static final String INFO_DIALOG_MESSAGE_ID = "infoDialogMessageId";
 
     // Interface mostly for making documentation and refactoring easier...
-    private interface PassFailActivity {
+    public interface PassFailActivity {
 
         /**
          * Hooks up the pass and fail buttons to click listeners that will record the test results.
@@ -268,7 +268,7 @@
         }
     }
 
-    private static <T extends android.app.Activity & PassFailActivity>
+    protected static <T extends android.app.Activity & PassFailActivity>
             void setPassFailClickListeners(final T activity) {
         View.OnClickListener clickListener = new View.OnClickListener() {
             @Override
@@ -299,7 +299,7 @@
         });
     }
 
-    private static void setInfo(final android.app.Activity activity, final int titleId,
+    protected static void setInfo(final android.app.Activity activity, final int titleId,
             final int messageId, final int viewId) {
         // Show the middle "info" button and make it show the info dialog when clicked.
         View infoButton = activity.findViewById(R.id.info_button);
@@ -324,12 +324,11 @@
         }
     }
 
-    private static boolean hasSeenInfoDialog(android.app.Activity activity) {
+    protected static boolean hasSeenInfoDialog(android.app.Activity activity) {
         ContentResolver resolver = activity.getContentResolver();
         Cursor cursor = null;
         try {
-            cursor = resolver.query(
-                    TestResultsProvider.getTestNameUri(activity.getClass().getName()),
+            cursor = resolver.query(TestResultsProvider.getTestNameUri(activity),
                     new String[] {TestResultsProvider.COLUMN_TEST_INFO_SEEN}, null, null, null);
             return cursor.moveToFirst() && cursor.getInt(0) > 0;
         } finally {
@@ -339,7 +338,7 @@
         }
     }
 
-    private static void showInfoDialog(final android.app.Activity activity, int titleId,
+    protected static void showInfoDialog(final android.app.Activity activity, int titleId,
             int messageId, int viewId) {
         Bundle args = new Bundle();
         args.putInt(INFO_DIALOG_TITLE_ID, titleId);
@@ -348,7 +347,7 @@
         activity.showDialog(INFO_DIALOG_ID, args);
     }
 
-    private static Dialog createDialog(final android.app.Activity activity, int id, Bundle args) {
+    protected static Dialog createDialog(final android.app.Activity activity, int id, Bundle args) {
         switch (id) {
             case INFO_DIALOG_ID:
                 return createInfoDialog(activity, id, args);
@@ -357,7 +356,7 @@
         }
     }
 
-    private static Dialog createInfoDialog(final android.app.Activity activity, int id,
+    protected static Dialog createInfoDialog(final android.app.Activity activity, int id,
             Bundle args) {
         int viewId = args.getInt(INFO_DIALOG_VIEW_ID);
         int titleId = args.getInt(INFO_DIALOG_TITLE_ID);
@@ -386,21 +385,20 @@
         return builder.create();
     }
 
-    private static void markSeenInfoDialog(android.app.Activity activity) {
+    protected static void markSeenInfoDialog(android.app.Activity activity) {
         ContentResolver resolver = activity.getContentResolver();
         ContentValues values = new ContentValues(2);
         values.put(TestResultsProvider.COLUMN_TEST_NAME, activity.getClass().getName());
         values.put(TestResultsProvider.COLUMN_TEST_INFO_SEEN, 1);
         int numUpdated = resolver.update(
-                TestResultsProvider.getTestNameUri(activity.getClass().getName()),
-                values, null, null);
+                TestResultsProvider.getTestNameUri(activity), values, null, null);
         if (numUpdated == 0) {
-            resolver.insert(TestResultsProvider.RESULTS_CONTENT_URI, values);
+            resolver.insert(TestResultsProvider.getResultContentUri(activity), values);
         }
     }
 
     /** Set the test result corresponding to the button clicked and finish the activity. */
-    private static void setTestResultAndFinish(android.app.Activity activity, String testId,
+    protected static void setTestResultAndFinish(android.app.Activity activity, String testId,
             String testDetails, ReportLog reportLog, View target) {
         boolean passed;
         if (target.getId() == R.id.pass_button) {
@@ -415,7 +413,7 @@
     }
 
     /** Set the test result and finish the activity. */
-    private static void setTestResultAndFinishHelper(android.app.Activity activity, String testId,
+    protected static void setTestResultAndFinishHelper(android.app.Activity activity, String testId,
             String testDetails, boolean passed, ReportLog reportLog) {
         if (passed) {
             TestResult.setPassedResult(activity, testId, testDetails, reportLog);
@@ -426,7 +424,7 @@
         activity.finish();
     }
 
-    private static ImageButton getPassButtonView(android.app.Activity activity) {
+    protected static ImageButton getPassButtonView(android.app.Activity activity) {
         return (ImageButton) activity.findViewById(R.id.pass_button);
     }
 
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/TestListAdapter.java b/apps/CtsVerifier/src/com/android/cts/verifier/TestListAdapter.java
index ce092cc..642b951 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/TestListAdapter.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/TestListAdapter.java
@@ -163,7 +163,7 @@
 
         TestResultContentObserver observer = new TestResultContentObserver();
         ContentResolver resolver = context.getContentResolver();
-        resolver.registerContentObserver(TestResultsProvider.RESULTS_CONTENT_URI, true, observer);
+        resolver.registerContentObserver(TestResultsProvider.getResultContentUri(context), true, observer);
     }
 
     public void loadTestResults() {
@@ -236,7 +236,7 @@
         ContentResolver resolver = mContext.getContentResolver();
         Cursor cursor = null;
         try {
-            cursor = resolver.query(TestResultsProvider.RESULTS_CONTENT_URI, REFRESH_PROJECTION,
+            cursor = resolver.query(TestResultsProvider.getResultContentUri(mContext), REFRESH_PROJECTION,
                     null, null, null);
             if (cursor.moveToFirst()) {
                 do {
@@ -262,7 +262,7 @@
         @Override
         protected Void doInBackground(Void... params) {
             ContentResolver resolver = mContext.getContentResolver();
-            resolver.delete(TestResultsProvider.RESULTS_CONTENT_URI, "1", null);
+            resolver.delete(TestResultsProvider.getResultContentUri(mContext), "1", null);
             return null;
         }
     }
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/TestResultsBackupHelper.java b/apps/CtsVerifier/src/com/android/cts/verifier/TestResultsBackupHelper.java
index 45e528f..2527d57 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/TestResultsBackupHelper.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/TestResultsBackupHelper.java
@@ -53,7 +53,7 @@
         ContentResolver resolver = mContext.getContentResolver();
         Cursor cursor = null;
         try {
-            cursor = resolver.query(TestResultsProvider.RESULTS_CONTENT_URI,
+            cursor = resolver.query(TestResultsProvider.getResultContentUri(mContext),
                     null, null, null, null);
             int nameIndex = cursor.getColumnIndex(TestResultsProvider.COLUMN_TEST_NAME);
             int resultIndex = cursor.getColumnIndex(TestResultsProvider.COLUMN_TEST_RESULT);
@@ -128,7 +128,7 @@
                 }
 
                 ContentResolver resolver = mContext.getContentResolver();
-                resolver.bulkInsert(TestResultsProvider.RESULTS_CONTENT_URI, values);
+                resolver.bulkInsert(TestResultsProvider.getResultContentUri(mContext), values);
             } else {
                 Log.e(TAG, "Skipping key: " + data.getKey());
             }
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/TestResultsProvider.java b/apps/CtsVerifier/src/com/android/cts/verifier/TestResultsProvider.java
index a9f672e..64c04eb 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/TestResultsProvider.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/TestResultsProvider.java
@@ -39,13 +39,26 @@
 
     private static final String RESULTS_PATH = "results";
 
-    public static final String AUTHORITY = "com.android.cts.verifier.testresultsprovider";
-    public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY);
-    public static final Uri RESULTS_CONTENT_URI =
-            Uri.withAppendedPath(CONTENT_URI, RESULTS_PATH);
+    /**
+     * Get the URI from the result content.
+     * @param context
+     * @return Uri
+     */
+    public static Uri getResultContentUri(Context context) {
+        final String packageName = context.getPackageName();
+        final Uri contentUri = Uri.parse("content://" + packageName + ".testresultsprovider");
+        return Uri.withAppendedPath(contentUri, RESULTS_PATH);
+    }
 
-    public static Uri getTestNameUri(String testName) {
-        return Uri.withAppendedPath(RESULTS_CONTENT_URI, testName);
+    /**
+     * Get the URI from the test name.
+     * @param context
+     * @param testName
+     * @return Uri
+     */
+    public static Uri getTestNameUri(Context context) {
+        final String testName = context.getClass().getName();
+        return Uri.withAppendedPath(getResultContentUri(context), testName);
     }
 
     static final String _ID = "_id";
@@ -69,11 +82,6 @@
     private static final int RESULTS_ALL = 1;
     private static final int RESULTS_ID = 2;
     private static final int RESULTS_TEST_NAME = 3;
-    static {
-        URI_MATCHER.addURI(AUTHORITY, RESULTS_PATH, RESULTS_ALL);
-        URI_MATCHER.addURI(AUTHORITY, RESULTS_PATH + "/#", RESULTS_ID);
-        URI_MATCHER.addURI(AUTHORITY, RESULTS_PATH + "/*", RESULTS_TEST_NAME);
-    }
 
     private static final String TABLE_NAME = "results";
 
@@ -83,6 +91,12 @@
 
     @Override
     public boolean onCreate() {
+        final String authority = getContext().getPackageName() + ".testresultsprovider";
+
+        URI_MATCHER.addURI(authority, RESULTS_PATH, RESULTS_ALL);
+        URI_MATCHER.addURI(authority, RESULTS_PATH + "/#", RESULTS_ID);
+        URI_MATCHER.addURI(authority, RESULTS_PATH + "/*", RESULTS_TEST_NAME);
+
         mOpenHelper = new TestResultsOpenHelper(getContext());
         mBackupManager = new BackupManager(getContext());
         return false;
@@ -153,7 +167,7 @@
         long id = db.insert(TABLE_NAME, null, values);
         getContext().getContentResolver().notifyChange(uri, null);
         mBackupManager.dataChanged();
-        return Uri.withAppendedPath(RESULTS_CONTENT_URI, "" + id);
+        return Uri.withAppendedPath(getResultContentUri(getContext()), "" + id);
     }
 
     @Override
@@ -219,13 +233,14 @@
         values.put(TestResultsProvider.COLUMN_TEST_DETAILS, testDetails);
         values.put(TestResultsProvider.COLUMN_TEST_METRICS, serialize(reportLog));
 
+        final Uri uri = getResultContentUri(context);
         ContentResolver resolver = context.getContentResolver();
-        int numUpdated = resolver.update(TestResultsProvider.RESULTS_CONTENT_URI, values,
+        int numUpdated = resolver.update(uri, values,
                 TestResultsProvider.COLUMN_TEST_NAME + " = ?",
                 new String[] {testName});
 
         if (numUpdated == 0) {
-            resolver.insert(TestResultsProvider.RESULTS_CONTENT_URI, values);
+            resolver.insert(uri, values);
         }
     }
 
diff --git a/libs/view/Android.mk b/libs/view/Android.mk
new file mode 100644
index 0000000..0b121da
--- /dev/null
+++ b/libs/view/Android.mk
@@ -0,0 +1,25 @@
+#
+# 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_SRC_FILES := $(call all-java-files-under, src)
+LOCAL_MODULE := cts-view-lib
+LOCAL_MODULE_TAGS := optional
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/libs/view/src/com/android/view/Position.java b/libs/view/src/com/android/view/Position.java
new file mode 100644
index 0000000..e0b848c
--- /dev/null
+++ b/libs/view/src/com/android/view/Position.java
@@ -0,0 +1,108 @@
+/*
+ * 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 com.android.cts.view;
+
+/**
+ * Represents coordinates where (x, y) = (0, 0) represents the top-left most point.
+ */
+public class Position {
+    private final float mX;
+    private final float mY;
+
+    public Position(float x, float y) {
+        mX = x;
+        mY = y;
+    }
+
+    public float getX() {
+        return mX;
+    }
+
+    public float getY() {
+        return mY;
+    }
+
+    /**
+     * @return The vector dot product between {@code this} and another {@link Position}.
+     */
+    public double dotProduct(Position other) {
+        return (mX * other.mX) + (mY * other.mY);
+    }
+
+    /**
+     * @return The euclidean distance between {@code this} and the other {@link Position}.
+     */
+    public double distanceTo(Position other) {
+        return Math.sqrt(Math.pow((mX - other.mX), 2) + Math.pow((mY - other.mY), 2));
+    }
+
+    /**
+     * Returns the closest double approximation to the smallest angle swept out by an arc from
+     * {@code this} to the other {@link Position}, given the origin of the arc.
+     *
+     * @param origin The {@link Position} to use as the origin of the arc.
+     * @return The angle swept out, in radians within the range {@code [-pi..pi]}. A negative double
+     * indicates that the smallest angle swept out is in the clockwise direction, and a positive
+     * double indicates otherwise.
+     */
+    public double arcAngleTo(Position other, Position origin) {
+        // Compute the angle of the polar representation of this and other w.r.t. the arc origin.
+        double originToThisAngle = Math.atan2(origin.mY - mY, mX - origin.mX);
+        double originToOtherAngle = Math.atan2(origin.mY - other.mY, other.mX - origin.mX);
+        double difference = originToOtherAngle - originToThisAngle;
+
+        // If the difference exceeds PI or is less then -PI, then we should compensate to
+        // bring the value back into the [-pi..pi] range by removing/adding a full revolution.
+        if (difference < -Math.PI) {
+            difference += 2 * Math.PI;
+        } else if (difference > Math.PI){
+            difference -= 2 * Math.PI;
+        }
+        return difference;
+    }
+
+    /**
+     * Returns the closest double approximation to the angle to the other {@link Position}.
+     *
+     * @return The angle swept out, in radians within the range {@code [-pi..pi]}.
+     */
+    public double angleTo(Position other) {
+        return Math.atan2(other.mY - mY, other.mX - mX);
+    }
+
+    /**
+     * Defines equality between pairs of {@link Position}s.
+     * <p>
+     * Two Position instances are defined to be equal if their x and y coordinates are equal.
+     */
+    @Override
+    public boolean equals(Object o) {
+        if (!(o instanceof Position)) {
+            return false;
+        }
+        Position other = (Position) o;
+        return (Float.compare(other.mX, mX) == 0) && (Float.compare(other.mY, mY) == 0);
+    }
+
+    @Override
+    public int hashCode() {
+        int result = 17;
+        result = 31 * result + Float.floatToIntBits(mX);
+        result = 31 * result + Float.floatToIntBits(mY);
+        return result;
+    }
+}
diff --git a/libs/view/src/com/android/view/RenderedSurfaceView.java b/libs/view/src/com/android/view/RenderedSurfaceView.java
new file mode 100644
index 0000000..f42b558
--- /dev/null
+++ b/libs/view/src/com/android/view/RenderedSurfaceView.java
@@ -0,0 +1,105 @@
+/*
+ * 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 com.android.cts.view;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.view.SurfaceHolder;
+import android.view.SurfaceView;
+
+/**
+ * A {@link SurfaceView} that manages its own rendering thread and uses a {@link SurfaceRenderer} to
+ * dictate what should be drawn for each frame.
+ */
+public class RenderedSurfaceView extends SurfaceView implements SurfaceHolder.Callback {
+
+    private static final int JOIN_TIME_OUT_MS = 1000;
+
+    private SurfaceRenderer mRenderer;
+    private volatile boolean mRunning;
+    private Thread mRenderThread;
+
+    public RenderedSurfaceView(Context context) {
+        super(context);
+
+        mRenderer = null;
+        mRunning = false;
+        getHolder().addCallback(this);
+    }
+
+    /**
+     * Sets the renderer to be used.
+     *
+     * <i>Must</i> be called after instantiation.
+     */
+    public void setRenderer(SurfaceRenderer renderer) {
+        mRenderer = renderer;
+    }
+
+    @Override
+    public void surfaceCreated(SurfaceHolder surfaceHolder) {
+        mRenderThread = new RenderThread();
+        mRunning = true;
+        mRenderThread.start();
+    }
+
+    @Override
+    public void surfaceChanged(SurfaceHolder surfaceHolder, int format, int width, int height) {
+        // Configuration changes are disabled so surface changes can be ignored.
+    }
+
+    @Override
+    public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
+        mRunning = false;
+        // Wait for rendering thread to halt after it has observed that it should no longer render
+        while (true) {
+            try {
+                mRenderThread.join(JOIN_TIME_OUT_MS);
+                break;
+            } catch (InterruptedException e) {
+                // Ignore spurious wakeup
+            }
+        }
+        mRenderThread = null;
+    }
+
+    /**
+     * Thread to run the rendering loop for this SurfaceView.
+     */
+    private final class RenderThread extends Thread {
+        private static final int SLEEP_TIME_MS = 16;
+
+        @Override
+        public void run() {
+            while (mRunning) {
+                SurfaceHolder holder = getHolder();
+                Canvas surfaceCanvas = holder.lockCanvas();
+                // Draw onto canvas if valid
+                if (surfaceCanvas != null && mRenderer != null) {
+                    mRenderer.onDrawFrame(surfaceCanvas);
+                    holder.unlockCanvasAndPost(surfaceCanvas);
+                }
+                try {
+                    sleep(SLEEP_TIME_MS);
+                } catch (InterruptedException e) {
+                    // Stop rendering if interrupted
+                    break;
+                }
+            }
+        }
+    }
+}
diff --git a/libs/view/src/com/android/view/SurfaceRenderer.java b/libs/view/src/com/android/view/SurfaceRenderer.java
new file mode 100644
index 0000000..4a0dc69
--- /dev/null
+++ b/libs/view/src/com/android/view/SurfaceRenderer.java
@@ -0,0 +1,34 @@
+/*
+ * 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 com.android.cts.view;
+
+import android.graphics.Canvas;
+import android.view.SurfaceHolder;
+
+/**
+ * Defines what should be drawn to a given {@link RenderedSurfaceView} for every frame.
+ */
+public interface SurfaceRenderer {
+
+    /**
+     * Draws a single frame onto the canvas of a {@link RenderedSurfaceView}.
+     *
+     * @param surfaceCanvas the locked surface canvas corresponding to a single
+     * {@link SurfaceHolder}.
+     */
+    void onDrawFrame(Canvas surfaceCanvas);
+}