UI polish/tweaks for blocked numbers UI.

- Update the strings as in the mocks
- Change the theme on the dialogue to match (mock)
- Change the hint text to "Phone number"
- Change the keyboard to the phone keyboard
- Upon user clicking "Add a number," put focus on the text field and have keyboard popped up

Bug: 26917087
Change-Id: I84320095050ddf808ae89c9800f94d1dc05089b5
diff --git a/res/values/strings.xml b/res/values/strings.xml
index a85faf0..f1dd67b 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -119,7 +119,7 @@
     <!-- Blocked numbers -->
     <string name="blocked_numbers">Blocked numbers</string>
     <!-- Text shown at the beginning of the blocked numbers screen to explain what the screen is about. -->
-    <string name="blocked_numbers_msg">Calls and texts from numbers on this list are blocked.</string>
+    <string name="blocked_numbers_msg">You won\'t receive calls or texts from blocked numbers.</string>
     <!-- Button to add a blocked number. -->
     <string name="block_number">Add a number</string>
     <!-- Body of dialog to confirm unblocking a number. -->
@@ -129,7 +129,7 @@
     <!-- Body of dialog to block a number.  -->
     <string name="add_blocked_dialog_body">Block calls and texts from</string>
     <!-- Hint shown in the edit text box for adding a blocked number -->
-    <string name="add_blocked_number_hint">Number or email</string>
+    <string name="add_blocked_number_hint">Phone number</string>
     <!-- Button to block a number. -->
     <string name="block_button">Block</string>
     <!-- String shown to users unable to manage blocked numbers because they are not owners of the
diff --git a/res/values/styles.xml b/res/values/styles.xml
index a7eb2fd..6760bf7 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -38,6 +38,7 @@
         <item name="android:colorPrimaryDark">@color/dialer_settings_color_dark</item>
         <item name="android:homeAsUpIndicator">@drawable/ic_back_arrow</item>
         <item name="android:windowContentOverlay">@null</item>
+        <item name="android:colorAccent">@color/theme_color</item>
     </style>
 
     <style name="TelecomDialerSettingsActionBarStyle" parent="android:Widget.Material.ActionBar">
diff --git a/res/xml/add_blocked_number_dialog.xml b/res/xml/add_blocked_number_dialog.xml
index b71f78f..c1a2d28 100644
--- a/res/xml/add_blocked_number_dialog.xml
+++ b/res/xml/add_blocked_number_dialog.xml
@@ -21,9 +21,7 @@
         android:layout_height="match_parent"
         android:orientation="vertical"
         android:paddingLeft="@dimen/blocked_numbers_extra_large_padding"
-        android:paddingRight="@dimen/blocked_numbers_extra_large_padding"
-        android:focusable="true"
-        android:focusableInTouchMode="true">
+        android:paddingRight="@dimen/blocked_numbers_extra_large_padding">
     <TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
@@ -38,5 +36,5 @@
             android:paddingTop="@dimen/blocked_numbers_large_padding"
             android:paddingBottom="@dimen/blocked_numbers_large_padding"
             android:hint="@string/add_blocked_number_hint"
-            android:inputType="text" />
+            android:inputType="phone" />
 </LinearLayout>
\ No newline at end of file
diff --git a/src/com/android/server/telecom/settings/BlockedNumbersActivity.java b/src/com/android/server/telecom/settings/BlockedNumbersActivity.java
index c36f55f..8797334 100644
--- a/src/com/android/server/telecom/settings/BlockedNumbersActivity.java
+++ b/src/com/android/server/telecom/settings/BlockedNumbersActivity.java
@@ -33,6 +33,8 @@
 import android.view.LayoutInflater;
 import android.view.MenuItem;
 import android.view.View;
+import android.view.WindowManager;
+import android.view.inputmethod.InputMethodManager;
 import android.widget.*;
 import com.android.server.telecom.R;
 
@@ -159,6 +161,12 @@
                         mBlockButton = ((AlertDialog) dialog)
                                 .getButton(AlertDialog.BUTTON_POSITIVE);
                         mBlockButton.setEnabled(false);
+                        // show keyboard
+                        InputMethodManager inputMethodManager =
+                                (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
+                        inputMethodManager.showSoftInput(editText,
+                                InputMethodManager.SHOW_IMPLICIT);
+
                     }
                 });
         dialog.show();