Finish current group and duplicates activities after creating new groups
Bug 30047708
Bug 30261767
Change-Id: Ic5933f861d2003fc9d979ce45db9d8a2363addf8
diff --git a/src/com/android/contacts/ContactsDrawerActivity.java b/src/com/android/contacts/ContactsDrawerActivity.java
index e4eef51..c8d8eb3 100644
--- a/src/com/android/contacts/ContactsDrawerActivity.java
+++ b/src/com/android/contacts/ContactsDrawerActivity.java
@@ -287,7 +287,7 @@
if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "Received group URI " + groupUri);
Toast.makeText(this, R.string.groupCreatedToast, Toast.LENGTH_SHORT).show();
startActivity(GroupUtil.createViewGroupIntent(this, groupUri, /* title */ null));
- if (this instanceof GroupMembersActivity) {
+ if (shouldFinish()) {
// If we created a group while viewing the members of an existing group (i.e.
// while on GroupMembersActivity), finish the current GroupMembersActivity so that
// hitting back from the new GroupMembersActivity that was just stared will open