diff --git a/java/com/android/dialer/app/DialtactsActivity.java b/java/com/android/dialer/app/DialtactsActivity.java
index 4c26341..269e598 100644
--- a/java/com/android/dialer/app/DialtactsActivity.java
+++ b/java/com/android/dialer/app/DialtactsActivity.java
@@ -298,10 +298,8 @@
             PerformanceReport.recordClick(UiAction.Type.TEXT_CHANGE_WITH_INPUT);
           }
 
-          if (DEBUG) {
-            LogUtil.v("DialtactsActivity.onTextChanged", "called with new query: " + newText);
-            LogUtil.v("DialtactsActivity.onTextChanged", "previous query: " + mSearchQuery);
-          }
+          LogUtil.v("DialtactsActivity.onTextChanged", "called with new query: " + newText);
+          LogUtil.v("DialtactsActivity.onTextChanged", "previous query: " + mSearchQuery);
           mSearchQuery = newText;
 
           // TODO(calderwoodra): show p13n when newText is empty.
@@ -1381,6 +1379,9 @@
     if (mSmartDialSearchFragment != null) {
       mSmartDialSearchFragment.setAddToContactNumber(query);
     }
+    if (mNewSearchFragment != null) {
+      mNewSearchFragment.setRawNumber(query);
+    }
     final String normalizedQuery =
         SmartDialNameMatcher.normalizeNumber(query, SmartDialNameMatcher.LATIN_SMART_DIAL_MAP);
 
diff --git a/java/com/android/dialer/app/list/SearchFragment.java b/java/com/android/dialer/app/list/SearchFragment.java
index e21e073..9330fc8 100644
--- a/java/com/android/dialer/app/list/SearchFragment.java
+++ b/java/com/android/dialer/app/list/SearchFragment.java
@@ -261,7 +261,10 @@
             getActivity(), intent, R.string.add_contact_not_available);
         break;
       case DialerPhoneNumberListAdapter.SHORTCUT_SEND_SMS_MESSAGE:
-        number = adapter.getFormattedQueryString();
+        number =
+            TextUtils.isEmpty(mAddToContactNumber)
+                ? adapter.getFormattedQueryString()
+                : mAddToContactNumber;
         intent = IntentUtil.getSendSmsIntent(number);
         DialerUtils.startActivityWithErrorToast(getActivity(), intent);
         break;
diff --git a/java/com/android/dialer/searchfragment/list/NewSearchFragment.java b/java/com/android/dialer/searchfragment/list/NewSearchFragment.java
index e797a03..8306d37 100644
--- a/java/com/android/dialer/searchfragment/list/NewSearchFragment.java
+++ b/java/com/android/dialer/searchfragment/list/NewSearchFragment.java
@@ -112,6 +112,9 @@
   private RecyclerView recyclerView;
   private SearchAdapter adapter;
   private String query;
+  // Raw query number from dialpad, which may contain special character such as "+". This is used
+  // for actions to add contact or send sms.
+  private String rawNumber;
   private CallInitiationType.Type callInitiationType = CallInitiationType.Type.UNKNOWN_INITIATION;
   private boolean remoteDirectoriesDisabledForTesting;
 
@@ -138,7 +141,7 @@
       LayoutInflater inflater, @Nullable ViewGroup parent, @Nullable Bundle savedInstanceState) {
     View view = inflater.inflate(R.layout.fragment_search, parent, false);
     adapter = new SearchAdapter(getContext(), new SearchCursorManager(), this);
-    adapter.setQuery(query);
+    adapter.setQuery(query, rawNumber);
     adapter.setSearchActions(getActions());
     adapter.setZeroSuggestVisible(getArguments().getBoolean(KEY_SHOW_ZERO_SUGGEST));
     emptyContentView = view.findViewById(R.id.empty_view);
@@ -248,11 +251,15 @@
     }
   }
 
+  public void setRawNumber(String rawNumber) {
+    this.rawNumber = rawNumber;
+  }
+
   public void setQuery(String query, CallInitiationType.Type callInitiationType) {
     this.query = query;
     this.callInitiationType = callInitiationType;
     if (adapter != null) {
-      adapter.setQuery(query);
+      adapter.setQuery(query, rawNumber);
       adapter.setSearchActions(getActions());
       adapter.setZeroSuggestVisible(isRegularSearch());
       loadNearbyPlacesCursor();
diff --git a/java/com/android/dialer/searchfragment/list/SearchAdapter.java b/java/com/android/dialer/searchfragment/list/SearchAdapter.java
index cc090ac..4254bae 100644
--- a/java/com/android/dialer/searchfragment/list/SearchAdapter.java
+++ b/java/com/android/dialer/searchfragment/list/SearchAdapter.java
@@ -18,6 +18,7 @@
 
 import android.content.Context;
 import android.database.Cursor;
+import android.support.annotation.Nullable;
 import android.support.annotation.VisibleForTesting;
 import android.support.v7.widget.RecyclerView;
 import android.support.v7.widget.RecyclerView.ViewHolder;
@@ -47,6 +48,9 @@
 
   private boolean showZeroSuggest;
   private String query;
+  // Raw query number from dialpad, which may contain special character such as "+". This is used
+  // for actions to add contact or send sms.
+  private String rawNumber;
   private OnClickListener allowClickListener;
   private OnClickListener dismissClickListener;
   private RowClickListener rowClickListener;
@@ -127,7 +131,10 @@
       ((HeaderViewHolder) holder).setHeader(header);
     } else if (holder instanceof SearchActionViewHolder) {
       ((SearchActionViewHolder) holder)
-          .setAction(searchCursorManager.getSearchAction(position), position, query);
+          .setAction(
+              searchCursorManager.getSearchAction(position),
+              position,
+              TextUtils.isEmpty(rawNumber) ? query : rawNumber);
     } else if (holder instanceof LocationPermissionViewHolder) {
       // No-op
     } else {
@@ -179,8 +186,9 @@
     showZeroSuggest = visible;
   }
 
-  public void setQuery(String query) {
+  public void setQuery(String query, @Nullable String rawNumber) {
     this.query = query;
+    this.rawNumber = rawNumber;
     if (searchCursorManager.setQuery(query)) {
       notifyDataSetChanged();
     }
