diff options
author | calderwoodra <calderwoodra@google.com> | 2017-08-14 12:07:47 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-08-14 14:41:07 -0700 |
commit | dcefa65cf08671b748d549a2cdd169c5d2530415 (patch) | |
tree | 5ee850357f1292ae61ddb560634b2cdba8acd741 /java/com/android/dialer/searchfragment/common | |
parent | fea083f71d9ca31f9180ae04be59ec80a2feb915 (diff) |
Added ability to place RCS, Duo and IMS calls from new search fragment.
Bug: 37209462
Test: SearchAdapterTest + existing tests
PiperOrigin-RevId: 165210817
Change-Id: I9fb78cf7d964b97e6e95c01437780aa66405f019
Diffstat (limited to 'java/com/android/dialer/searchfragment/common')
-rw-r--r-- | java/com/android/dialer/searchfragment/common/Projections.java | 6 | ||||
-rw-r--r-- | java/com/android/dialer/searchfragment/common/RowClickListener.java | 43 |
2 files changed, 47 insertions, 2 deletions
diff --git a/java/com/android/dialer/searchfragment/common/Projections.java b/java/com/android/dialer/searchfragment/common/Projections.java index 37e20d195..078c3e5e6 100644 --- a/java/com/android/dialer/searchfragment/common/Projections.java +++ b/java/com/android/dialer/searchfragment/common/Projections.java @@ -30,9 +30,10 @@ public class Projections { public static final int PHONE_PHOTO_URI = 6; public static final int PHONE_LOOKUP_KEY = 7; public static final int PHONE_CARRIER_PRESENCE = 8; + public static final int PHONE_CONTACT_ID = 9; @SuppressWarnings("unused") - public static final int PHONE_SORT_KEY = 9; + public static final int PHONE_SORT_KEY = 10; public static final String[] PHONE_PROJECTION = new String[] { @@ -45,6 +46,7 @@ public class Projections { Phone.PHOTO_THUMBNAIL_URI, // 6 Phone.LOOKUP_KEY, // 7 Phone.CARRIER_PRESENCE, // 8 - Phone.SORT_KEY_PRIMARY // 9 + Phone.CONTACT_ID, // 9 + Phone.SORT_KEY_PRIMARY // 10 }; } diff --git a/java/com/android/dialer/searchfragment/common/RowClickListener.java b/java/com/android/dialer/searchfragment/common/RowClickListener.java new file mode 100644 index 000000000..e82f3f7bb --- /dev/null +++ b/java/com/android/dialer/searchfragment/common/RowClickListener.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ + +package com.android.dialer.searchfragment.common; + +import com.android.dialer.dialercontact.DialerContact; + +/** Interface of possible actions that can be performed by search elements. */ +public interface RowClickListener { + + /** + * Places a traditional voice call. + * + * @param ranking position in the list relative to the other elements + */ + void placeVoiceCall(String phoneNumber, int ranking); + + /** + * Places an IMS video call. + * + * @param ranking position in the list relative to the other elements + */ + void placeVideoCall(String phoneNumber, int ranking); + + /** Places a Duo video call. */ + void placeDuoCall(String phoneNumber); + + /** Opens the enriched calling/call composer interface. */ + void openCallAndShare(DialerContact dialerContact); +} |