Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/IntentHelper.java

Issue 10823146: IntentHelper fix for chooser activity (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/IntentHelper.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/IntentHelper.java
index 89975c68a6bfed4cbaed81f127b5597822f55718..487d71d68fca32cb1fe9550e48ac9239c20d7d31 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/IntentHelper.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/IntentHelper.java
@@ -61,7 +61,10 @@ public abstract class IntentHelper {
send.putExtra(Intent.EXTRA_SUBJECT, subject);
send.putExtra(Intent.EXTRA_TEXT, Html.fromHtml(body));
try {
- context.startActivity(Intent.createChooser(send, chooserTitle));
+ Intent chooser = Intent.createChooser(send, chooserTitle));
+ // we start this activity outside the main activity.
+ chooser.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ context.startActivity(chooser);
} catch (android.content.ActivityNotFoundException ex) {
// If no app handles it, do nothing.
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698