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

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

Issue 2638153002: Add FLAG_ACTIVITY_NEW_TASK to trusted Intents (Closed)
Patch Set: Rebase Created 3 years, 11 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 | chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java » ('j') | 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/IntentHandler.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java
index 691f937282cd2574745e2519969cf1da6352e0f4..368ea70449758f9fbbf232c9264f82337c2a6a21 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java
@@ -574,6 +574,10 @@ public class IntentHandler {
new ComponentName(appContext.getPackageName(), componentClassName));
}
+ // Because we are starting this activity from the application context, we need
+ // FLAG_ACTIVITY_NEW_TASK on pre-N versions of Android. On N+ we can get away with
+ // specifying a task ID or not specifying an options bundle.
+ assert (copiedIntent.getFlags() & Intent.FLAG_ACTIVITY_NEW_TASK) != 0;
addTrustedIntentExtras(copiedIntent);
appContext.startActivity(copiedIntent);
}
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698