New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 700157 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Long-tapping a WebAPK in recents shows Chrome

Project Member Reported by sbirch@chromium.org, Mar 9 2017

Issue description

Darin mentioned that long-pressing on the icon shown for a WebAPK in recents will show the underlying instance of Chrome. It's a little bit confusing and it prevents you from getting to app info from recents.

I suspect this is due to #692627? In which case it's a temporary state until we turn the flag back on.
 
Cc: yus...@chromium.org dfalcant...@chromium.org
Owner: hanxi@chromium.org
Status: Assigned (was: Available)
Weird - didn't know that was possible. I doubt it's related - the activity is still a chrome activity. I expected CCT to have the same issue but it doesn't appear to so it's probably something to do with the flags passed when we launch the intent

Comment 2 by hanxi@chromium.org, Mar 13 2017

Do you know the Android version? I assume he uses Android N, but I can't repro it locally. Also, long tapping an app in recents is a way to trigger splitting screen in N.

Comment 3 by sbirch@chromium.org, Mar 13 2017

It repros for me on N. I have to tap on the icon specifically (all the way on the left) in order to get this instead of starting splitscreen.

Comment 4 by hanxi@chromium.org, Mar 13 2017

Ah, I can repro it now. Agree with Yaron, it shows the app who owns the activity, which is chrome.
Having the renderer in the WebAPK process is unlikely to help with this

Comment 6 by hanxi@chromium.org, Mar 21 2017

Dig into this issue, and what I find are: the icon shown in the recents is the application icon of the root activity in the task stack. For cct, the CustomTabActivity is created within the same task stack of their embedder apps, and the root activity is one of the activity of the embedder app. For WebApks, the root activity is WebApkActivity.

So I want to know can we make WebApkActivity in the same task stack of the WebAPKs MainActivity. In AndroidManifest.xml, WebApkActivity is defined with android:launchMode=SingleTop and android:documentLaunchMode=InfoExisting. These attributes are different from cct, and they make WebApkActivity always be a different task stack of the WebAPK's MainActivity, even though I remove the "FLAG_ACTIVITY_NEW_TASK" flag when starts the WebApkActivity from WebappLauncherActivity and do not finish the MainActivity of WebAPKs.

I only figured out one way to fix this issue, but it breaks all the existing installed WebAPKs:
1) remove android:documentLaunchMode=InfoExisting;
2) remove FLAG_ACTIVITY_NEW_TASK when creating intent to launch WebAPKs in WebappLauncherActivity
3) don't call finish() in MainActivity of WebAPKs.

I created a patch to show my changes (some of the changes are for debugging):
https://codereview.chromium.org/2762873003/
Interesting. I agree with the core of your change - I think it makes sense for the WEbapk MainActivity to be the root of the tab stack. If you make just that change does it work for KK and earlier or is it in trying to support those that you have issues?

Put another way: I'm fine with non-optimal solutions and some bugs for existing WebAPKs - those will be re-minted and there's so few in existence that it's not a major concern so long as future WebAPKs behave in the way you've described.

Comment 8 by hanxi@chromium.org, Mar 27 2017

The disagreement comes from the fix for pre-L. That means, my fix is good for L and L+, and existing WebAPKs can be fixed through updates. But I didn't figure out a good way to fix for JB and KK, since making the WebApkAcitivity on top of the WebAPK's main activity will only result to 2 items in the recents, and this can't be resolved by updating:(

Comment 9 by hanxi@chromium.org, Mar 31 2017

The solution of adding a PlaceHolder activity in CL on comment5# breaks WebAPK's deep linking, see doc (https://docs.google.com/document/d/1gZEFVMgJWc7Mo1zFBC9vG7CGYI2zXFVeQHvuamqQv3E/edit#).

Unless we have a better way to fix it, we might have to mark this as won't fix:(

Issue 685291 has been merged into this issue.
 Issue 661784  has been merged into this issue.
Owner: ----
Status: Available (was: Assigned)
Status: WontFix (was: Available)

Sign in to add a comment