diff options
-rw-r--r-- | src/com/android/dialer/calllog/CallLogListItemViewHolder.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java index 4b208f14a..365290077 100644 --- a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java +++ b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java @@ -347,9 +347,11 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder { observer.addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() { @Override public boolean onPreDraw() { - if (observer.isAlive()) { - observer.removeOnPreDrawListener(this); + ViewTreeObserver vto = observer; + if (!vto.isAlive()) { + vto = actionsView.getViewTreeObserver(); } + vto.removeOnPreDrawListener(this); // TODO: Animate, instead of immediately resizing. int currentHeight = primaryActionView.getHeight(); |