summaryrefslogtreecommitdiffstats
path: root/src/com/android/dialer/PhoneCallDetailsHelper.java
diff options
context:
space:
mode:
authorqqzhou <qqzhou@codeaurora.org>2015-03-09 20:32:44 +0800
committerNatiq Ahmed <mnatiq@codeaurora.org>2015-03-13 15:00:47 +0530
commit0bdb14f57133bee5b52505a9a107f706799cee38 (patch)
tree4a08cd45edaa3a0f79b25930c3dbcb0eb41a7d5e /src/com/android/dialer/PhoneCallDetailsHelper.java
parent698f9a627e5f538db8bf95f4b1992ff6beb9bbf7 (diff)
downloadandroid_packages_apps_Dialer-0bdb14f57133bee5b52505a9a107f706799cee38.tar.gz
android_packages_apps_Dialer-0bdb14f57133bee5b52505a9a107f706799cee38.tar.bz2
android_packages_apps_Dialer-0bdb14f57133bee5b52505a9a107f706799cee38.zip
Dialer: fix compilation errors
There are some compilation errors when upgrade with some selective google L_mr1 patches. Change-Id: I252078ab115d28184fd03c4f63024e671c59be88
Diffstat (limited to 'src/com/android/dialer/PhoneCallDetailsHelper.java')
-rwxr-xr-x[-rw-r--r--]src/com/android/dialer/PhoneCallDetailsHelper.java25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/com/android/dialer/PhoneCallDetailsHelper.java b/src/com/android/dialer/PhoneCallDetailsHelper.java
index 031a87737..1956085c5 100644..100755
--- a/src/com/android/dialer/PhoneCallDetailsHelper.java
+++ b/src/com/android/dialer/PhoneCallDetailsHelper.java
@@ -16,6 +16,7 @@
package com.android.dialer;
+import android.content.Context;
import android.content.res.Resources;
import android.provider.CallLog;
import android.provider.CallLog.Calls;
@@ -50,6 +51,7 @@ public class PhoneCallDetailsHelper {
/** The maximum number of icons will be shown to represent the call types in a group. */
private static final int MAX_CALL_TYPE_ICONS = 3;
+ private final Context mContext;
private final Resources mResources;
/** The injected current time in milliseconds since the epoch. Used only by tests. */
private Long mCurrentTimeMillisForTest;
@@ -69,8 +71,9 @@ public class PhoneCallDetailsHelper {
*
* @param resources used to look up strings
*/
- public PhoneCallDetailsHelper(Resources resources, CallTypeHelper callTypeHelper,
+ public PhoneCallDetailsHelper(Context context, Resources resources,
PhoneNumberUtilsWrapper phoneUtils) {
+ mContext = context;
mResources = resources;
mPhoneNumberUtilsWrapper = phoneUtils;
mPhoneNumberHelper = new PhoneNumberDisplayHelper(mPhoneNumberUtilsWrapper, resources);
@@ -114,9 +117,24 @@ public class PhoneCallDetailsHelper {
// Set the call count, location and date.
setCallCountAndDate(views, callCount, callLocationAndDate);
- // Set the account label if it exists.
- String accountLabel = PhoneAccountUtils.getAccountLabel(mContext, details.accountHandle);
+ // set the account icon if it exists
+ if (details.accountIcon != null) {
+ if (MoreContactUtils.shouldShowOperator(mResources)) {
+ views.operator.setVisibility(View.VISIBLE);
+ views.operator.setText(details.operator);
+ views.callAccountIcon.setVisibility(View.GONE);
+ } else {
+ views.operator.setVisibility(View.GONE);
+ views.callAccountIcon.setVisibility(View.VISIBLE);
+ views.callAccountIcon.setImageDrawable(details.accountIcon);
+ }
+ } else {
+ views.callAccountIcon.setVisibility(View.GONE);
+ }
+ /*
+ // Set the account label if it exists.
+ String accountLabel = details.accountLabel;
if (accountLabel != null) {
views.callAccountLabel.setVisibility(View.VISIBLE);
views.callAccountLabel.setText(accountLabel);
@@ -130,6 +148,7 @@ public class PhoneCallDetailsHelper {
} else {
views.callAccountLabel.setVisibility(View.GONE);
}
+ */
CharSequence nameText;
CharSequence displayNumber =