Go to recents tab instead of CallLogActivity for call views.

Use the DialtactsActivity instead of CallLogActivity when
accepting ACTION_VIEW intents for the "calls" mime type.
Also remove an unused method in CallLogFragment.

Bug: 22266705
Change-Id: I1bf089901b1a5f9534c9f7a8484c12e535a87749
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index cf69358..2b0447d 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -113,6 +113,12 @@
                 <data android:scheme="tel" />
             </intent-filter>
             <intent-filter>
+                <action android:name="android.intent.action.VIEW" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.BROWSABLE" />
+                <data android:mimeType="vnd.android.cursor.dir/calls" />
+            </intent-filter>
+            <intent-filter>
                 <action android:name="android.intent.action.CALL_BUTTON" />
                 <category android:name="android.intent.category.DEFAULT" />
                 <category android:name="android.intent.category.BROWSABLE" />
@@ -145,12 +151,6 @@
             android:label="@string/call_log_activity_title"
             android:theme="@style/DialtactsThemeWithoutActionBarOverlay"
             android:icon="@mipmap/ic_launcher_phone">
-            <intent-filter>
-                <action android:name="android.intent.action.VIEW" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.BROWSABLE" />
-                <data android:mimeType="vnd.android.cursor.dir/calls" />
-            </intent-filter>
         </activity>
 
         <activity android:name="com.android.dialer.CallDetailActivity"
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index 52a33f2..e714c78 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -29,6 +29,7 @@
 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 @@
             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/CallLogFragment.java b/src/com/android/dialer/calllog/CallLogFragment.java
index 21ea97e..5d7c408 100644
--- a/src/com/android/dialer/calllog/CallLogFragment.java
+++ b/src/com/android/dialer/calllog/CallLogFragment.java
@@ -292,20 +292,6 @@
         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