summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2015-07-07 22:01:02 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-07-07 22:01:02 +0000
commitabe85e26d083a1d9648f8ac0f945e9cb79ad4447 (patch)
tree8b751bbeffdc9ad4c96226ce05ee2edb5616df52
parentee36c51fe8ccb8d15cb34f088965712d82070d79 (diff)
parente2fe71e0cdb86a2b25ce5e0c4bbe6ace0952e258 (diff)
am e2fe71e0: Merge "Don\'t auto-expand first call log entry" into mnc-dev
* commit 'e2fe71e0cdb86a2b25ce5e0c4bbe6ace0952e258': Don't auto-expand first call log entry
-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;