From d9c364df22e3f75d029ec12185f44fedb1aeacb1 Mon Sep 17 00:00:00 2001 From: Nancy Chen Date: Tue, 3 Nov 2015 16:47:57 -0800 Subject: Reset voicemail playback state on special expand action. The accessibilty delegate automatically expands the call log cards when the card is in focus. However, the voicemail state was not being reset when this happened. Make sure to reset the voicemail playback state when expanding the card in this manner. Bug: 24105523 Change-Id: Ife7535980566d7b62959767d7b72df779d275270 --- src/com/android/dialer/calllog/CallLogAdapter.java | 5 +++++ src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index 15519cf77..42b2f230d 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -211,6 +211,11 @@ public class CallLogAdapter extends GroupingListAdapter // function on clicks causes the action views to lose the focus indicator. CallLogListItemViewHolder viewHolder = (CallLogListItemViewHolder) host.getTag(); if (mCurrentlyExpandedPosition != viewHolder.getAdapterPosition()) { + if (mVoicemailPlaybackPresenter != null) { + // Always reset the voicemail playback state on expand. + mVoicemailPlaybackPresenter.resetAll(); + } + expandViewHolderActions((CallLogListItemViewHolder) host.getTag()); } } diff --git a/src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java b/src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java index 33210d358..7d72028b1 100644 --- a/src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java +++ b/src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java @@ -376,8 +376,7 @@ public class VoicemailPlaybackLayout extends LinearLayout @Override public void disableUiElements() { mStartStopButton.setEnabled(false); - mPlaybackSeek.setEnabled(false); - mPlaybackSeek.setThumb(mVoicemailSeekHandleDisabled); + resetSeekBar(); } @Override -- cgit v1.2.3