diff options
author | maxwelb <maxwelb@google.com> | 2017-07-13 17:27:42 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-07-24 18:48:32 +0000 |
commit | 95f7abf1160717efe8ad5b8fa79bd8de3648f4a0 (patch) | |
tree | 2b2088268a15ed6a33c94fbd8197290cd65fecb3 /java/com/android/contacts/common/list | |
parent | d32cff88a24531d10fad6a0dfb3df5e466d5f1ff (diff) |
Update ECCapabilities for temporarily unavailable status
This CL makes a number of changes to include temporarily unavailable
statuses (go/ec-temp-unavailable) as part ECCapabilities.
- Adds isTemporarilyUnavailable methods, which will be set by
ECBroadcastReceiver upon getting a capabilities update.
- Adds a builder to ECCapabilities as there are now 4 booleans that are
set upon construction.
- Changes the names of getters on ECCapabilities, which was required to
get autovalue to correctly generate the builder.
- Adds an ALL_CAPABILITIES constant to match the NO_CAPABILITIES
constant.
Bug: 62609419
Test: Existing tests, ECCapabilitiesTest
PiperOrigin-RevId: 161890511
Change-Id: I967a9a14793ac12101ecfed59e5f7af1217faf3b
Diffstat (limited to 'java/com/android/contacts/common/list')
-rw-r--r-- | java/com/android/contacts/common/list/PhoneNumberListAdapter.java | 2 | ||||
-rw-r--r-- | java/com/android/contacts/common/list/PhoneNumberPickerFragment.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/java/com/android/contacts/common/list/PhoneNumberListAdapter.java b/java/com/android/contacts/common/list/PhoneNumberListAdapter.java index ad0983611..87fc496f6 100644 --- a/java/com/android/contacts/common/list/PhoneNumberListAdapter.java +++ b/java/com/android/contacts/common/list/PhoneNumberListAdapter.java @@ -404,7 +404,7 @@ public class PhoneNumberListAdapter extends ContactEntryListAdapter { if (action == ContactListItemView.NONE) { EnrichedCallManager manager = EnrichedCallComponent.get(mContext).getEnrichedCallManager(); EnrichedCallCapabilities capabilities = manager.getCapabilities(number); - if (capabilities != null && capabilities.supportsCallComposer()) { + if (capabilities != null && capabilities.isCallComposerCapable()) { action = ContactListItemView.CALL_AND_SHARE; } else if (capabilities == null && getQueryString() != null diff --git a/java/com/android/contacts/common/list/PhoneNumberPickerFragment.java b/java/com/android/contacts/common/list/PhoneNumberPickerFragment.java index 558f3b209..2ab121756 100644 --- a/java/com/android/contacts/common/list/PhoneNumberPickerFragment.java +++ b/java/com/android/contacts/common/list/PhoneNumberPickerFragment.java @@ -353,7 +353,7 @@ public class PhoneNumberPickerFragment extends ContactEntryListFragment<ContactE if (view.getCallToAction() != ContactListItemView.NONE || view.getPhoneNumber() == null || manager.getCapabilities(view.getPhoneNumber()) == null - || !manager.getCapabilities(view.getPhoneNumber()).supportsCallComposer()) { + || !manager.getCapabilities(view.getPhoneNumber()).isCallComposerCapable()) { continue; } view.setCallToAction(ContactListItemView.CALL_AND_SHARE, listener, view.getPosition()); |