summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/DialtactsActivity.java3
-rw-r--r--src/com/android/dialer/calllog/CallLogAdapter.java23
-rw-r--r--src/com/android/dialer/calllog/CallLogFragment.java14
3 files changed, 4 insertions, 36 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index 52a33f2b3..e714c7880 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -29,6 +29,7 @@ import android.content.res.Resources;
import android.net.Uri;
import android.os.Bundle;
import android.os.Trace;
+import android.provider.CallLog.Calls;
import android.speech.RecognizerIntent;
import android.support.v4.view.ViewPager;
import android.telecom.PhoneAccount;
@@ -553,6 +554,8 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
if (index < mListsFragment.getTabCount()) {
mListsFragment.showTab(index);
}
+ } else if (Calls.CONTENT_TYPE.equals(getIntent().getType())) {
+ mListsFragment.showTab(ListsFragment.TAB_INDEX_RECENTS);
}
Trace.endSection();
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;
diff --git a/src/com/android/dialer/calllog/CallLogFragment.java b/src/com/android/dialer/calllog/CallLogFragment.java
index 21ea97ea6..5d7c408ce 100644
--- a/src/com/android/dialer/calllog/CallLogFragment.java
+++ b/src/com/android/dialer/calllog/CallLogFragment.java
@@ -292,20 +292,6 @@ public class CallLogFragment extends Fragment
mAdapter.onRestoreInstanceState(savedInstanceState);
}
- /**
- * Based on the new intent, decide whether the list should be configured
- * to scroll up to display the first item.
- */
- public void configureScreenFromIntent(Intent newIntent) {
- // Typically, when switching to the call-log we want to show the user
- // the same section of the list that they were most recently looking
- // at. However, under some circumstances, we want to automatically
- // scroll to the top of the list to present the newest call items.
- // For example, immediately after a call is finished, we want to
- // display information about that call.
- mScrollToTop = Calls.CONTENT_TYPE.equals(newIntent.getType());
- }
-
@Override
public void onStart() {
// Start the empty loader now to defer other fragments. We destroy it when both calllog