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

Issue 601161 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Don't show PW Activity when user taps Chrome icon.

Project Member Reported by mmo...@chromium.org, Apr 6 2016

Issue description

Today we have a slightly undesirable effect that opening Chrome icon sometimes opens PW Activity:

1. Tap PW Notification
2. Go Home
3. Tap Chrome icon (make sure its same version as from 1.)

This is made 10x more annoying since there is no intuitive way to fix this:

- You have to hit X (close) then open Chrome icon again.
- If you just tap a link, that is not enough to resolve the issue.  Next launch opens PW again, even if you do some navigation!  (This may be a bug with the way we intent out?)


Discussing with Andrew we have a few things to investigate:
1. launchMode
2. taskAffinity
3. change how to fire URL Intents

We can also use the adb utility to help diagnose the task stack:
> adb shell dumpsys activity
 
Status: WontFix (was: Untriaged)
Could be solved by adding Chrome logo to results page

Comment 2 by mmo...@chromium.org, Apr 12 2016

Owner: mmo...@chromium.org
Status: Assigned (was: WontFix)
Even if that is a proper workaround (its not :P), it isn't fixed yet.

Comment 3 by cco3@chromium.org, Apr 12 2016

Ani's comment is from our meeting yesterday.  Given that every other settings page, etc. may be navigated to from the chrome logo directly (assuming it's the most recent activity), the only difference with our activity is that it doesn't feel distinctly like chrome.  That's what the appeal is behind the mentioned workaround.

Although, now that I look at this more, you are saying that even if we go back home from actually browsing, we go back to the PW activity when tapping the launcher icon?  That's sounds really annoying, but I can't duplicate it.

Comment 4 by mmo...@chromium.org, Apr 12 2016

If I:

1. Open bookmarks
2. Tap a link
3. Press Home
4. Open Chrome App

..I see the tab i had just opened, not bookmarks again.  This is not what PW does, and should be fixed.

If I:

1. Open bookmarks
2. DON'T Tap a link
3. Press Home
4. Open Chrome App

I DO see bookmarks, but if I tap the [X] I return to Chrome, not to the home screen.  This is not what PW does.


Also, the above behaviour is for Chrome Stable/Beta.  It seems that in Chrome Dev we now have a new experiment for opening Chrome Custom Tabs automatically for incoming intents, and this is what PW is doing.

I haven't read into it yet, or know if the experiment will launch, but I expect we need to fire our Intent with a different set of parameters in order to open as an ordinary tab.

Comment 5 by cco3@chromium.org, Apr 12 2016

> I see the tab i had just opened, not bookmarks again.  This is not what PW does, and should be fixed.

OK, I see your note about dev.  That's why I couldn't duplicate it.  I'm able to duplicate on stable.

I've suspected for a while we need to add Intent.FLAG_ACTIVITY_NEW_TASK.  I'll just need to figure out some way to confirm this (maybe as simple as asking Andrew).

> I DO see bookmarks, but if I tap the [X] I return to Chrome, not to the home screen.  This is not what PW does.

It is when you get to the PW activity from chrome, just not when you get to it from a notification.  This seems like proper behavior to me.

Comment 6 by cco3@chromium.org, Apr 12 2016

I take that back, I don't think FLAG_ACTIVITY_NEW_TASK is the right thing to add.

Comment 7 by mmo...@chromium.org, Apr 12 2016

Conley: I see your point that we opened PW activity from Notification so X should take you back to home screen.  However, when you tap the chrome icon from home screen and PW opens and X takes you back to Home screen, I don't at all think this is expected.

Perhaps the fix is to do something in onPause?  Or perhaps we need to change the launch mode slightly?  I know we investigated before..

Comment 8 by cco3@chromium.org, Apr 12 2016

>  However, when you tap the chrome icon from home screen and PW opens and X takes you back to Home screen, I don't at all think this is expected.

I'm not sure what proper behavior should be in this case.

> Or perhaps we need to change the launch mode slightly?

I think this one.  The things we investigated before were largely related to task affinity.  I'm pursuing a different route ATM.

Comment 9 by mmo...@chromium.org, Apr 12 2016

In my opinion, ideally we would:

- Be a new task stack when launch from Notification, we are in Recents even after user taps home screen.
- When you tap Chrome icon, you launch Chrome and not PW Activity.
- If you manually launch PW Activity from within chrome, it behaves the way it does now (is added to the task stack, resumes when launching from icon, but X button returns to Chrome).

Of those three, I'm most willing to sacrifice the last one, if we cannot get it all.

Does this sound appropriate?

Comment 10 by cco3@chromium.org, Apr 12 2016

> When you tap Chrome icon, you launch Chrome and not PW Activity.

What about when you visited the PW Activity from chrome settings?  Isn't it appropriate to go back then?
I think it would be appropriate (my point 3), but by far the least important concern.
Project Member

Comment 12 by bugdroid1@chromium.org, May 6 2016

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

commit 6470dc869611cd9f7adfe6200c83fcace8ae35ec
Author: cco3 <cco3@chromium.org>
Date: Fri May 06 22:09:25 2016

Ensure tapped Physical Web links open in a new tab

Prior to this change, tapping on a physical web link would open the
URL, but then if one were to close chrome (e.g. by hitting the home
button, etc.) and then tap the chrome launcher, they would go back
to the physical web activity and not the opened content as expected.

This change opens the link in a new tab so that closing/reopening
behavior works as expected.

BUG= 601161 

Review-Url: https://codereview.chromium.org/1878893003
Cr-Commit-Position: refs/heads/master@{#392172}

[modify] https://crrev.com/6470dc869611cd9f7adfe6200c83fcace8ae35ec/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/ListUrlsActivity.java

Comment 13 by cco3@chromium.org, May 6 2016

Status: Fixed (was: Assigned)

Sign in to add a comment