summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2015-07-03 20:34:11 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-07-03 20:34:11 +0000
commit3e8ece842c6b796b6223c60e9d2b3ce0489066d9 (patch)
treedc4a2ed3250a9d3dcaf95998cd0d82717510aa7f /src
parentf215e5a9c0e3492488b10c1f65e7f76fd7e12b6f (diff)
parent6ac8f65affabae0dcc20d1bab0097fbd9d987ae2 (diff)
am 6ac8f65a: am 54702837: am b3bd721b: Merge "Don\'t auto-expand first voicemail card" into mnc-dev
* commit '6ac8f65affabae0dcc20d1bab0097fbd9d987ae2': Don't auto-expand first voicemail card
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/calllog/CallLogAdapter.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java
index 83e55944f..510847264 100644
--- a/src/com/android/dialer/calllog/CallLogAdapter.java
+++ b/src/com/android/dialer/calllog/CallLogAdapter.java
@@ -361,10 +361,13 @@ public class CallLogAdapter extends GroupingListAdapter
@Override
public void changeCursor(Cursor cursor) {
- // Data has changed; reset so that the first call log list item will be expanded.
- mHasBoundFirstView = false;
- mCurrentlyExpandedPosition = RecyclerView.NO_POSITION;
- mCurrentlyExpandedRowId = NO_EXPANDED_LIST_ITEM;
+ // Don't auto-expand the first item for the voicemail list fragment since that will
+ // trigger an unwanted voicemail download and playback.
+ if (mVoicemailPlaybackPresenter == null) {
+ mHasBoundFirstView = false;
+ mCurrentlyExpandedPosition = RecyclerView.NO_POSITION;
+ mCurrentlyExpandedRowId = NO_EXPANDED_LIST_ITEM;
+ }
super.changeCursor(cursor);
}
@@ -578,8 +581,10 @@ public class CallLogAdapter extends GroupingListAdapter
// In case ViewHolders were added/removed, update the expanded position if the rowIds
// match so that we can restore the correct expanded state on rebind.
mCurrentlyExpandedPosition = position;
- } else if (!mHasBoundFirstView) {
+ } else if (!mHasBoundFirstView && mVoicemailPlaybackPresenter == null) {
// Expand the first view when loading the call log to expose the actions.
+ // Don't auto-expand the first item for the voicemail list fragment since that will
+ // trigger an unwanted voicemail download and playback.
mCurrentlyExpandedRowId = views.rowId;
mCurrentlyExpandedPosition = position;
mHasBoundFirstView = true;