Add "Make video call" button to search fragments.
= Add new "make video call" shortcut type, and "handle" its click
in SearchFragment.
= Enable "make video call" shortcut for regular and smart dial search
fragments. For now, this shortcut does nothing.
= Enable "add contact" shortcut for smart dial search fragment.
= Changed the bounds of the shortcut items to fill to the edges.
= Convert shortcut click handling to use switch/case block.
= TODO: Enable/disable the shortcuts depending on whether video
calling has been enabled, once the option is available.
= TODO: Handle dispatching a video call intent, once that intent
extra is provided.
Bug: 16013180
Change-Id: I7563d1f2939e27c4b13ed966b73cd4badd9d9fa7
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index 014ea7e..4141351 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -1105,8 +1105,21 @@
@Override
public void onCallNumberDirectly(String phoneNumber) {
- final PhoneAccount account = mAccountManager != null?
- mAccountManager.getCurrentAccount(): null;
+ onCallNumberDirectly(phoneNumber, false /* isVideoCall */);
+ }
+
+ @Override
+ public void onCallNumberDirectly(String phoneNumber, boolean isVideoCall) {
+ if (isVideoCall) {
+ //TODO: Dispatch intent with video call extras specified, then remove this toast.
+ Toast toast = Toast.makeText(getApplicationContext(),
+ "Feature development in progress.", Toast.LENGTH_SHORT);
+ toast.show();
+ return;
+ }
+
+ final PhoneAccount account = mAccountManager != null ?
+ mAccountManager.getCurrentAccount() : null;
Intent intent = CallUtil.getCallIntent(phoneNumber, getCallOrigin(), account);
DialerUtils.startActivityWithErrorToast(this, intent);
mClearSearchOnPause = true;