Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(742)

Issue 14476011: [Android] Auto-generate API 14 resources from the existing API 17 resources. (Closed)

Created:
7 years, 8 months ago by Kibeom Kim (inactive)
Modified:
7 years, 7 months ago
CC:
fdimeglio_google.com
Visibility:
Public.

Description

[Android] Auto-generate RTL layout xmls from existing layout xmls. There are several attributes introduced in API 17, mostly for BiDi(RTL) support, e.g., paddingStart. This build script will generate another set of resource that is API 14 compatible by converting those API 17 attributes to API 14 attributes, e.g., paddingStart -> paddingLeft. The goal of this script is for programmers to use those attributes without worrying about backward-compatibility care and related bugs. About the bugs, please refer to crbug.com/235118 . BUG=235118 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=198325

Patch Set 1 #

Total comments: 18

Patch Set 2 : Fixed Newton's comments and polished. #

Total comments: 12

Patch Set 3 : Fixed an error caused by ">(res_dir)" #

Total comments: 6

Patch Set 4 : Not finished. Script is done but I have to make it an independent gyp action, one for copying, -v17… #

Patch Set 5 : Maked the script call as a gyp action. Copy gyp action should be added. #

Patch Set 6 : Reverted empty line number chanes introduced by the last patch #

Patch Set 7 : Same as the above. #

Patch Set 8 : Indenting fix #

Total comments: 28

Patch Set 9 : Added copying script action. Pretty much complete I think #

Total comments: 16

Patch Set 10 : Fixed Newton's comment. Investigating warnings. #

Total comments: 33

Patch Set 11 : Fixed Newton and Chris' comments. Currently, not overriding exisitng resources + some warnings #

Patch Set 12 : Worked around setAttributeNS(...) because of it has a bug with printing. #

Patch Set 13 : Excluded v17/v14/crunch resources from process_resources.py and included only at apk resource packa… #

Total comments: 20

Patch Set 14 : Fixed style issues that newt mentioned. #

Patch Set 15 : uploaded a missing comment style fix. #

Total comments: 4

Patch Set 16 : Fixed one missing dependencies_res_input_dirs renaming #

Total comments: 12

Patch Set 17 : fixed more comment styles #

Patch Set 18 : #

Patch Set 19 : #

Patch Set 20 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -27 lines) Patch
M base/android/activity_status.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M build/android/gyp/copy_v17_resources.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +18 lines, -9 lines 0 comments Download
M build/android/gyp/generate_v14_resources.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +37 lines, -17 lines 0 comments Download

Messages

