summaryrefslogtreecommitdiff
path: root/src/com/android/dialer/calllog/CallLogAdapter.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/dialer/calllog/CallLogAdapter.java')
-rw-r--r--src/com/android/dialer/calllog/CallLogAdapter.java26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java
index 16be30871..e83144185 100644
--- a/src/com/android/dialer/calllog/CallLogAdapter.java
+++ b/src/com/android/dialer/calllog/CallLogAdapter.java
@@ -27,7 +27,7 @@ import android.os.Handler;
import android.os.Message;
import android.provider.CallLog.Calls;
import android.provider.ContactsContract.PhoneLookup;
-import android.telecomm.PhoneAccount;
+import android.telecomm.PhoneAccountHandle;
import android.telecomm.TelecommManager;
import android.text.TextUtils;
import android.view.LayoutInflater;
@@ -592,7 +592,7 @@ public class CallLogAdapter extends GroupingListAdapter
@Override
protected View newChildView(Context context, ViewGroup parent) {
- LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+ LayoutInflater inflater = LayoutInflater.from(context);
View view = inflater.inflate(R.layout.call_log_list_item, parent, false);
// Get the views to bind to and cache them.
@@ -644,9 +644,9 @@ public class CallLogAdapter extends GroupingListAdapter
final long date = c.getLong(CallLogQuery.DATE);
final long duration = c.getLong(CallLogQuery.DURATION);
final int callType = c.getInt(CallLogQuery.CALL_TYPE);
- final PhoneAccount account = getAccount(c);
- final Drawable accountIcon = account == null ? null :
- TelecommManager.from(mContext).getPhoneAccountMetadata(account).getIcon(mContext);
+ final PhoneAccountHandle accountHandle = getAccountHandle(c);
+ final Drawable accountIcon = accountHandle == null ? null :
+ TelecommManager.from(mContext).getPhoneAccount(accountHandle).getIcon(mContext);
final String countryIso = c.getString(CallLogQuery.COUNTRY_ISO);
final long rowId = c.getLong(CallLogQuery.ID);
views.rowId = rowId;
@@ -671,7 +671,7 @@ public class CallLogAdapter extends GroupingListAdapter
views.number = number;
views.numberPresentation = numberPresentation;
views.callType = callType;
- views.mAccount = account;
+ views.mAccountHandle = accountHandle;
views.voicemailUri = c.getString(CallLogQuery.VOICEMAIL_URI);
// Stash away the Ids of the calls so that we can support deleting a row in the call log.
views.callIds = getCallIds(c, count);
@@ -690,7 +690,7 @@ public class CallLogAdapter extends GroupingListAdapter
if (PhoneNumberUtilsWrapper.canPlaceCallsTo(number, numberPresentation)) {
// Sets the primary action to call the number.
views.primaryActionView.setTag(IntentProvider.getReturnCallIntentProvider(number,
- account));
+ accountHandle));
} else {
// Number is not callable, so hide button.
views.primaryActionView.setTag(null);
@@ -894,7 +894,8 @@ public class CallLogAdapter extends GroupingListAdapter
views.actionsView.setVisibility(View.VISIBLE);
views.actionsView.setAlpha(1.0f);
views.callLogEntryView.setBackgroundColor(mExpandedBackgroundColor);
- callLogItem.setTranslationZ(mExpandedTranslationZ);
+ views.callLogEntryView.setTranslationZ(mExpandedTranslationZ);
+ callLogItem.setTranslationZ(mExpandedTranslationZ); // WAR
// Attempt to give accessibility focus to one of the action buttons.
// This ensures that a user realizes the expansion occurred.
@@ -913,7 +914,8 @@ public class CallLogAdapter extends GroupingListAdapter
}
views.callLogEntryView.setBackgroundColor(mCallLogBackgroundColor);
- callLogItem.setTranslationZ(0);
+ views.callLogEntryView.setTranslationZ(0);
+ callLogItem.setTranslationZ(0); // WAR
}
}
@@ -978,7 +980,7 @@ public class CallLogAdapter extends GroupingListAdapter
if (canPlaceCallToNumber) {
// Sets the primary action to call the number.
views.callBackButtonView.setTag(
- IntentProvider.getReturnCallIntentProvider(views.number, views.mAccount));
+ IntentProvider.getReturnCallIntentProvider(views.number, views.mAccountHandle));
views.callBackButtonView.setVisibility(View.VISIBLE);
views.callBackButtonView.setOnClickListener(mActionListener);
} else {
@@ -991,7 +993,7 @@ public class CallLogAdapter extends GroupingListAdapter
if (canPlaceCallToNumber && views.phoneCallDetailsViews.callTypeIcons.isVideoShown()) {
views.videoCallButtonView.setTag(
IntentProvider.getReturnVideoCallIntentProvider(views.number,
- views.mAccount));
+ views.mAccountHandle));
views.videoCallButtonView.setVisibility(View.VISIBLE);
views.videoCallButtonView.setOnClickListener(mActionListener);
} else {
@@ -1260,7 +1262,7 @@ public class CallLogAdapter extends GroupingListAdapter
return features;
}
- private PhoneAccount getAccount(Cursor c) {
+ private PhoneAccountHandle getAccountHandle(Cursor c) {
final String component_name = c.getString(CallLogQuery.ACCOUNT_COMPONENT_NAME);
final String account_id = c.getString(CallLogQuery.ACCOUNT_ID);