diff options
author | Yorke Lee <yorkelee@google.com> | 2015-07-27 23:41:01 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-07-27 23:41:01 +0000 |
commit | f5295b114e0218534ffdb60a650f41efe1fda56d (patch) | |
tree | b345eee24d1ef232b1ac0face130996a7923872c | |
parent | 633e5c943cb1b6bf75c6f160b90def0d4da7c412 (diff) | |
parent | c00b49680025d0a1575262716d34456e03d4c37f (diff) |
am c00b4968: am d57bb10f: am 601eadd8: Remove onPreDrawListener logic
* commit 'c00b49680025d0a1575262716d34456e03d4c37f':
Remove onPreDrawListener logic
-rw-r--r-- | src/com/android/dialer/calllog/CallLogAdapter.java | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index 9609e4d6f..54552914a 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -65,8 +65,7 @@ import java.util.HashMap; * Adapter class to fill in data for the Call Log. */ public class CallLogAdapter extends GroupingListAdapter - implements ViewTreeObserver.OnPreDrawListener, - CallLogGroupBuilder.GroupCreator, + implements CallLogGroupBuilder.GroupCreator, VoicemailPlaybackPresenter.OnVoicemailDeletedListener { /** Interface used to initiate a refresh of the content. */ @@ -96,7 +95,6 @@ public class CallLogAdapter extends GroupingListAdapter private final ContactInfoHelper mContactInfoHelper; private final VoicemailPlaybackPresenter mVoicemailPlaybackPresenter; private final CallFetcher mCallFetcher; - private ViewTreeObserver mViewTreeObserver = null; protected ContactInfoCache mContactInfoCache; @@ -294,16 +292,6 @@ public class CallLogAdapter extends GroupingListAdapter } }; - @Override - public boolean onPreDraw() { - // We only wanted to listen for the first draw (and this is it). - unregisterPreDrawListener(); - if (PermissionsUtil.hasContactsPermissions(mContext)) { - mContactInfoCache.start(); - } - return true; - } - public CallLogAdapter( Context context, CallFetcher callFetcher, @@ -375,21 +363,8 @@ public class CallLogAdapter extends GroupingListAdapter } } - /** - * Stop receiving onPreDraw() notifications. - */ - private void unregisterPreDrawListener() { - if (mViewTreeObserver != null && mViewTreeObserver.isAlive()) { - mViewTreeObserver.removeOnPreDrawListener(this); - } - mViewTreeObserver = null; - } - public void invalidateCache() { mContactInfoCache.invalidate(); - - // Restart the request-processing thread after the next draw. - unregisterPreDrawListener(); } public void pauseCache() { @@ -585,12 +560,6 @@ public class CallLogAdapter extends GroupingListAdapter isVoicemailNumber, mContactInfoHelper.isBusiness(info.sourceType)); mCallLogListItemHelper.setPhoneCallDetails(views, details); - - // Listen for the first draw - if (mViewTreeObserver == null) { - mViewTreeObserver = views.rootView.getViewTreeObserver(); - mViewTreeObserver.addOnPreDrawListener(this); - } } @Override |