Total messages: 39 (0 generated)
Kibeom Kim (inactive)
This is not finished, but could you take a look at java.gypi and process_resources.py? I'm ...
7 years, 8 months ago (2013-04-24 18:47:46 UTC) #1
newt (away)
this looks good. I think this is the right way to handle layout mirroring on ...
7 years, 8 months ago (2013-04-24 23:34:38 UTC) #2
Kibeom Kim (inactive)
Thanks for the detailed comment on near-trash quality script. I cleaned up quite a bit. ...
7 years, 8 months ago (2013-04-25 00:04:39 UTC) #3
Kibeom Kim (inactive)
I get some warning so investigating... nothing matches overlay file date_time_picker_dialog.xml, for flavor ,,,ldrtl,,,,,,,,,,,,,,,, nothing ...
7 years, 8 months ago (2013-04-25 00:27:46 UTC) #4
newt (away)
https://codereview.chromium.org/14476011/diff/7001/build/android/gyp/mirror_resources.py File build/android/gyp/mirror_resources.py (right): https://codereview.chromium.org/14476011/diff/7001/build/android/gyp/mirror_resources.py#newcode18 build/android/gyp/mirror_resources.py:18: ATTRIBUTES_TO_MIRROR = ['paddingLeft', completely optional / just an idea. ...
7 years, 8 months ago (2013-04-25 00:41:24 UTC) #5
newt (away)
https://codereview.chromium.org/14476011/diff/11001/build/android/gyp/process_resources.py File build/android/gyp/process_resources.py (right): https://codereview.chromium.org/14476011/diff/11001/build/android/gyp/process_resources.py#newcode30 build/android/gyp/process_resources.py:30: help='directory containing images to be crunched and' \ don't ...
7 years, 8 months ago (2013-04-25 00:47:58 UTC) #6
Kibeom Kim (inactive)
Talked with David&Ted and decided to generate layout/ from layout-v17/ instead of current layout-ldrtl/ from ...
7 years, 8 months ago (2013-04-25 00:58:59 UTC) #7
cjhopman
https://codereview.chromium.org/14476011/diff/11001/build/android/gyp/process_resources.py File build/android/gyp/process_resources.py (right): https://codereview.chromium.org/14476011/diff/11001/build/android/gyp/process_resources.py#newcode99 build/android/gyp/process_resources.py:99: mirror_cmd = [sys.executable, On 2013/04/25 00:47:58, newt wrote: > ...
7 years, 8 months ago (2013-04-25 01:02:06 UTC) #8
Kibeom Kim (inactive)
https://codereview.chromium.org/14476011/diff/7001/build/android/gyp/mirror_resources.py File build/android/gyp/mirror_resources.py (right): https://codereview.chromium.org/14476011/diff/7001/build/android/gyp/mirror_resources.py#newcode18 build/android/gyp/mirror_resources.py:18: ATTRIBUTES_TO_MIRROR = ['paddingLeft', On 2013/04/25 00:41:24, newt wrote: > ...
7 years, 8 months ago (2013-04-25 01:49:35 UTC) #9
Kibeom Kim (inactive)
7 years, 8 months ago (2013-04-25 01:53:10 UTC) #10
Kibeom Kim (inactive)
7 years, 8 months ago (2013-04-25 01:53:27 UTC) #11
newt (away)
On 2013/04/25 00:58:59, Kibeom Kim wrote: > Talked with David&Ted and decided to generate layout/ ...
7 years, 8 months ago (2013-04-25 02:09:34 UTC) #12
Kibeom Kim (inactive)
On 2013/04/25 02:09:34, newt wrote: > On 2013/04/25 00:58:59, Kibeom Kim wrote: > > Talked ...
7 years, 8 months ago (2013-04-25 02:40:05 UTC) #13
newt (away)
Here's another option: - Using paddingStart, paddingEnd, etc in all xml files - Don't include ...
7 years, 8 months ago (2013-04-25 02:45:03 UTC) #14
Kibeom Kim (inactive)
On 2013/04/25 02:45:03, newt wrote: > Here's another option: > - Using paddingStart, paddingEnd, etc ...
7 years, 8 months ago (2013-04-25 03:24:58 UTC) #15
Kibeom Kim (inactive)
Ready for review. Except copying gyp. @Chris Q: In addition to the current patch, I ...
7 years, 8 months ago (2013-04-26 02:16:57 UTC) #16
Kibeom Kim (inactive)
> @Chris > Q: In addition to the current patch, I need to copy directories ...
7 years, 8 months ago (2013-04-26 17:02:59 UTC) #17
newt (away)
ok, I had a lot of comments, but I do think this is good! https://codereview.chromium.org/14476011/diff/11001/build/android/gyp/mirror_resources.py ...
7 years, 8 months ago (2013-04-26 18:46:26 UTC) #18
Kibeom Kim (inactive)
Thanks for the helpful comments. All fixed. Investigating the warnings I mentioned at comment #4. ...
7 years, 8 months ago (2013-04-26 19:37:44 UTC) #19
cjhopman
https://codereview.chromium.org/14476011/diff/41001/build/android/gyp/copy_resources_v17.py File build/android/gyp/copy_resources_v17.py (right): https://codereview.chromium.org/14476011/diff/41001/build/android/gyp/copy_resources_v17.py#newcode14 build/android/gyp/copy_resources_v17.py:14: def copy_resources_in_dir(input_dir, output_dir): Chrome uses MixedCase for function names ...
7 years, 8 months ago (2013-04-26 20:57:31 UTC) #20
newt (away)
close! https://codereview.chromium.org/14476011/diff/41002/build/android/gyp/copy_resources_v17.py File build/android/gyp/copy_resources_v17.py (right): https://codereview.chromium.org/14476011/diff/41002/build/android/gyp/copy_resources_v17.py#newcode1 build/android/gyp/copy_resources_v17.py:1: #!/usr/bin/env python maybe name this copy_v17_resources.py for consistency ...
7 years, 8 months ago (2013-04-26 21:22:24 UTC) #21
cjhopman
https://codereview.chromium.org/14476011/diff/41002/build/android/gyp/copy_resources_v17.py File build/android/gyp/copy_resources_v17.py (right): https://codereview.chromium.org/14476011/diff/41002/build/android/gyp/copy_resources_v17.py#newcode30 build/android/gyp/copy_resources_v17.py:30: build_utils.CopyFile(input_filename, output_filename) On 2013/04/26 21:22:24, newt wrote: > Did ...
7 years, 8 months ago (2013-04-26 21:48:47 UTC) #22
cjhopman
https://codereview.chromium.org/14476011/diff/41002/build/android/gyp/generate_v14_resources.py File build/android/gyp/generate_v14_resources.py (right): https://codereview.chromium.org/14476011/diff/41002/build/android/gyp/generate_v14_resources.py#newcode35 build/android/gyp/generate_v14_resources.py:35: ATTRIBUTES_TO_MAP_NS[(ATTRIBUTE_NAMESPACE, k)] = (ATTRIBUTE_NAMESPACE , v) On 2013/04/26 21:22:24, ...
7 years, 8 months ago (2013-04-26 21:50:00 UTC) #23
newt (away)
https://codereview.chromium.org/14476011/diff/41002/build/android/gyp/copy_resources_v17.py File build/android/gyp/copy_resources_v17.py (right): https://codereview.chromium.org/14476011/diff/41002/build/android/gyp/copy_resources_v17.py#newcode1 build/android/gyp/copy_resources_v17.py:1: #!/usr/bin/env python On 2013/04/26 21:22:24, newt wrote: > maybe ...
7 years, 8 months ago (2013-04-26 22:50:47 UTC) #24
Kibeom Kim (inactive)
Fixed. But I found that v14 is not overriding the original resources. It overrided before, ...
7 years, 8 months ago (2013-04-27 00:05:07 UTC) #25
Kibeom Kim (inactive)
Actually, it's overriding. confirmed it by converting paddingStart="..." to paddingLeft="100dp" in generate_v14_resources.py and saw that ...
7 years, 8 months ago (2013-04-27 00:20:27 UTC) #26
Kibeom Kim (inactive)
ready for review.
7 years, 7 months ago (2013-05-03 18:31:59 UTC) #27
Kibeom Kim (inactive)
https://codereview.chromium.org/14476011/diff/54001/build/java.gypi File build/java.gypi (right): https://codereview.chromium.org/14476011/diff/54001/build/java.gypi#newcode158 build/java.gypi:158: 'all_res_dirs': ['<@(res_input_dirs)', '>@(additional_res_input_dirs)'], line too long.
7 years, 7 months ago (2013-05-03 18:46:03 UTC) #28
newt (away)
looks good, just a couple picky nits https://codereview.chromium.org/14476011/diff/54001/build/android/gyp/copy_v17_resources.py File build/android/gyp/copy_v17_resources.py (right): https://codereview.chromium.org/14476011/diff/54001/build/android/gyp/copy_v17_resources.py#newcode6 build/android/gyp/copy_v17_resources.py:6: """Copy resource ...
7 years, 7 months ago (2013-05-03 20:16:16 UTC) #29
Kibeom Kim (inactive)
https://codereview.chromium.org/14476011/diff/54001/build/android/gyp/copy_v17_resources.py File build/android/gyp/copy_v17_resources.py (right): https://codereview.chromium.org/14476011/diff/54001/build/android/gyp/copy_v17_resources.py#newcode6 build/android/gyp/copy_v17_resources.py:6: """Copy resource files and add -v17 to the sub ...
7 years, 7 months ago (2013-05-03 20:34:57 UTC) #30
newt (away)
two more nits... and lgtm https://codereview.chromium.org/14476011/diff/65002/build/android/gyp/generate_v14_resources.py File build/android/gyp/generate_v14_resources.py (right): https://codereview.chromium.org/14476011/diff/65002/build/android/gyp/generate_v14_resources.py#newcode69 build/android/gyp/generate_v14_resources.py:69: on the attribute names.""" ...
7 years, 7 months ago (2013-05-03 20:57:34 UTC) #31
cjhopman
lgtm with a couple small nits/thoughts https://codereview.chromium.org/14476011/diff/69001/build/android/gyp/copy_v17_resources.py File build/android/gyp/copy_v17_resources.py (right): https://codereview.chromium.org/14476011/diff/69001/build/android/gyp/copy_v17_resources.py#newcode7 build/android/gyp/copy_v17_resources.py:7: """Copy resource files ...
7 years, 7 months ago (2013-05-03 21:23:04 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kkimlabs@chromium.org/14476011/82001
7 years, 7 months ago (2013-05-03 22:09:45 UTC) #33
Kibeom Kim (inactive)
https://codereview.chromium.org/14476011/diff/65002/build/android/gyp/generate_v14_resources.py File build/android/gyp/generate_v14_resources.py (right): https://codereview.chromium.org/14476011/diff/65002/build/android/gyp/generate_v14_resources.py#newcode69 build/android/gyp/generate_v14_resources.py:69: on the attribute names.""" On 2013/05/03 20:57:34, newt wrote: ...
7 years, 7 months ago (2013-05-03 22:09:57 UTC) #34
commit-bot: I haz the power
Failed to trigger a try job on win_x64_rel HTTP Error 400: Bad Request
7 years, 7 months ago (2013-05-04 00:36:46 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kkimlabs@chromium.org/14476011/89001
7 years, 7 months ago (2013-05-04 00:36:52 UTC) #36
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 7 months ago (2013-05-04 13:34:19 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kkimlabs@chromium.org/14476011/89001
7 years, 7 months ago (2013-05-04 14:11:21 UTC) #38
commit-bot: I haz the power
7 years, 7 months ago (2013-05-04 15:47:21 UTC) #39
Message was sent while issue was closed.
Change committed as 198325

Powered by Google App Engine
This is Rietveld 408576698