Use a separate layout for LinearLayout_LayoutParams tests

So that it doesn't clash with ScrollView parent used for
LinearLayout tests

Bug: 62939333
Test: adb shell am instrument -e class 'android.widget.cts.LinearLayoutTest' -w 'android.widget.cts/android.support.test.runner.AndroidJUnitRunner'
Test: adb shell am instrument -e class 'android.widget.cts.LinearLayout_LayoutParamsTest' -w 'android.widget.cts/android.support.test.runner.AndroidJUnitRunner'
Change-Id: Ia865a47f8b753ac71d2249a7d14366f68bdaff1c
diff --git a/tests/tests/widget/res/layout/linearlayout_layout.xml b/tests/tests/widget/res/layout/linearlayout_layout.xml
index 9c59fbf..3638de5d3 100644
--- a/tests/tests/widget/res/layout/linearlayout_layout.xml
+++ b/tests/tests/widget/res/layout/linearlayout_layout.xml
@@ -20,7 +20,6 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent">
     <LinearLayout
-        android:id="@+id/linearlayout_root"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:orientation="vertical">
diff --git a/tests/tests/widget/res/layout/linearlayout_layout2.xml b/tests/tests/widget/res/layout/linearlayout_layout2.xml
new file mode 100644
index 0000000..14d8b46
--- /dev/null
+++ b/tests/tests/widget/res/layout/linearlayout_layout2.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/linearlayout_root"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical" />
diff --git a/tests/tests/widget/src/android/widget/cts/LinearLayout_LayoutParamsTest.java b/tests/tests/widget/src/android/widget/cts/LinearLayout_LayoutParamsTest.java
index b320008..751caef 100644
--- a/tests/tests/widget/src/android/widget/cts/LinearLayout_LayoutParamsTest.java
+++ b/tests/tests/widget/src/android/widget/cts/LinearLayout_LayoutParamsTest.java
@@ -42,7 +42,7 @@
     @Test
     public void testConstructor() throws XmlPullParserException, IOException {
         final Context context = InstrumentationRegistry.getTargetContext();
-        XmlResourceParser p = context.getResources().getLayout(R.layout.linearlayout_layout);
+        XmlResourceParser p = context.getResources().getLayout(R.layout.linearlayout_layout2);
 
         XmlUtils.beginDocument(p, "LinearLayout");
         LinearLayout.LayoutParams linearLayoutParams =