From a46ed83a7ccba16bbfd791a3a6588d5f0add9526 Mon Sep 17 00:00:00 2001 From: Brad Ebinger Date: Wed, 30 Mar 2016 18:24:42 -0700 Subject: Add via number to CallLog Account entry Call Log now provides the phone number that an incoming call was received on if that number is different than the SIM subscription number. This "via number" is appended to the Phone Account of the Call Log entry in Dialer if it exists. Screenshots: - One PhoneAccount: http://screen/HuCSL0U6jU6.png - Multiple PhoneAccounts: http://screen/pDg8F9zpMei.png Bug: 25594198 Change-Id: I8c05ea98409e54d20493fbdb20096bf851480719 --- src/com/android/dialer/calllog/CallLogAdapter.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/com/android/dialer/calllog/CallLogAdapter.java') diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index 165594efa..3958611b9 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -490,15 +490,17 @@ public class CallLogAdapter extends GroupingListAdapter int count = getGroupSize(position); final String number = c.getString(CallLogQuery.NUMBER); + final String countryIso = c.getString(CallLogQuery.COUNTRY_ISO); final String postDialDigits = CompatUtils.isNCompatible() && mActivityType != ACTIVITY_TYPE_ARCHIVE ? c.getString(CallLogQuery.POST_DIAL_DIGITS) : ""; - + final String viaNumber = CompatUtils.isNCompatible() + && mActivityType != ACTIVITY_TYPE_ARCHIVE ? + c.getString(CallLogQuery.VIA_NUMBER) : ""; final int numberPresentation = c.getInt(CallLogQuery.NUMBER_PRESENTATION); final PhoneAccountHandle accountHandle = PhoneAccountUtils.getAccount( c.getString(CallLogQuery.ACCOUNT_COMPONENT_NAME), c.getString(CallLogQuery.ACCOUNT_ID)); - final String countryIso = c.getString(CallLogQuery.COUNTRY_ISO); final ContactInfo cachedContactInfo = ContactInfoHelper.getContactInfo(c); final boolean isVoicemailNumber = mCallLogCache.isVoicemailNumber(accountHandle, number); @@ -518,6 +520,7 @@ public class CallLogAdapter extends GroupingListAdapter final PhoneCallDetails details = new PhoneCallDetails( mContext, number, numberPresentation, formattedNumber, postDialDigits, isVoicemailNumber); + details.viaNumber = viaNumber; details.accountHandle = accountHandle; details.countryIso = countryIso; details.date = c.getLong(CallLogQuery.DATE); -- cgit v1.2.3