Revert "Update testInvalidateChild to accomodate HW fast path"

This reverts commit b10f96fbce750528007c9effd51c454be4d3cabf.

Change-Id: Icd6777204013fc1d554897c050fd3287b09ae55c
(cherry picked from commit d0655f308543a1f70f603573cca4dbb4c7257752)
diff --git a/tests/tests/view/AndroidManifest.xml b/tests/tests/view/AndroidManifest.xml
index fd004b1..d48a948 100644
--- a/tests/tests/view/AndroidManifest.xml
+++ b/tests/tests/view/AndroidManifest.xml
@@ -52,9 +52,7 @@
             </intent-filter>
         </activity>
 
-        <activity android:name=".ViewGroupInvalidateChildCtsActivity"
-            android:label="ViewGroupCtsActivity"
-            android:hardwareAccelerated="false">
+        <activity android:name="android.view.cts.ViewGroupCtsActivity" android:label="ViewGroupCtsActivity">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN"/>
                 <category android:name="android.intent.category.FRAMEWORK_INSTRUMENTATION_TEST" />
@@ -181,6 +179,14 @@
             android:label="ActionModeCtsActivity">
         </activity>
 
+        <activity android:name="android.view.cts.ViewGroupCtsActivity"
+                  android:label="WidgetViewGroupCtsActivity">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.FRAMEWORK_INSTRUMENTATION_TEST" />
+            </intent-filter>
+        </activity>
+
         <activity android:name="android.view.cts.ViewOverlayCtsActivity"
                   android:label="ViewOverlayCtsActivity">
             <intent-filter>
diff --git a/tests/tests/view/src/android/view/cts/ViewGroupInvalidateChildCtsActivity.java b/tests/tests/view/src/android/view/cts/ViewGroupCtsActivity.java
similarity index 89%
rename from tests/tests/view/src/android/view/cts/ViewGroupInvalidateChildCtsActivity.java
rename to tests/tests/view/src/android/view/cts/ViewGroupCtsActivity.java
index e4f2035..7bad954 100644
--- a/tests/tests/view/src/android/view/cts/ViewGroupInvalidateChildCtsActivity.java
+++ b/tests/tests/view/src/android/view/cts/ViewGroupCtsActivity.java
@@ -19,10 +19,11 @@
 import android.app.Activity;
 import android.os.Bundle;
 import android.os.Handler;
+import android.widget.TextView;
 
 import com.android.compatibility.common.util.CTSResult;
 
-public class ViewGroupInvalidateChildCtsActivity extends Activity {
+public class ViewGroupCtsActivity extends Activity {
     public static final String ACTION_INVALIDATE_CHILD = "invalidateChild";
 
     private final Handler mHandler = new Handler();
@@ -36,6 +37,8 @@
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(android.view.cts.R.layout.viewgrouptest_stub);
+        TextView textView = (TextView) findViewById(android.view.cts.R.id.viewgrouptest_stub);
+        textView.setText("test");
     }
 
     @Override
diff --git a/tests/tests/view/src/android/view/cts/ViewGroupTest.java b/tests/tests/view/src/android/view/cts/ViewGroupTest.java
index 769e91e..395a4a7 100644
--- a/tests/tests/view/src/android/view/cts/ViewGroupTest.java
+++ b/tests/tests/view/src/android/view/cts/ViewGroupTest.java
@@ -903,11 +903,11 @@
     @LargeTest
     @Test
     public void testInvalidateChild() {
-        ViewGroupInvalidateChildCtsActivity.setResult(this);
+        ViewGroupCtsActivity.setResult(this);
 
         Context context = InstrumentationRegistry.getTargetContext();
-        Intent intent = new Intent(context, ViewGroupInvalidateChildCtsActivity.class);
-        intent.setAction(ViewGroupInvalidateChildCtsActivity.ACTION_INVALIDATE_CHILD);
+        Intent intent = new Intent(context, ViewGroupCtsActivity.class);
+        intent.setAction(ViewGroupCtsActivity.ACTION_INVALIDATE_CHILD);
         intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
         context.startActivity(intent);
 
diff --git a/tests/tests/view/src/android/view/cts/ViewTest.java b/tests/tests/view/src/android/view/cts/ViewTest.java
index 8edc93b..86decd9 100644
--- a/tests/tests/view/src/android/view/cts/ViewTest.java
+++ b/tests/tests/view/src/android/view/cts/ViewTest.java
@@ -2531,7 +2531,7 @@
         final int childWidth = 100;
         final int childHeight = 200;
         final int parentHeight = 400;
-        final LinearLayout parent = new LinearLayout(mActivity);
+        final MockLinearLayout parent = new MockLinearLayout(mActivity);
         ViewGroup.LayoutParams parentParams = new ViewGroup.LayoutParams(
                 ViewGroup.LayoutParams.WRAP_CONTENT, parentHeight);
         parent.setLayoutParams(parentParams);