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

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

Issue 2814923002: Check for DO_NOT_LAUNCH flag on O. (Closed)
Patch Set: Created 3 years, 8 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/instantapps/InstantAppsHandler.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/instantapps/InstantAppsHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/instantapps/InstantAppsHandler.java
index 92c5a8089df4b5d861f2602567ef2b8164a3450a..ea732313084ac4cd21d9590706a2927479c13d20 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/instantapps/InstantAppsHandler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/instantapps/InstantAppsHandler.java
@@ -41,6 +41,9 @@ public class InstantAppsHandler {
private static final String INSTANT_APP_START_TIME_EXTRA =
"org.chromium.chrome.INSTANT_APP_START_TIME";
+ // TODO(mariakhomenko): Use system once we roll to O SDK.
+ private static final int FLAG_DO_NOT_LAUNCH = 0x00000200;
+
// TODO(mariakhomenko): Depend directly on the constants once we roll to v8 libraries.
private static final String DO_NOT_LAUNCH_EXTRA =
"com.google.android.gms.instantapps.DO_NOT_LAUNCH_INSTANT_APP";
@@ -221,7 +224,8 @@ public class InstantAppsHandler {
return false;
}
- if (IntentUtils.safeGetBooleanExtra(intent, DO_NOT_LAUNCH_EXTRA, false)) {
+ if (IntentUtils.safeGetBooleanExtra(intent, DO_NOT_LAUNCH_EXTRA, false)
+ || ((intent.getFlags() & FLAG_DO_NOT_LAUNCH) != 0)) {
maybeRecordFallbackStats(intent);
Log.i(TAG, "Not handling with Instant Apps (DO_NOT_LAUNCH_EXTRA)");
return false;
« 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