From a2eadf3d68d4f6d0a948d37bc48e930115723ce0 Mon Sep 17 00:00:00 2001 From: Evan Charlton Date: Sun, 20 Jul 2014 12:31:41 -0700 Subject: Rename PhoneAccountMetadata to PhoneAccount Change-Id: I4597b14110c1cee7f637ec125b839852ef0f34c4 --- src/com/android/dialer/calllog/CallLogAdapter.java | 16 ++++++++-------- src/com/android/dialer/calllog/CallLogListItemViews.java | 2 +- src/com/android/dialer/calllog/IntentProvider.java | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src/com/android') diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index 51cc95b0a..e83144185 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -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 PhoneAccountHandle 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); @@ -980,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 { @@ -993,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 { @@ -1262,7 +1262,7 @@ public class CallLogAdapter extends GroupingListAdapter return features; } - private PhoneAccountHandle 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); diff --git a/src/com/android/dialer/calllog/CallLogListItemViews.java b/src/com/android/dialer/calllog/CallLogListItemViews.java index b5b063c0b..21e0cb0cd 100644 --- a/src/com/android/dialer/calllog/CallLogListItemViews.java +++ b/src/com/android/dialer/calllog/CallLogListItemViews.java @@ -87,7 +87,7 @@ public final class CallLogListItemViews { * The account for the current call log entry. Cached here as the call back * intent is set only when the actions ViewStub is inflated. */ - public PhoneAccountHandle mAccount; + public PhoneAccountHandle mAccountHandle; /** * If the call has an associated voicemail message, the URI of the voicemail message for diff --git a/src/com/android/dialer/calllog/IntentProvider.java b/src/com/android/dialer/calllog/IntentProvider.java index 0bf7084dc..517d9e754 100644 --- a/src/com/android/dialer/calllog/IntentProvider.java +++ b/src/com/android/dialer/calllog/IntentProvider.java @@ -38,21 +38,21 @@ public abstract class IntentProvider { public abstract Intent getIntent(Context context); public static IntentProvider getReturnCallIntentProvider(final String number, - final PhoneAccountHandle account) { + final PhoneAccountHandle accountHandle) { return new IntentProvider() { @Override public Intent getIntent(Context context) { - return CallUtil.getCallIntent(number, account); + return CallUtil.getCallIntent(number, accountHandle); } }; } public static IntentProvider getReturnVideoCallIntentProvider(final String number, - final PhoneAccountHandle account) { + final PhoneAccountHandle accountHandle) { return new IntentProvider() { @Override public Intent getIntent(Context context) { - return CallUtil.getVideoCallIntent(number, account); + return CallUtil.getVideoCallIntent(number, accountHandle); } }; } -- cgit v1.2.3