New issue
Advanced search Search tips

Issue 911420 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 901954



Sign in to add a comment

Make first run experience relaunch WebAPK Activity instead of Chrome Activity

Project Member Reported by pkotw...@chromium.org, Dec 4

Issue description

In order for the behaviour when a user taps the app icon of NewSplashWebApk.apk  (and the WebAPK is already running) to be correct, the first run experience should launch  H2OOpaqueMainActivity (an activity in the WebAPK process) instead of WebApkActivity (an activity in the Chrome process)
 
Blocking: 901954
Project Member

Comment 2 by bugdroid1@chromium.org, Dec 13

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b9faabca1bdab1f020307354f65834991965a485

commit b9faabca1bdab1f020307354f65834991965a485
Author: Peter Kotwicz <pkotwicz@chromium.org>
Date: Thu Dec 13 00:29:15 2018

[Android WebAPK] Relaunch WebAPK when the user finishes first run experience

new-style WebAPKs have a different activity architecture than old-style
WebAPKs. new-style WebAPKs stack TransparentSplashWebApkActivity (which
runs in Chrome) on top of the SplashActivity (which runs in the WebAPK).
The SplashActivity keeps running till TransparentSplashWebApkActivity
finishes itself.

In order for tapping the app icon of an already running new-style
WebAPK to activate the already-running WebAPK instead of relaunching
the WebAPK, SplashActivity must be running.

This CL:
- Changes the first run experience to send an intent to relaunch the
WebAPK when the user completes the FRE. Previously,
TransparentSplashWebApkActivity was launched when the user completes
the FRE.
- Changes TransparentSplashWebApkActivity not to be singleTop. If
TransparentSplashWebApkActivity is singleTop,
FirstRunFlowSequencer#launch() triggers
TransparentSplashWebApkActivity#onNewIntent() when it relaunches the
activity with FLAG_ACTIVITY_NEW_TASK

BUG=911420

Change-Id: I1a0d648502e525ec133cfb2ef35c9fb2b5afca53
Reviewed-on: https://chromium-review.googlesource.com/c/1367187
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Yusuf Ozuysal <yusufo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616119}
[modify] https://crrev.com/b9faabca1bdab1f020307354f65834991965a485/chrome/android/java/AndroidManifest.xml
[modify] https://crrev.com/b9faabca1bdab1f020307354f65834991965a485/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java
[modify] https://crrev.com/b9faabca1bdab1f020307354f65834991965a485/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
[modify] https://crrev.com/b9faabca1bdab1f020307354f65834991965a485/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java
[modify] https://crrev.com/b9faabca1bdab1f020307354f65834991965a485/chrome/android/junit/src/org/chromium/chrome/browser/firstrun/FirstRunIntegrationUnitTest.java
[modify] https://crrev.com/b9faabca1bdab1f020307354f65834991965a485/chrome/android/webapk/test/src/org/chromium/webapk/test/WebApkTestHelper.java

Sign in to add a comment