Chromium Code Reviews| 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
|
| + } |
| +} |