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

Unified Diff: chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/RecentsPlaceholderActivity.java

Issue 2762873003: Fix: long-tapping a WebAPK in recents shows Chrome.
Patch Set: yfriedman@'s comments. Created 3 years, 9 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
Index: chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/RecentsPlaceholderActivity.java
diff --git a/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/RecentsPlaceholderActivity.java b/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/RecentsPlaceholderActivity.java
new file mode 100644
index 0000000000000000000000000000000000000000..f43374e6c6913202597407f45685ae57b3808d1c
--- /dev/null
+++ b/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/RecentsPlaceholderActivity.java
@@ -0,0 +1,27 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.webapk.shell_apk;
+
+import android.app.Activity;
+import android.os.Build;
+import android.os.Bundle;
+
+/**
+ * WebAPK's activity which launches host browser and is shown in recents on L+.
+ */
+public class RecentsPlaceholderActivity extends Activity {
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ if (!LaunchWebApkHelper.launch(this)) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+ finishAndRemoveTask();
+ } else {
+ finish();
+ }
+ }
gone 2017/03/29 18:48:41 This thing should always finish, shouldn't it? Ot
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698