webview: Allow passing activity meta-data#5
webview: Allow passing activity meta-data#5dbnicholson merged 1 commit intomulti_arch_webview_updatesfrom
Conversation
to the Android manifest XML. https://phabricator.endlessm.com/T33607
dylanmccall
left a comment
There was a problem hiding this comment.
Looks good to me! Do you think they would be interested in this upstream, as well?
|
This looks useful upstream, but for all the bootstraps that provide activities. Upstream would probably want a test for it. |
dbnicholson
left a comment
There was a problem hiding this comment.
Looks good to me. It could be polished more for an upstream submittal, but I think this is fine to get moving.
| {%- if args.intent_filters -%} | ||
| {{- args.intent_filters -}} | ||
| {%- endif -%} | ||
| {% for m in args.activity_meta_data %} |
There was a problem hiding this comment.
Suffix the Jinja block with {%- and it will strip the whitespace before it. Then you can put the endif directive on a newline with the same and it will come out correctly. Although, the previous line should probably not do -%}.
| {{- args.intent_filters -}} | ||
| {%- endif -%} | ||
| {% for m in args.activity_meta_data %} | ||
| <meta-data android:name="{{ m.split('=', 1)[0] }}" android:value="{{ m.split('=', 1)[-1] }}"/>{% endfor %} |
There was a problem hiding this comment.
It's nice to do this all in Jinja, but I would probably prefer to do this in build.py and substitute fully prepared statements.
There was a problem hiding this comment.
Good points! I was just copying the for loop in this same template for the application meta-data. Do you think I should update those along the way? Or prefer inconsistency?
There was a problem hiding this comment.
Oh, I skimmed the existing code too fast. I personally would like to clean up the old one, but upstream may feel different. I think I'd probably just leave the existing code alone.
I will propose it upstream, yes. As @dbnicholson said, it has to be for all the bootstraps, not just the webview one. |
|
PR upstream: kivy#2627 |
|
This is good enough for downstream usage. We can always clean up if/when upstream responds. |
to the Android manifest XML.
https://phabricator.endlessm.com/T33607