From a9a82f52cbcadd0b9a4aafa0c785c0d6af629f1c Mon Sep 17 00:00:00 2001 From: Santos Cordon Date: Fri, 6 Feb 2015 04:34:32 -0800 Subject: Add cache for isVoicemail check. bindView() gets called many times at dialer startup and layout updates. Besides being costly, it invokes cross-process TelecomManager methods. This change addresses the cross-process issues by adding a short-lived cache to isVoicemail() method invocations. Change-Id: Ib69c0eb3969a1b7d77c9fd1a2aa6e578a31fb5e9 --- src/com/android/dialer/calllog/CallLogAdapter.java | 2 ++ 1 file changed, 2 insertions(+) (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 9c50a3b73..b6f91e75b 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -631,6 +631,8 @@ public class CallLogAdapter extends GroupingListAdapter /** * Binds the views in the entry to the data in the call log. + * TODO: This gets called 20-30 times when Dialer starts up for a single call log entry and + * should not. It invokes cross-process methods and the repeat execution can get costly. * * @param callLogItemView the view corresponding to this entry * @param c the cursor pointing to the entry in the call log -- cgit v1.2.3