diff options
author | Andrew Lee <anwlee@google.com> | 2015-03-19 14:53:27 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2015-03-19 14:53:27 -0700 |
commit | beb1dfe1884d8707b2c2e32125098a87cce794fb (patch) | |
tree | c71b55e8dd3aa8cfa86832a27272ee21e0d47594 | |
parent | 87dc7309388941ec0017f3ff1aee329364dec484 (diff) |
Remove extra options from dialpad menu.
These are now exposed as shortcuts in the search fragment.
Bug: 19372539
Change-Id: I526570cf8326dbfac1770c0f3c06b72ee1166cc8
-rw-r--r-- | res/menu/dialpad_options.xml | 10 | ||||
-rw-r--r-- | res/values/strings.xml | 4 | ||||
-rw-r--r-- | src/com/android/dialer/dialpad/DialpadFragment.java | 20 |
3 files changed, 2 insertions, 32 deletions
diff --git a/res/menu/dialpad_options.xml b/res/menu/dialpad_options.xml index 49ee37d8f..f0399a82b 100644 --- a/res/menu/dialpad_options.xml +++ b/res/menu/dialpad_options.xml @@ -14,10 +14,7 @@ limitations under the License. --> <menu xmlns:android="http://schemas.android.com/apk/res/android"> - <item - android:id="@+id/menu_add_contact" - android:title="@string/add_contact" - android:showAsAction="withText" /> + <item android:id="@+id/menu_2s_pause" android:title="@string/add_2sec_pause" @@ -26,8 +23,5 @@ android:id="@+id/menu_add_wait" android:title="@string/add_wait" android:showAsAction="withText" /> - <item - android:id="@+id/menu_send_message" - android:title="@string/menu_sendTextMessage" - android:showAsAction="withText" /> + </menu> diff --git a/res/values/strings.xml b/res/values/strings.xml index fb424e9be..28dab88e1 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -42,9 +42,6 @@ [CHAR LIMIT=NONE] --> <string name="recentCallsIconLabel">Call history</string> - <!-- Menu item used to send an SMS or MMS message to a phone number --> - <string name="menu_sendTextMessage">Send SMS</string> - <!-- Menu item used to call a contact from the call log --> <string name="recentCalls_callNumber">Call <xliff:g id="name">%s</xliff:g> @@ -262,7 +259,6 @@ <string name="menu_show_all_calls">Show all calls</string> <!-- Menu items for dialpad options as part of Pause and Wait ftr [CHAR LIMIT=30] --> - <string name="add_contact">Add to contacts</string> <string name="add_2sec_pause">Add 2-sec pause</string> <string name="add_wait">Add wait</string> diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index fbf862fc6..a910f7a1e 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -258,8 +258,6 @@ public class DialpadFragment extends Fragment private boolean mFirstLaunch = false; private boolean mAnimate = false; - private ComponentName mSmsPackageComponentName; - private static final String PREF_DIGITS_FILLED_BY_INTENT = "pref_digits_filled_by_intent"; private TelephonyManager getTelephonyManager() { @@ -660,8 +658,6 @@ public class DialpadFragment extends Fragment stopWatch.stopAndLog(TAG, 50); - mSmsPackageComponentName = DialerUtils.getSmsComponent(activity); - // Populate the overflow menu in onResume instead of onCreate, so that if the SMS activity // is disabled while Dialer is paused, the "Send a text message" option can be correctly // removed when resumed. @@ -878,8 +874,6 @@ public class DialpadFragment extends Fragment @Override public void show() { final Menu menu = getMenu(); - final MenuItem sendMessage = menu.findItem(R.id.menu_send_message); - sendMessage.setVisible(mSmsPackageComponentName != null); boolean enable = !isDigitsEmpty(); for (int i = 0; i < menu.size(); i++) { @@ -1449,26 +1443,12 @@ public class DialpadFragment extends Fragment @Override public boolean onMenuItemClick(MenuItem item) { switch (item.getItemId()) { - case R.id.menu_add_contact: { - final CharSequence digits = mDigits.getText(); - DialerUtils.startActivityWithErrorToast(getActivity(), - DialtactsActivity.getAddNumberToContactIntent(digits)); - return true; - } case R.id.menu_2s_pause: updateDialString(PAUSE); return true; case R.id.menu_add_wait: updateDialString(WAIT); return true; - case R.id.menu_send_message: { - final CharSequence digits = mDigits.getText(); - final Intent smsIntent = new Intent(Intent.ACTION_SENDTO, - Uri.fromParts(ContactsUtils.SCHEME_SMSTO, digits.toString(), null)); - smsIntent.setComponent(mSmsPackageComponentName); - DialerUtils.startActivityWithErrorToast(getActivity(), smsIntent); - return true; - } default: return false; } |