Make "up" button different from "back" button
- Explicitly go to PeopleActivity when "up" is pressed
- Use flag FLAG_ACTIVITY_CLEAR_TOP to prevent having
PeopleActivity multiple times in the back stack
- Use PeopleActivity.class because we don't want to use
a URI like LIST_ALL_CONTACTS otherwise it will switch
the tab or the account filter that has been last set
by the user
Bug: 5071475
Change-Id: Id6f768db3838fa0bc007feda89a92e3d36c8a694
diff --git a/src/com/android/contacts/ContactOptionsActivity.java b/src/com/android/contacts/ContactOptionsActivity.java
index 9ae8fe9..dd7387f 100644
--- a/src/com/android/contacts/ContactOptionsActivity.java
+++ b/src/com/android/contacts/ContactOptionsActivity.java
@@ -16,6 +16,8 @@
package com.android.contacts;
+import com.android.contacts.activities.PeopleActivity;
+
import android.app.ActionBar;
import android.app.Activity;
import android.content.ContentValues;
@@ -221,6 +223,9 @@
switch (item.getItemId()) {
case android.R.id.home:
+ Intent intent = new Intent(this, PeopleActivity.class);
+ intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+ startActivity(intent);
finish();
return true;
default: