summaryrefslogtreecommitdiffstats
path: root/src/com/android/mail/compose/ComposeActivity.java
diff options
context:
space:
mode:
authorAdnan <adnan@cyngn.com>2014-08-28 17:21:44 -0700
committerAdnan <adnan@cyngn.com>2014-09-03 15:41:23 -0700
commit0297ffb8be5e76467ccda7cae329af967bc9b07f (patch)
tree2ed8f4544543048ca5e5784946e95ecb7733035e /src/com/android/mail/compose/ComposeActivity.java
parent058c5597593fc580c7ed1f4f13c109cf22e3f42c (diff)
downloadandroid_packages_apps_UnifiedEmail-0297ffb8be5e76467ccda7cae329af967bc9b07f.tar.gz
android_packages_apps_UnifiedEmail-0297ffb8be5e76467ccda7cae329af967bc9b07f.tar.bz2
android_packages_apps_UnifiedEmail-0297ffb8be5e76467ccda7cae329af967bc9b07f.zip
UnifiedEmail: Only create a single instance of MultiPickContactActivity.
- Previously, if you spammed the add recipients button, you could start multiple instances of the MultiPickContactActivity, all which could return results to the ComposeActivity. To mitigate this, clear the current top instance and only request a single top. Change-Id: I54be793207c2a57da0695facb9f7e226a7ad758b
Diffstat (limited to 'src/com/android/mail/compose/ComposeActivity.java')
-rw-r--r--src/com/android/mail/compose/ComposeActivity.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/mail/compose/ComposeActivity.java b/src/com/android/mail/compose/ComposeActivity.java
index ba8e966f1..d3ec5a843 100644
--- a/src/com/android/mail/compose/ComposeActivity.java
+++ b/src/com/android/mail/compose/ComposeActivity.java
@@ -3063,6 +3063,8 @@ public class ComposeActivity extends Activity implements OnClickListener, OnNavi
// Start the activity to pick the recipient.
Intent intent = new Intent(ACTION_MULTI_PICK_EMAIL);
+ intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
+ intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.setType(Contacts.CONTENT_TYPE);
startActivityForResult(intent, requestCode);