Fix misc style issue in "Open by default" screen.

Fix: 35960603
Test: visual

Change-Id: I6d3f471bb31e8c945d4d3346ad9512cda095ed64
diff --git a/res/layout/app_preferred_settings.xml b/res/layout/app_preferred_settings.xml
index d0041a1..1f3b497 100644
--- a/res/layout/app_preferred_settings.xml
+++ b/res/layout/app_preferred_settings.xml
@@ -14,36 +14,27 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-
-<ScrollView
+<LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:clipToPadding="false"
-    android:scrollbarStyle="@integer/preference_scrollbar_style">
+    android:layout_height="wrap_content"
+    android:paddingStart="@dimen/preference_no_icon_padding_start"
+    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+    android:paddingBottom="5dip"
+    android:orientation="vertical">
 
-    <LinearLayout
-        android:layout_width="match_parent"
+    <TextView android:id="@+id/auto_launch"
+              android:textAppearance="?android:attr/textAppearanceSmall"
+              android:layout_alignParentStart="true"
+              android:layout_width="match_parent"
+              android:layout_height="wrap_content"
+              android:paddingTop="6dip" />
+
+    <Button
+        android:id="@+id/clear_activities_button"
+        android:layout_marginStart="-4dip"
+        android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:paddingStart="?android:attr/listPreferredItemPaddingStart"
-        android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
-        android:paddingBottom="5dip"
-        android:orientation="vertical">
+        android:text="@string/clear_activities" />
 
-        <TextView android:id="@+id/auto_launch"
-            android:textAppearance="?android:attr/textAppearanceSmall"
-            android:layout_alignParentStart="true"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:paddingTop="6dip" />
-
-        <Button
-            android:id="@+id/clear_activities_button"
-            android:layout_marginStart="-4dip"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="@string/clear_activities" />
-
-    </LinearLayout>
-
-</ScrollView>
+</LinearLayout>
diff --git a/res/xml/installed_app_launch_settings.xml b/res/xml/installed_app_launch_settings.xml
index 7342cc0..ac77be1 100644
--- a/res/xml/installed_app_launch_settings.xml
+++ b/res/xml/installed_app_launch_settings.xml
@@ -37,8 +37,7 @@
                         android:title="@string/app_launch_other_defaults_title">
 
         <com.android.settings.applications.ClearDefaultsPreference
-                android:key="app_launch_clear_defaults"
-                />
+                android:key="app_launch_clear_defaults" />
 
     </PreferenceCategory>
 
diff --git a/src/com/android/settings/applications/ClearDefaultsPreference.java b/src/com/android/settings/applications/ClearDefaultsPreference.java
index e9c5a0e..0de2676 100644
--- a/src/com/android/settings/applications/ClearDefaultsPreference.java
+++ b/src/com/android/settings/applications/ClearDefaultsPreference.java
@@ -24,6 +24,7 @@
 import android.os.RemoteException;
 import android.os.ServiceManager;
 import android.os.UserHandle;
+import android.support.v4.content.res.TypedArrayUtils;
 import android.support.v7.preference.Preference;
 import android.support.v7.preference.PreferenceViewHolder;
 import android.text.SpannableString;
@@ -68,7 +69,9 @@
     }
 
     public ClearDefaultsPreference(Context context, AttributeSet attrs) {
-        this(context, attrs, 0);
+        this(context, attrs, TypedArrayUtils.getAttr(context,
+                android.support.v7.preference.R.attr.preferenceStyle,
+                android.R.attr.preferenceStyle));
     }
 
     public ClearDefaultsPreference(Context context) {