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

Issue 679798 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Fall back to legacy add to homescreen behavior on non-GMS device

Project Member Reported by pkotw...@chromium.org, Jan 10 2017

Issue description

Fall back to legacy add to homescreen behavior on non-GMS device

For graphics-related bugs, please copy/paste the contents of the about:gpu
page at the end of this report.

 
Cc: hanxi@chromium.org
 Issue 681596  has been merged into this issue.
Owner: hanxi@chromium.org
Status: Assigned (was: Untriaged)

Comment 3 by hanxi@chromium.org, Jan 16 2017

Cc: pkotw...@chromium.org sbirch@chromium.org
I am looking into this issue now. The ExternalAuthUtils has a few helper functions, such as:
1) isGooglePlayServicesMissing()
2) canUseGooglePlayService()
The first only checks whether the GMS is missing or invalid; the second checks more error cases and returns true only if the result = success. The first one is more likely to fit this bug, but I think we should extend this bug to "Fall back to legacy A2HS when can't use GMS successfully". It includes cases like: non-GMS device, Play service is updating, Play service is unavailable due to network issue etc (https://cs.corp.google.com/piper///depot/google3/java/com/google/maps/api/android/gmscore/src/com/google/android/gms/common/ConnectionResult.java?q=connectionresults&l=1). Thoughts? 
I think that falling back to legacy-A2HS behavior when Play is updating is a good idea. Our goal is to make add-to-homescreen "do something" as much of the time as possible

Comment 5 by hanxi@chromium.org, Jan 16 2017

SG, I will extend the scope of this issue to all the possible GMS unavailable cases.
Project Member

Comment 6 by bugdroid1@chromium.org, Jan 18 2017

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

commit b3c97c14c8f3918440ec8f6ff5f51d03e2284f7e
Author: hanxi <hanxi@chromium.org>
Date: Wed Jan 18 15:30:10 2017

Fall back to legacy add to homescreen behavior on non-GMS device or GMS isn't availabe.

In WebApkInstaller, we only checks whether the Google Play install
delegate is aviable before calling Google Play's install API. If it
is a non-GMS device, or user failed to connect to Google Play Service
due to Play service is updating or service is disabled ect., the
install would fail.
In this CL we add an additional check of whether we can use Google
Play Service sucessfully on the device. For all the failure cases,
we will fall back to legacy A2HS even when the play_install flag is on.

BUG= 679798 

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

[modify] https://crrev.com/b3c97c14c8f3918440ec8f6ff5f51d03e2284f7e/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java
[modify] https://crrev.com/b3c97c14c8f3918440ec8f6ff5f51d03e2284f7e/chrome/browser/android/webapk/webapk_installer.cc
[modify] https://crrev.com/b3c97c14c8f3918440ec8f6ff5f51d03e2284f7e/chrome/browser/android/webapk/webapk_installer.h
[modify] https://crrev.com/b3c97c14c8f3918440ec8f6ff5f51d03e2284f7e/chrome/browser/android/webapk/webapk_installer_unittest.cc

Comment 7 by hanxi@chromium.org, Jan 25 2017

Status: Fixed (was: Assigned)
Xi, can you please provide test steps for the Chrome test team. I wrote the bug description in a hurry and did not provide enough details for other people to repro the bug and verify the fix

Comment 9 by hanxi@chromium.org, Jan 27 2017

Honestly, I tired but wasn't able to disable GMS service. I just fixed it according to my understanding. Feel free to reopen it if you see anything is wrong.
The test team should have a non-GMS device, I'll make sure we track it as a case.

Comment 11 by hanxi@chromium.org, Jan 27 2017

Thank you Sam! Let me know what do you find.

Sign in to add a comment