diff options
author | Andrew Lee <anwlee@google.com> | 2014-08-11 15:36:56 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2014-08-11 15:38:30 -0700 |
commit | ca630af11785b88d0646bb8751b8b4af32fd2b76 (patch) | |
tree | dd3f53729fa3522973ad18f65510ed0edb0ebdc2 /src | |
parent | a752bbdb282c27005405b9070928660dd84f6415 (diff) |
Disable VT features in Dialer,
+ Should be contingent on a setting in any case. In teh future this
will be derived from capability, but for the moment this feature
just won't be supported.
+ Pointed everything to a false flag in DialerUtils.
Bug: 16211386
Change-Id: I37e027c94e3411d8e73a349b3101fdb6ad598b3b
Diffstat (limited to 'src')
6 files changed, 19 insertions, 9 deletions
diff --git a/src/com/android/dialer/PhoneCallDetailsHelper.java b/src/com/android/dialer/PhoneCallDetailsHelper.java index a432dafa2..be5ee7241 100644 --- a/src/com/android/dialer/PhoneCallDetailsHelper.java +++ b/src/com/android/dialer/PhoneCallDetailsHelper.java @@ -85,7 +85,8 @@ public class PhoneCallDetailsHelper { // Show the video icon if the call had video enabled. views.callTypeIcons.setShowVideo( - (details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO); + (details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO + && DialerUtils.isVideoEnabled()); views.callTypeIcons.requestLayout(); views.callTypeIcons.setVisibility(View.VISIBLE); diff --git a/src/com/android/dialer/calllog/CallDetailHistoryAdapter.java b/src/com/android/dialer/calllog/CallDetailHistoryAdapter.java index 105462ffe..7a8b9227c 100644 --- a/src/com/android/dialer/calllog/CallDetailHistoryAdapter.java +++ b/src/com/android/dialer/calllog/CallDetailHistoryAdapter.java @@ -122,7 +122,8 @@ public class CallDetailHistoryAdapter extends BaseAdapter { TextView durationView = (TextView) result.findViewById(R.id.duration); int callType = details.callTypes[0]; - boolean isVideoCall = (details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO; + boolean isVideoCall = (details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO + && DialerUtils.isVideoEnabled(); callTypeIconView.clear(); callTypeIconView.add(callType); diff --git a/src/com/android/dialer/calllog/CallLogListItemHelper.java b/src/com/android/dialer/calllog/CallLogListItemHelper.java index b2c1e2d14..78a010502 100644 --- a/src/com/android/dialer/calllog/CallLogListItemHelper.java +++ b/src/com/android/dialer/calllog/CallLogListItemHelper.java @@ -23,6 +23,7 @@ import android.text.TextUtils; import com.android.dialer.PhoneCallDetails; import com.android.dialer.PhoneCallDetailsHelper; import com.android.dialer.R; +import com.android.dialer.util.DialerUtils; /** * Helper class to fill in the views of a call log entry. @@ -153,7 +154,8 @@ import com.android.dialer.R; } // If call had video capabilities, add the "Video Call" string. - if ((details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO) { + if ((details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO && + DialerUtils.isVideoEnabled()) { callDescription.append(mResources.getString(R.string.description_video_call)); } diff --git a/src/com/android/dialer/list/RegularSearchListAdapter.java b/src/com/android/dialer/list/RegularSearchListAdapter.java index 2bceaf9ed..8e4382c0f 100644 --- a/src/com/android/dialer/list/RegularSearchListAdapter.java +++ b/src/com/android/dialer/list/RegularSearchListAdapter.java @@ -26,6 +26,7 @@ import com.android.contacts.common.list.PhoneNumberListAdapter; import com.android.dialer.calllog.ContactInfo; import com.android.dialer.service.CachedNumberLookupService; import com.android.dialer.service.CachedNumberLookupService.CachedContactInfo; +import com.android.dialer.util.DialerUtils; /** * List adapter to display regular search results. @@ -73,9 +74,8 @@ public class RegularSearchListAdapter extends DialerPhoneNumberListAdapter { // a dialable number, then clicking add to contact should add it as a number. // Otherwise, it should add it to a new contact as a name. setShortcutEnabled(SHORTCUT_ADD_NUMBER_TO_CONTACTS, showNumberShortcuts); - // TODO: Write utility method to check subscriptions and settings, and use it to determine - // whether to enable or disable video call shortcut. - setShortcutEnabled(SHORTCUT_MAKE_VIDEO_CALL, showNumberShortcuts); + setShortcutEnabled(SHORTCUT_MAKE_VIDEO_CALL, + showNumberShortcuts && DialerUtils.isVideoEnabled()); super.setQueryString(queryString); } } diff --git a/src/com/android/dialer/list/SmartDialNumberListAdapter.java b/src/com/android/dialer/list/SmartDialNumberListAdapter.java index d9aa84674..231611db3 100644 --- a/src/com/android/dialer/list/SmartDialNumberListAdapter.java +++ b/src/com/android/dialer/list/SmartDialNumberListAdapter.java @@ -32,6 +32,7 @@ import com.android.dialer.dialpad.SmartDialCursorLoader; import com.android.dialer.dialpad.SmartDialNameMatcher; import com.android.dialer.dialpad.SmartDialPrefix; import com.android.dialer.dialpad.SmartDialMatchPosition; +import com.android.dialer.util.DialerUtils; import java.util.ArrayList; @@ -118,9 +119,8 @@ public class SmartDialNumberListAdapter extends DialerPhoneNumberListAdapter { public void setQueryString(String queryString) { final boolean showNumberShortcuts = !TextUtils.isEmpty(getFormattedQueryString()); setShortcutEnabled(SHORTCUT_ADD_NUMBER_TO_CONTACTS, showNumberShortcuts); - // TODO: Write utility method to check subscriptions and settings, and use it to determine - // whether to enable or disable video call shortcut. - setShortcutEnabled(SHORTCUT_MAKE_VIDEO_CALL, showNumberShortcuts); + setShortcutEnabled(SHORTCUT_MAKE_VIDEO_CALL, + showNumberShortcuts && DialerUtils.isVideoEnabled()); super.setQueryString(queryString); } } diff --git a/src/com/android/dialer/util/DialerUtils.java b/src/com/android/dialer/util/DialerUtils.java index 93a055df1..e24b642eb 100644 --- a/src/com/android/dialer/util/DialerUtils.java +++ b/src/com/android/dialer/util/DialerUtils.java @@ -169,4 +169,10 @@ public class DialerUtils { imm.hideSoftInputFromWindow(view.getWindowToken(), 0); } } + + public static boolean isVideoEnabled() { + // TODO: Write utility methods to check subscriptions and settings, and use it to determine + // whether to enable or disable video call functionality. + return false; + } } |