diff options
author | Yorke Lee <yorkelee@google.com> | 2015-07-28 21:46:57 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-07-28 21:46:57 +0000 |
commit | bb15144e72c87ea571e8718b1d788c7a83acbb04 (patch) | |
tree | 0d08981cdb9f9702445dd7f37f7e1e183c811e5c | |
parent | 0fc67af1e66405946b3af2da3be6595c2e981648 (diff) | |
parent | 142362f8253e7456640c14d6acaf1969afc4b68d (diff) |
am 142362f8: Start contact info cache query thread in onResume
* commit '142362f8253e7456640c14d6acaf1969afc4b68d':
Start contact info cache query thread in onResume
-rw-r--r-- | src/com/android/dialer/calllog/CallLogAdapter.java | 6 | ||||
-rw-r--r-- | src/com/android/dialer/calllog/CallLogFragment.java | 1 |
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 54552914a..85d1c383a 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -367,6 +367,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 |