Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webview: Allow passing activity meta-data #5

Merged
merged 1 commit into from
Jul 7, 2022

Conversation

manuq
Copy link

@manuq manuq commented Jun 24, 2022

to the Android manifest XML.

https://phabricator.endlessm.com/T33607

Copy link

@dylanmccall dylanmccall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Do you think they would be interested in this upstream, as well?

@dbnicholson
Copy link
Member

This looks useful upstream, but for all the bootstraps that provide activities. Upstream would probably want a test for it.

Copy link
Member

@dbnicholson dbnicholson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. It could be polished more for an upstream submittal, but I think this is fine to get moving.

@@ -78,6 +78,8 @@
{%- if args.intent_filters -%}
{{- args.intent_filters -}}
{%- endif -%}
{% for m in args.activity_meta_data %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 -%}.

@@ -78,6 +78,8 @@
{%- if args.intent_filters -%}
{{- 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 %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@manuq
Copy link
Author

manuq commented Jun 27, 2022

Looks good to me! Do you think they would be interested in this upstream, as well?

I will propose it upstream, yes. As @dbnicholson said, it has to be for all the bootstraps, not just the webview one.

@manuq
Copy link
Author

manuq commented Jul 4, 2022

PR upstream: kivy#2627

@dbnicholson
Copy link
Member

This is good enough for downstream usage. We can always clean up if/when upstream responds.

@dbnicholson dbnicholson merged commit 3dcd0d3 into multi_arch_webview_updates Jul 7, 2022
@dbnicholson dbnicholson deleted the T33607-activity-metadata branch July 7, 2022 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants