diff options
author | Tyler Gunn <tgunn@google.com> | 2015-08-05 14:34:28 -0700 |
---|---|---|
committer | Tyler Gunn <tgunn@google.com> | 2015-08-05 14:34:28 -0700 |
commit | c72f419b18258cfc6f29590e3b97dac8b175f904 (patch) | |
tree | 0964304c8588d99a3fe891ae4e18ea16e53d5fa2 /src/com/android/dialer/dialpad/DialpadFragment.java | |
parent | 20c63bb47435c4ab770bb3008ed2f69666d2f0aa (diff) |
Add "Call with Note" from dialpad.
Bug: 22685114
Change-Id: Id7d16634a0baad03b28b509b62315f43fa022ee4
Diffstat (limited to 'src/com/android/dialer/dialpad/DialpadFragment.java')
-rw-r--r-- | src/com/android/dialer/dialpad/DialpadFragment.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index d35abd75b..6de9a483a 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -67,7 +67,9 @@ import android.widget.PopupMenu; import android.widget.RelativeLayout; import android.widget.TextView; +import com.android.contacts.common.CallUtil; import com.android.contacts.common.GeoUtil; +import com.android.contacts.common.dialog.CallSubjectDialog; import com.android.contacts.common.util.PermissionsUtil; import com.android.contacts.common.util.PhoneNumberFormatter; import com.android.contacts.common.util.StopWatch; @@ -896,9 +898,12 @@ public class DialpadFragment extends Fragment boolean enable = !isDigitsEmpty(); for (int i = 0; i < menu.size(); i++) { - menu.getItem(i).setEnabled(enable); + MenuItem item = menu.getItem(i); + item.setEnabled(enable); + if (item.getItemId() == R.id.menu_call_with_note) { + item.setVisible(CallUtil.isCallWithSubjectSupported(getContext())); + } } - super.show(); } }; @@ -1470,6 +1475,10 @@ public class DialpadFragment extends Fragment case R.id.menu_add_wait: updateDialString(WAIT); return true; + case R.id.menu_call_with_note: + CallSubjectDialog.start(getActivity(), mDigits.getText().toString()); + hideAndClearDialpad(false); + return true; default: return false; } |