From d3f6a6c56dec7d47bae1121ed1030f67c26736fe Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Thu, 25 Jun 2015 16:53:56 -0700 Subject: Cache repeated Telecom requests from call log. This improves call log scrolling performance. + Split "Wrapper" into a utility and a cache. + Use cache for repeated calls related to call logs. + In the process of fixing plumbing and typer, moved some phone call detail classes into the more appropriate call log package. + Update tests. Bug: 20524705 Change-Id: Ib8ee21e417c19f98f6474a5793416e8f99103b55 --- src/com/android/dialer/CallDetailActivity.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/com/android/dialer/CallDetailActivity.java') diff --git a/src/com/android/dialer/CallDetailActivity.java b/src/com/android/dialer/CallDetailActivity.java index b851372c0..734e78f46 100644 --- a/src/com/android/dialer/CallDetailActivity.java +++ b/src/com/android/dialer/CallDetailActivity.java @@ -57,9 +57,9 @@ import com.android.dialer.calllog.ContactInfo; import com.android.dialer.calllog.ContactInfoHelper; import com.android.dialer.calllog.PhoneAccountUtils; import com.android.dialer.calllog.PhoneNumberDisplayUtil; -import com.android.dialer.calllog.PhoneNumberUtilsWrapper; -import com.android.dialer.util.IntentUtil; import com.android.dialer.util.DialerUtils; +import com.android.dialer.util.IntentUtil; +import com.android.dialer.util.PhoneNumberUtil; import com.android.dialer.util.TelecomUtil; import java.util.List; @@ -116,11 +116,10 @@ public class CallDetailActivity extends Activity // Cache the details about the phone number. final boolean canPlaceCallsTo = - PhoneNumberUtilsWrapper.canPlaceCallsTo(mNumber, numberPresentation); - final PhoneNumberUtilsWrapper phoneUtils = new PhoneNumberUtilsWrapper(mContext); + PhoneNumberUtil.canPlaceCallsTo(mNumber, numberPresentation); mIsVoicemailNumber = - phoneUtils.isVoicemailNumber(accountHandle, mNumber); - final boolean isSipNumber = PhoneNumberUtilsWrapper.isSipNumber(mNumber); + PhoneNumberUtil.isVoicemailNumber(mContext, accountHandle, mNumber); + final boolean isSipNumber = PhoneNumberUtil.isSipNumber(mNumber); final CharSequence callLocationOrType = getNumberTypeOrLocation(firstDetails); -- cgit v1.2.3