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

Issue 736039 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

See if we can skip duplicating resources in the WebApk

Project Member Reported by yfried...@chromium.org, Jun 22 2017

Issue description

If you build the shell apk and look at the resources, there's a layout and layout-v17, with the only difference being paddingStart omitted/replaced with paddingLeft. Rather than duplicating these ui elements (~2k), we'd probably be better off just specifying both attributes (if that works) or finding some way to collapse them.

More info: https://android-developers.googleblog.com/2013/03/native-rtl-support-in-android-42.html
 
Cc: hanxi@chromium.org
Owner: ranj@chromium.org
Status: Assigned (was: Untriaged)

Comment 2 by ranj@chromium.org, Jul 13 2017

Changed padding from 20dp to 60px.
Can't really see a difference in my Nexus 5.

Screenshot_20170713-152828.png
301 KB View Download
Screenshot_20170713-161618.png
304 KB View Download
Does that change the layout generation?

Comment 4 by ranj@chromium.org, Jul 13 2017

After the change, We only have the layout folder.
The new generated layout xml do not have the padding attributes.

When I test, as long as the xml has the padding attributes, it will generate layout and layout_V17.

Comment 5 by ranj@chromium.org, Jul 14 2017

Tested on pre-L devices, looks fine.
screenshot-016B75D60201300E-20170714T142233.png
113 KB View Download

Comment 6 by hanxi@chromium.org, Jul 14 2017

Thanks for the screenshots!
Project Member

Comment 7 by bugdroid1@chromium.org, Jul 17 2017

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

commit 4c57bcc281cd46830b94d08493356fa7acbd9ac4
Author: Ran Ji <ranj@chromium.org>
Date: Mon Jul 17 15:51:24 2017

Set padding dynamically to avoid build creating duplicated resource copy.
Apk size reduces 2kb compare with previous.

Bug:  736039 
Change-Id: I4fe73fda4e9771cf34b830c3df16e3bca9a468c8
Reviewed-on: https://chromium-review.googlesource.com/570515
Reviewed-by: Xi Han <hanxi@chromium.org>
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Commit-Queue: Ran Ji <ranj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487094}
[modify] https://crrev.com/4c57bcc281cd46830b94d08493356fa7acbd9ac4/chrome/android/webapk/shell_apk/res/layout/choose_host_browser_dialog.xml
[modify] https://crrev.com/4c57bcc281cd46830b94d08493356fa7acbd9ac4/chrome/android/webapk/shell_apk/res/layout/host_browser_list_item.xml
[modify] https://crrev.com/4c57bcc281cd46830b94d08493356fa7acbd9ac4/chrome/android/webapk/shell_apk/shell_apk_version.gni
[modify] https://crrev.com/4c57bcc281cd46830b94d08493356fa7acbd9ac4/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/ChooseHostBrowserDialog.java
[modify] https://crrev.com/4c57bcc281cd46830b94d08493356fa7acbd9ac4/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/InstallHostBrowserDialog.java
[modify] https://crrev.com/4c57bcc281cd46830b94d08493356fa7acbd9ac4/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/WebApkUtils.java

Comment 8 by ranj@chromium.org, Jul 18 2017

Status: Fixed (was: Assigned)

Sign in to add a comment