summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2015-07-28 23:08:31 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-07-28 23:08:31 +0000
commit43b29a487c222259f500de7a142c846e464beb47 (patch)
treee100eb311489b3aa1d4da08fdc5830bfb25623f5
parent1f29f08b8cf5550e639a512540092ab00a14633f (diff)
parent0083bf28badde4c26e455d9a776c0070d4a71acf (diff)
am 0083bf28: am 3a95857a: am 4d4eb463: am bb15144e: am 142362f8: Start contact info cache query thread in onResume
* commit '0083bf28badde4c26e455d9a776c0070d4a71acf': Start contact info cache query thread in onResume
-rw-r--r--src/com/android/dialer/calllog/CallLogAdapter.java6
-rw-r--r--src/com/android/dialer/calllog/CallLogFragment.java1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java
index 25cf4d092..20c206c0f 100644
--- a/src/com/android/dialer/calllog/CallLogAdapter.java
+++ b/src/com/android/dialer/calllog/CallLogAdapter.java
@@ -393,6 +393,12 @@ public class CallLogAdapter extends GroupingListAdapter
mContactInfoCache.invalidate();
}
+ public void startCache() {
+ if (PermissionsUtil.hasPermission(mContext, android.Manifest.permission.READ_CONTACTS)) {
+ mContactInfoCache.start();
+ }
+ }
+
public void pauseCache() {
mContactInfoCache.stop();
mTelecomCallLogCache.reset();
diff --git a/src/com/android/dialer/calllog/CallLogFragment.java b/src/com/android/dialer/calllog/CallLogFragment.java
index 59e2c7f38..e7b77646d 100644
--- a/src/com/android/dialer/calllog/CallLogFragment.java
+++ b/src/com/android/dialer/calllog/CallLogFragment.java
@@ -338,6 +338,7 @@ public class CallLogFragment extends Fragment implements CallLogQueryHandler.Lis
}
mHasReadCallLogPermission = hasReadCallLogPermission;
refreshData();
+ mAdapter.startCache();
}
@Override