Use an intent action to launch MainActivity instead of class reference to DialtactsActivity.

We can't just replace DialtactsActivity with MainActivity because a circular dependency would be created. Instead create a new dialer-specific "main" intent action and use it.

Bug: 109931227
Test: manual
PiperOrigin-RevId: 199868961
Change-Id: I0ef72ed418280eeb64ea1ea854d215093b0dba27
diff --git a/java/com/android/dialer/app/calllog/CallLogActivity.java b/java/com/android/dialer/app/calllog/CallLogActivity.java
index 017c63a..fdfb3ab 100644
--- a/java/com/android/dialer/app/calllog/CallLogActivity.java
+++ b/java/com/android/dialer/app/calllog/CallLogActivity.java
@@ -31,7 +31,6 @@
 import android.view.MenuItem;
 import android.view.ViewGroup;
 import com.android.contacts.common.list.ViewPagerTabs;
-import com.android.dialer.app.DialtactsActivity;
 import com.android.dialer.app.R;
 import com.android.dialer.calldetails.OldCallDetailsActivity;
 import com.android.dialer.common.Assert;
@@ -157,7 +156,7 @@
 
     if (item.getItemId() == android.R.id.home) {
       PerformanceReport.recordClick(UiAction.Type.CLOSE_CALL_HISTORY_WITH_CANCEL_BUTTON);
-      final Intent intent = new Intent(this, DialtactsActivity.class);
+      final Intent intent = new Intent("com.android.dialer.main.impl.MAIN");
       intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
       startActivity(intent);
       return true;
diff --git a/java/com/android/dialer/main/impl/AndroidManifest.xml b/java/com/android/dialer/main/impl/AndroidManifest.xml
index f0f338a..0643907 100644
--- a/java/com/android/dialer/main/impl/AndroidManifest.xml
+++ b/java/com/android/dialer/main/impl/AndroidManifest.xml
@@ -15,25 +15,31 @@
   ~ limitations under the License
   -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-  package="com.android.dialer.main.impl">
+    package="com.android.dialer.main.impl">
 
   <application>
 
     <!-- TODO(a bug): remove activity themes and only have application wide themes -->
     <activity
-      android:clearTaskOnLaunch="true"
-      android:exported="true"
-      android:directBootAware="true"
-      android:label="@string/main_activity_label"
-      android:launchMode="singleTask"
-      android:name="com.android.dialer.main.impl.MainActivity"
-      android:resizeableActivity="true"
-      android:theme="@style/MainActivityTheme"
-      android:windowSoftInputMode="stateAlwaysHidden|adjustNothing">
+        android:name="com.android.dialer.main.impl.MainActivity"
+        android:clearTaskOnLaunch="true"
+        android:directBootAware="true"
+        android:exported="true"
+        android:label="@string/main_activity_label"
+        android:launchMode="singleTask"
+        android:resizeableActivity="true"
+        android:theme="@style/MainActivityTheme"
+        android:windowSoftInputMode="stateAlwaysHidden|adjustNothing">
+
+      <intent-filter>
+        <action android:name="com.android.dialer.main.impl.MAIN"/>
+        <category android:name="android.intent.category.DEFAULT"/>
+      </intent-filter>
 
       <meta-data
-        android:name="com.android.keyguard.layout"
-        android:resource="@layout/keyguard_preview"/>
+          android:name="com.android.keyguard.layout"
+          android:resource="@layout/keyguard_preview"/>
+
     </activity>
   </application>
 </manifest>