diff options
-rw-r--r-- | src/com/android/dialer/calllog/CallLogAdapter.java | 11 | ||||
-rw-r--r-- | src/com/android/dialer/calllog/CallLogListItemViews.java | 2 | ||||
-rw-r--r-- | src/com/android/dialer/calllog/IntentProvider.java | 8 |
3 files changed, 14 insertions, 7 deletions
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index a8c20feb0..79b602429 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -675,7 +675,8 @@ public class CallLogAdapter extends GroupingListAdapter views.number = number; views.numberPresentation = numberPresentation; views.callType = callType; - views.mAccountHandle = accountHandle; + // NOTE: This is currently not being used, but can be used in future versions. + views.accountHandle = 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); @@ -693,8 +694,7 @@ public class CallLogAdapter extends GroupingListAdapter // Set return call intent, otherwise null. if (PhoneNumberUtilsWrapper.canPlaceCallsTo(number, numberPresentation)) { // Sets the primary action to call the number. - views.primaryActionView.setTag(IntentProvider.getReturnCallIntentProvider(number, - accountHandle)); + views.primaryActionView.setTag(IntentProvider.getReturnCallIntentProvider(number)); } else { // Number is not callable, so hide button. views.primaryActionView.setTag(null); @@ -985,7 +985,7 @@ public class CallLogAdapter extends GroupingListAdapter if (canPlaceCallToNumber) { // Sets the primary action to call the number. views.callBackButtonView.setTag( - IntentProvider.getReturnCallIntentProvider(views.number, views.mAccountHandle)); + IntentProvider.getReturnCallIntentProvider(views.number)); views.callBackButtonView.setVisibility(View.VISIBLE); views.callBackButtonView.setOnClickListener(mActionListener); } else { @@ -997,8 +997,7 @@ public class CallLogAdapter extends GroupingListAdapter // If one of the calls had video capabilities, show the video call button. if (canPlaceCallToNumber && views.phoneCallDetailsViews.callTypeIcons.isVideoShown()) { views.videoCallButtonView.setTag( - IntentProvider.getReturnVideoCallIntentProvider(views.number, - views.mAccountHandle)); + IntentProvider.getReturnVideoCallIntentProvider(views.number)); views.videoCallButtonView.setVisibility(View.VISIBLE); views.videoCallButtonView.setOnClickListener(mActionListener); } else { diff --git a/src/com/android/dialer/calllog/CallLogListItemViews.java b/src/com/android/dialer/calllog/CallLogListItemViews.java index 21e0cb0cd..e95d7b050 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 mAccountHandle; + public PhoneAccountHandle accountHandle; /** * 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 517d9e754..11dd69f33 100644 --- a/src/com/android/dialer/calllog/IntentProvider.java +++ b/src/com/android/dialer/calllog/IntentProvider.java @@ -37,6 +37,10 @@ public abstract class IntentProvider { public abstract Intent getIntent(Context context); + public static IntentProvider getReturnCallIntentProvider(final String number) { + return getReturnCallIntentProvider(number, null); + } + public static IntentProvider getReturnCallIntentProvider(final String number, final PhoneAccountHandle accountHandle) { return new IntentProvider() { @@ -47,6 +51,10 @@ public abstract class IntentProvider { }; } + public static IntentProvider getReturnVideoCallIntentProvider(final String number) { + return getReturnVideoCallIntentProvider(number, null); + } + public static IntentProvider getReturnVideoCallIntentProvider(final String number, final PhoneAccountHandle accountHandle) { return new IntentProvider() { |