summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Soulos <psoulos@google.com>2014-08-19 17:38:01 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-08-19 17:38:01 +0000
commit1aeb312866fc844fae80b9e6e8d1f84361befbaf (patch)
tree2814dbc642327c1126c3bbd568a3a219c535583c
parent7054afa4a6b6a2fce83526d0e7735667951c7d2f (diff)
parent15ef5053941ed283301e7644d64aec149464035c (diff)
am 15ef5053: am 21ade5b9: am 92b0e2fc: Moves isVideoEnabled to ContactsCommon (2/3)
* commit '15ef5053941ed283301e7644d64aec149464035c': Moves isVideoEnabled to ContactsCommon (2/3)
-rw-r--r--src/com/android/dialer/PhoneCallDetailsHelper.java4
-rw-r--r--src/com/android/dialer/calllog/CallDetailHistoryAdapter.java3
-rw-r--r--src/com/android/dialer/calllog/CallLogListItemHelper.java4
-rw-r--r--src/com/android/dialer/list/RegularSearchListAdapter.java4
-rw-r--r--src/com/android/dialer/list/SmartDialNumberListAdapter.java4
-rw-r--r--src/com/android/dialer/util/DialerUtils.java6
6 files changed, 10 insertions, 15 deletions
diff --git a/src/com/android/dialer/PhoneCallDetailsHelper.java b/src/com/android/dialer/PhoneCallDetailsHelper.java
index be5ee7241..5e960f985 100644
--- a/src/com/android/dialer/PhoneCallDetailsHelper.java
+++ b/src/com/android/dialer/PhoneCallDetailsHelper.java
@@ -25,6 +25,7 @@ import android.text.format.DateUtils;
import android.view.View;
import android.widget.TextView;
+import com.android.contacts.common.CallUtil;
import com.android.contacts.common.testing.NeededForTesting;
import com.android.contacts.common.util.PhoneNumberHelper;
import com.android.dialer.calllog.CallTypeHelper;
@@ -32,7 +33,6 @@ import com.android.dialer.calllog.ContactInfo;
import com.android.dialer.calllog.PhoneNumberDisplayHelper;
import com.android.dialer.calllog.PhoneNumberUtilsWrapper;
import com.android.dialer.util.DialerUtils;
-
import com.google.common.collect.Lists;
import java.util.ArrayList;
@@ -86,7 +86,7 @@ public class PhoneCallDetailsHelper {
// Show the video icon if the call had video enabled.
views.callTypeIcons.setShowVideo(
(details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO
- && DialerUtils.isVideoEnabled());
+ && CallUtil.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 7a8b9227c..3c0795530 100644
--- a/src/com/android/dialer/calllog/CallDetailHistoryAdapter.java
+++ b/src/com/android/dialer/calllog/CallDetailHistoryAdapter.java
@@ -26,6 +26,7 @@ import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
+import com.android.contacts.common.CallUtil;
import com.android.dialer.PhoneCallDetails;
import com.android.dialer.R;
import com.android.dialer.util.DialerUtils;
@@ -123,7 +124,7 @@ public class CallDetailHistoryAdapter extends BaseAdapter {
int callType = details.callTypes[0];
boolean isVideoCall = (details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO
- && DialerUtils.isVideoEnabled();
+ && CallUtil.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 78a010502..23b70d9ed 100644
--- a/src/com/android/dialer/calllog/CallLogListItemHelper.java
+++ b/src/com/android/dialer/calllog/CallLogListItemHelper.java
@@ -20,10 +20,10 @@ import android.content.res.Resources;
import android.provider.CallLog.Calls;
import android.text.TextUtils;
+import com.android.contacts.common.CallUtil;
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.
@@ -155,7 +155,7 @@ import com.android.dialer.util.DialerUtils;
// If call had video capabilities, add the "Video Call" string.
if ((details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO &&
- DialerUtils.isVideoEnabled()) {
+ CallUtil.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 8e4382c0f..b1223b74f 100644
--- a/src/com/android/dialer/list/RegularSearchListAdapter.java
+++ b/src/com/android/dialer/list/RegularSearchListAdapter.java
@@ -21,12 +21,12 @@ import android.net.Uri;
import android.provider.ContactsContract;
import android.text.TextUtils;
+import com.android.contacts.common.CallUtil;
import com.android.contacts.common.list.DirectoryPartition;
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.
@@ -75,7 +75,7 @@ public class RegularSearchListAdapter extends DialerPhoneNumberListAdapter {
// Otherwise, it should add it to a new contact as a name.
setShortcutEnabled(SHORTCUT_ADD_NUMBER_TO_CONTACTS, showNumberShortcuts);
setShortcutEnabled(SHORTCUT_MAKE_VIDEO_CALL,
- showNumberShortcuts && DialerUtils.isVideoEnabled());
+ showNumberShortcuts && CallUtil.isVideoEnabled());
super.setQueryString(queryString);
}
}
diff --git a/src/com/android/dialer/list/SmartDialNumberListAdapter.java b/src/com/android/dialer/list/SmartDialNumberListAdapter.java
index 231611db3..898115a74 100644
--- a/src/com/android/dialer/list/SmartDialNumberListAdapter.java
+++ b/src/com/android/dialer/list/SmartDialNumberListAdapter.java
@@ -25,6 +25,7 @@ import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
import android.util.Log;
+import com.android.contacts.common.CallUtil;
import com.android.contacts.common.list.ContactListItemView;
import com.android.contacts.common.list.PhoneNumberListAdapter;
import com.android.contacts.common.list.PhoneNumberListAdapter.PhoneQuery;
@@ -32,7 +33,6 @@ 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;
@@ -120,7 +120,7 @@ public class SmartDialNumberListAdapter extends DialerPhoneNumberListAdapter {
final boolean showNumberShortcuts = !TextUtils.isEmpty(getFormattedQueryString());
setShortcutEnabled(SHORTCUT_ADD_NUMBER_TO_CONTACTS, showNumberShortcuts);
setShortcutEnabled(SHORTCUT_MAKE_VIDEO_CALL,
- showNumberShortcuts && DialerUtils.isVideoEnabled());
+ showNumberShortcuts && CallUtil.isVideoEnabled());
super.setQueryString(queryString);
}
}
diff --git a/src/com/android/dialer/util/DialerUtils.java b/src/com/android/dialer/util/DialerUtils.java
index 7f6e75b57..686884a5c 100644
--- a/src/com/android/dialer/util/DialerUtils.java
+++ b/src/com/android/dialer/util/DialerUtils.java
@@ -183,10 +183,4 @@ 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;
- }
}