diff options
author | Yorke Lee <yorkelee@google.com> | 2015-07-28 18:45:49 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-07-28 18:45:49 +0000 |
commit | 6c95311d3ba01b477737d2a5ff662b342cdc3690 (patch) | |
tree | e493f36c033b379a9e78e1088967e148c358a2bc | |
parent | 320946ebafe24dcecd7d92bf9f7717fdf3ccbff9 (diff) | |
parent | 547661c110e349f2978761ac29d32f4d7b4e7df0 (diff) |
am 547661c1: am f5295b11: am c00b4968: am d57bb10f: am 601eadd8: Remove onPreDrawListener logic
* commit '547661c110e349f2978761ac29d32f4d7b4e7df0':
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 6ab779838..25cf4d092 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -66,8 +66,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. */ @@ -97,7 +96,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; @@ -320,16 +318,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, @@ -401,21 +389,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() { @@ -611,12 +586,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 |