From e79a22e80033898a9c176be4420a46b36bea9f3d Mon Sep 17 00:00:00 2001 From: zachh Date: Fri, 8 Jun 2018 16:30:28 -0700 Subject: 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 --- .../dialer/app/calllog/CallLogActivity.java | 3 +-- .../android/dialer/main/impl/AndroidManifest.xml | 30 +++++++++++++--------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/java/com/android/dialer/app/calllog/CallLogActivity.java b/java/com/android/dialer/app/calllog/CallLogActivity.java index 017c63a5d..fdfb3ab2a 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.MenuInflater; 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 @@ public class CallLogActivity extends TransactionSafeActivity 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 f0f338a1b..064390707 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 --> + package="com.android.dialer.main.impl"> + 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"> + + + + + + android:name="com.android.keyguard.layout" + android:resource="@layout/keyguard_preview"/> + -- cgit v1.2.3