Modifies wear Permission title height to avoid clipping

We were explicitly setting the height of the permission
screen title, which wasn't 100% guaranteed to work in all
languages. This change sets minHeight (to maintain
UI consistency) instead, and changes the height to
wrap_content to enable it to expand further if necessary.

Bug:24774285
Bug:24391658
Change-Id: Icf25ad6a176537b0f34a30f53220c73fccec2d24
diff --git a/res/layout-watch/settings_internal.xml b/res/layout-watch/settings_internal.xml
index afedcf4..fdd21ce 100644
--- a/res/layout-watch/settings_internal.xml
+++ b/res/layout-watch/settings_internal.xml
@@ -17,7 +17,8 @@
     <TextView
         android:id="@+id/header"
         android:layout_width="match_parent"
-        android:layout_height="@dimen/settings_header_base_height"
+        android:layout_height="wrap_content"
+        android:minHeight="@dimen/settings_header_base_height"
         android:layout_marginLeft="16dp"
         android:layout_marginTop="@dimen/settings_header_top_margin"
         android:textSize="@dimen/setting_short_header_text_size"
diff --git a/src/com/android/packageinstaller/permission/ui/wear/TitledSettingsFragment.java b/src/com/android/packageinstaller/permission/ui/wear/TitledSettingsFragment.java
index 64f42d0..ef7efb2 100644
--- a/src/com/android/packageinstaller/permission/ui/wear/TitledSettingsFragment.java
+++ b/src/com/android/packageinstaller/permission/ui/wear/TitledSettingsFragment.java
@@ -207,9 +207,9 @@
         if (!singleLine) {
             height += getResources().getDimension(R.dimen.setting_header_extra_line_height);
         }
+        mHeader.setMinHeight((int) height);
 
         FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) mHeader.getLayoutParams();
-        params.height = (int) height;
         final Context context = getContext();
         if (!singleLine) {
             // Make the top margin a little bit smaller so there is more space for the title.