Fix bug 3378333 - Holo-style layout for granting permissions

Change-Id: Ie1bb925db3ddd8343c9756e220a0d821f4d31c6d
diff --git a/core/java/android/accounts/GrantCredentialsPermissionActivity.java b/core/java/android/accounts/GrantCredentialsPermissionActivity.java
index 83e4fd9..89eee6d 100644
--- a/core/java/android/accounts/GrantCredentialsPermissionActivity.java
+++ b/core/java/android/accounts/GrantCredentialsPermissionActivity.java
@@ -51,9 +51,9 @@
     private final AccountManagerService accountManagerService = AccountManagerService.getSingleton();
 
     protected void onCreate(Bundle savedInstanceState) {
-        requestWindowFeature(Window.FEATURE_NO_TITLE);
         super.onCreate(savedInstanceState);
         setContentView(R.layout.grant_credentials_permission);
+        setTitle(R.string.grant_permissions_header_text);
 
         mInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
 
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 25d3aca..bd0cd35 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -1348,7 +1348,8 @@
 
         <activity android:name="android.accounts.GrantCredentialsPermissionActivity"
                 android:excludeFromRecents="true"
-                android:exported="true">
+                android:exported="true"
+                android:theme="@android:style/Theme.Holo.DialogWhenLarge">
         </activity>
 
         <activity android:name="android.content.SyncActivityTooManyDeletes"
diff --git a/core/res/res/layout/grant_credentials_permission.xml b/core/res/res/layout/grant_credentials_permission.xml
index 0ffe8de..8b18454 100644
--- a/core/res/res/layout/grant_credentials_permission.xml
+++ b/core/res/res/layout/grant_credentials_permission.xml
@@ -21,24 +21,10 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:orientation="vertical"
     android:layout_width="match_parent"
-    android:layout_height="match_parent">
-
-    <!-- The header -->
-    <TextView
-        android:id="@+id/header_text"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:textAppearance="?android:attr/textAppearanceMedium"
-        android:textColor="@color/white"
-        android:textStyle="bold"
-        android:text="@string/grant_permissions_header_text"
-        android:shadowColor="@color/shadow"
-        android:shadowRadius="2"
-        android:singleLine="true"
-        android:background="@drawable/title_bar_medium"
-        android:gravity="left|center_vertical"
-	android:paddingLeft="19dip"
-        android:ellipsize="marquee" />
+    android:layout_height="match_parent"
+    android:divider="?android:attr/dividerHorizontal"
+    android:showDividers="middle"
+    android:dividerPadding="16dip" >
 
     <!-- The list of packages that correspond to the requesting UID
     and the account/authtokenType that is being requested -->
@@ -137,25 +123,24 @@
     <LinearLayout
         android:id="@+id/buttons"
         android:layout_width="match_parent"
-        android:layout_height="52dip"
-        android:background="@drawable/bottom_bar"
-        android:paddingTop="4dip"
-        android:paddingLeft="2dip"
-        android:paddingRight="2dip">
+        android:layout_height="54dip"
+        style="?android:attr/buttonBarStyle">
 
         <Button
             android:id="@+id/allow_button"
             android:text="@string/allow"
             android:layout_width="0dip"
             android:layout_height="wrap_content"
-            android:layout_weight="2" />
+            android:layout_weight="2"
+            style="?android:attr/buttonBarButtonStyle" />
 
         <Button
             android:id="@+id/deny_button"
             android:text="@string/deny"
             android:layout_width="0dip"
             android:layout_height="wrap_content"
-            android:layout_weight="2" />
+            android:layout_weight="2"
+            style="?android:attr/buttonBarButtonStyle" />
 
     </LinearLayout>
 </LinearLayout>