Do not trigger RESPOND_VIA_MESSAGE with showUI Extra

We don't want to require SMS applications to implement activities that show
over lock just to handle the "respond via custom message" scenario for
rejecting phone calls. This change removes the path that would ask for
the SMS app to show UI for the user to enter a message. A separate change
adds an entry dialog into the phone call answer UI.

Bug: 11084719 Provide UI for "quick response" messages built into Phone app
Change-Id: Ibb47082313a253d506bda7978c10da13d82738a2
diff --git a/src/com/android/phone/RejectWithTextMessageManager.java b/src/com/android/phone/RejectWithTextMessageManager.java
index 8ad1257..8f8b8cb 100644
--- a/src/com/android/phone/RejectWithTextMessageManager.java
+++ b/src/com/android/phone/RejectWithTextMessageManager.java
@@ -141,11 +141,11 @@
     }
 
     /**
-     * Reject the call with the specified message (or launch messaging UX if null message)
+     * Reject the call with the specified message. If message is null this call is ignored.
      */
     public static void rejectCallWithMessage(Call call, String message) {
         Connection conn = call.getLatestConnection();
-        if (conn != null) {
+        if (conn != null && message != null) {
             final String phoneNumber = conn.getAddress();
             final ComponentName component =
                     SmsApplication.getDefaultRespondViaMessageApplication(
@@ -154,13 +154,8 @@
                 // Build and send the intent
                 final Uri uri = Uri.fromParts(Constants.SCHEME_SMSTO, phoneNumber, null);
                 final Intent intent = new Intent(TelephonyManager.ACTION_RESPOND_VIA_MESSAGE, uri);
-                if (message != null) {
-                    intent.putExtra(Intent.EXTRA_TEXT, message);
-                    showMessageSentToast(phoneNumber);
-                } else {
-                    intent.putExtra("exit_on_sent", true);
-                    intent.putExtra("showUI", true);
-                }
+                intent.putExtra(Intent.EXTRA_TEXT, message);
+                showMessageSentToast(phoneNumber);
                 intent.setComponent(component);
                 PhoneGlobals.getInstance().startService(intent);
             }