summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-10-22 14:14:50 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-22 14:14:50 -0700
commit8258812c8dbe198d5fd542eccb8bf7f0b2cb461f (patch)
tree3ccc9f70d0f58b8e6c23f9331248a6efc0593017 /src/com/android
parentf9efc5d941b06862d8e0e3906ec9d05cee3dd1c8 (diff)
parent3a9b311556e967bd9deab6a258218fe4154867c9 (diff)
downloadpackages_apps_Dialer-8258812c8dbe198d5fd542eccb8bf7f0b2cb461f.tar.gz
packages_apps_Dialer-8258812c8dbe198d5fd542eccb8bf7f0b2cb461f.tar.bz2
packages_apps_Dialer-8258812c8dbe198d5fd542eccb8bf7f0b2cb461f.zip
am 3a9b3115: am 32443904: am 934d3ee3: Fix call log jank
* commit '3a9b311556e967bd9deab6a258218fe4154867c9': Fix call log jank
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/dialer/calllog/CallLogAdapter.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java
index 9392410d1..e4fd0d897 100644
--- a/src/com/android/dialer/calllog/CallLogAdapter.java
+++ b/src/com/android/dialer/calllog/CallLogAdapter.java
@@ -388,7 +388,16 @@ public class CallLogAdapter extends GroupingListAdapter
NumberWithCountryIso numberCountryIso = new NumberWithCountryIso(number, countryIso);
ContactInfo existingInfo = mContactInfoCache.getPossiblyExpired(numberCountryIso);
- boolean updated = !info.equals(existingInfo);
+ final boolean isRemoteSource = info.sourceType != 0;
+
+ // Don't force redraw if existing info in the cache is equal to {@link ContactInfo#EMPTY}
+ // to avoid updating the data set for every new row that is scrolled into view.
+ // see (https://googleplex-android-review.git.corp.google.com/#/c/166680/)
+
+ // Exception: Photo uris for contacts from remote sources are not cached in the call log
+ // cache, so we have to force a redraw for these contacts regardless.
+ boolean updated = (existingInfo != ContactInfo.EMPTY || isRemoteSource) &&
+ !info.equals(existingInfo);
// Store the data in the cache so that the UI thread can use to display it. Store it
// even if it has not changed so that it is marked as not expired.