diff options
author | zachh <zachh@google.com> | 2018-06-08 16:30:28 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-08 17:05:53 -0700 |
commit | e79a22e80033898a9c176be4420a46b36bea9f3d (patch) | |
tree | bcc75d771c79016e15c4e5c6670ebfdc1b1ad369 | |
parent | 2c82dcdd421acafd8bd71fa8d42bdf3d06db05e1 (diff) |
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
-rw-r--r-- | java/com/android/dialer/app/calllog/CallLogActivity.java | 3 | ||||
-rw-r--r-- | java/com/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 --> <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> |