summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2015-07-07 14:26:22 -0700
committerYorke Lee <yorkelee@google.com>2015-07-07 14:26:22 -0700
commit049203f6f27e66581133e7c1550bfe73e2ca50cf (patch)
treedb2f9a0431d69fa9d1ff7165e768675b0a9fb860 /src
parente3189a4ad7597711222589b22db1a91415641ca6 (diff)
Don't auto-expand first call log entry
Bug: 22278550 Change-Id: I756703c9441801c623b9dbcbe0d96803de2a3063
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/calllog/CallLogAdapter.java23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java
index 510847264..458c90bdc 100644
--- a/src/com/android/dialer/calllog/CallLogAdapter.java
+++ b/src/com/android/dialer/calllog/CallLogAdapter.java
@@ -108,8 +108,6 @@ public class CallLogAdapter extends GroupingListAdapter
// Tracks the rowId of the currently expanded list item, so the position can be updated if there
// are any changes to the call log entries, such as additions or removals.
private long mCurrentlyExpandedRowId = NO_EXPANDED_LIST_ITEM;
- // Whether the first call log list item has been automatically expanded for a new cursor.
- private boolean mHasBoundFirstView;
/**
* Hashmap, keyed by call Id, used to track the day group for a call. As call log entries are
@@ -359,19 +357,6 @@ public class CallLogAdapter extends GroupingListAdapter
mCallFetcher.fetchCalls();
}
- @Override
- public void changeCursor(Cursor cursor) {
- // 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);
- }
-
public void setLoading(boolean loading) {
mLoading = loading;
}
@@ -581,14 +566,8 @@ 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 && 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;
}
+
views.showActions(mCurrentlyExpandedPosition == position);
String nameForDefaultImage = null;