Correct splashscreen for maskable icons |
||||||
Issue descriptionAlthough Add To Home Screen shortcuts can use maskable icons, the splashscreen shown is not aware of this, see attached video.
,
Dec 28
,
Dec 28
This bug requires manual review: M72 has already been promoted to the beta branch, so this requires manual review Please contact the milestone owner if you have questions. Owners: govind@(Android), kariahda@(iOS), djmm@(ChromeOS), abdulsyed@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Dec 29
Pls update bug with canary result and justify merge to M72. Thank you.
,
Jan 3
It doesn't seem to break anything on Canary. It's part of a bigger fix that has already landed - https://bugs.chromium.org/p/chromium/issues/detail?id=904354 . It would be nice to have them in together.
,
Jan 3
Approving merge to M72 branch 3626 based on comment #5. Please merge ASAP. Thank you.
,
Jan 3
Pls merge your change to M72 branch 3626 ASAP so we can pick it up for next Beta release. Thank you.
,
Jan 4
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5d4d4ece36c8033b62129f61f5d852479ab58d7a commit 5d4d4ece36c8033b62129f61f5d852479ab58d7a Author: Peter E Conn <peconn@chromium.org> Date: Fri Jan 04 16:46:56 2019 👹 Add whether the icon was adaptive to shortcut Intent. When a Webapp is added as a homescreen shortcut the icon used is stored in the shortcut launch Intent and may be used in the splash screen. When a Webapp specifies a maskable icon in its manifest [1], the shortcut is added as an Android Adaptive Icon [2]. We add whether the icon was adaptive or not to the Intent so that the splashscreen can display it in the same way as it is shown on the homescreen. We cannot store the Adaptive Icon on the Intent as a Parcelable because shortcut Intent extras are restricted to primitive types [3]. We don't write the Icon back to a Bitmap because that changes the size of the image, and preserving the size would mean scaling the image. (I also took the opportunity to correct adaptable -> adaptive and standardise variable names). [1]: https://www.w3.org/TR/appmanifest/#purpose-member [2]: https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive [3]: https://developer.android.com/reference/android/content/pm/ShortcutInfo.Builder.html#setIntent(android.content.Intent) Bug: 910232 Change-Id: I22931ffc01065bd533f85a6d0dc875758fb23d1a Reviewed-on: https://chromium-review.googlesource.com/c/1375723 Reviewed-by: Peter Kotwicz <pkotwicz@chromium.org> Reviewed-by: Dominick Ng <dominickn@chromium.org> Commit-Queue: Peter Conn <peconn@chromium.org> Cr-Commit-Position: refs/heads/master@{#619134} TBR pkotwicz@chromium.org, dominickn@chromium.org Change-Id: I22931ffc01065bd533f85a6d0dc875758fb23d1a Reviewed-on: https://chromium-review.googlesource.com/c/1396301 Reviewed-by: Peter Conn <peconn@chromium.org> Cr-Commit-Position: refs/branch-heads/3626@{#561} Cr-Branched-From: d897fb137fbaaa9355c0c93124cc048824eb1e65-refs/heads/master@{#612437} [modify] https://crrev.com/5d4d4ece36c8033b62129f61f5d852479ab58d7a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java [modify] https://crrev.com/5d4d4ece36c8033b62129f61f5d852479ab58d7a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInfo.java [modify] https://crrev.com/5d4d4ece36c8033b62129f61f5d852479ab58d7a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java [modify] https://crrev.com/5d4d4ece36c8033b62129f61f5d852479ab58d7a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java [modify] https://crrev.com/5d4d4ece36c8033b62129f61f5d852479ab58d7a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappSplashScreenController.java [modify] https://crrev.com/5d4d4ece36c8033b62129f61f5d852479ab58d7a/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java [modify] https://crrev.com/5d4d4ece36c8033b62129f61f5d852479ab58d7a/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappModeTest.java [modify] https://crrev.com/5d4d4ece36c8033b62129f61f5d852479ab58d7a/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappVisibilityTest.java [modify] https://crrev.com/5d4d4ece36c8033b62129f61f5d852479ab58d7a/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java [modify] https://crrev.com/5d4d4ece36c8033b62129f61f5d852479ab58d7a/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappInfoTest.java [modify] https://crrev.com/5d4d4ece36c8033b62129f61f5d852479ab58d7a/chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/splash/SplashLayout.java [modify] https://crrev.com/5d4d4ece36c8033b62129f61f5d852479ab58d7a/chrome/android/webapk/shell_apk/current_version/current_version.gni [modify] https://crrev.com/5d4d4ece36c8033b62129f61f5d852479ab58d7a/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/h2o/SplashActivity.java
,
Jan 4
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5d4d4ece36c8033b62129f61f5d852479ab58d7a Commit: 5d4d4ece36c8033b62129f61f5d852479ab58d7a Author: peconn@chromium.org Commiter: peconn@chromium.org Date: 2019-01-04 16:46:56 +0000 UTC 👹 Add whether the icon was adaptive to shortcut Intent. When a Webapp is added as a homescreen shortcut the icon used is stored in the shortcut launch Intent and may be used in the splash screen. When a Webapp specifies a maskable icon in its manifest [1], the shortcut is added as an Android Adaptive Icon [2]. We add whether the icon was adaptive or not to the Intent so that the splashscreen can display it in the same way as it is shown on the homescreen. We cannot store the Adaptive Icon on the Intent as a Parcelable because shortcut Intent extras are restricted to primitive types [3]. We don't write the Icon back to a Bitmap because that changes the size of the image, and preserving the size would mean scaling the image. (I also took the opportunity to correct adaptable -> adaptive and standardise variable names). [1]: https://www.w3.org/TR/appmanifest/#purpose-member [2]: https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive [3]: https://developer.android.com/reference/android/content/pm/ShortcutInfo.Builder.html#setIntent(android.content.Intent) Bug: 910232 Change-Id: I22931ffc01065bd533f85a6d0dc875758fb23d1a Reviewed-on: https://chromium-review.googlesource.com/c/1375723 Reviewed-by: Peter Kotwicz <pkotwicz@chromium.org> Reviewed-by: Dominick Ng <dominickn@chromium.org> Commit-Queue: Peter Conn <peconn@chromium.org> Cr-Commit-Position: refs/heads/master@{#619134} TBR pkotwicz@chromium.org, dominickn@chromium.org Change-Id: I22931ffc01065bd533f85a6d0dc875758fb23d1a Reviewed-on: https://chromium-review.googlesource.com/c/1396301 Reviewed-by: Peter Conn <peconn@chromium.org> Cr-Commit-Position: refs/branch-heads/3626@{#561} Cr-Branched-From: d897fb137fbaaa9355c0c93124cc048824eb1e65-refs/heads/master@{#612437} |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by bugdroid1@chromium.org
, Dec 28