Skip to content

remove conditions and allow all flags#10

Closed
xcho1 wants to merge 1 commit intodevelopfrom
support-display-config-change
Closed

remove conditions and allow all flags#10
xcho1 wants to merge 1 commit intodevelopfrom
support-display-config-change

Conversation

@xcho1
Copy link

@xcho1 xcho1 commented Oct 14, 2022

Removed conditions to support fontScale and denstity flags.

Copy link

@manuq manuq left a comment

Choose a reason for hiding this comment

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

I'm proposing a different approach: bump our minimum SDK.

<activity android:name="org.kivy.android.PythonActivity"
android:label="@string/app_name"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|fontScale|uiMode{% if args.min_sdk_version >= 8 %}|uiMode{% endif %}{% if args.min_sdk_version >= 13 %}|screenSize|smallestScreenSize{% endif %}{% if args.min_sdk_version >= 17 %}|layoutDirection{% endif %}{% if args.min_sdk_version >= 24 %}|density{% endif %}"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|fontScale|uiMode|screenSize|smallestScreenSize|layoutDirection|density"
Copy link

Choose a reason for hiding this comment

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

The current conditionals are for the minimum SDK supported. In the .p4a configuration file we currently have:

--minsdk 21

So the only conditional that currently doesn't apply is density:

{% if args.min_sdk_version >= 24 %}|density{% endif %}

From docs https://developer.android.com/guide/topics/manifest/activity-element density was "Added in API level 24". So it seems right to keep the conditional in the template. We should instead bump our minimum SDK. SDK 21 is Android 5 which is way too old. I think we should bump to min SDK to 24.

Copy link
Author

Choose a reason for hiding this comment

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

yeah, it's safe to bump to SDK 24, but then the condition is alwyas true, so potentialy could be removed as well

Copy link

Choose a reason for hiding this comment

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

No, because the upstream template should still work with older SDKs for other projects. Ideally we are going to get rid of this fork and use upstream p4a. The only reason we have p4a forked is because we have PRs upstream that are still open.

@xcho1 xcho1 closed this Oct 21, 2022
@xcho1
Copy link
Author

xcho1 commented Oct 21, 2022

Updated minSdk in kolibri-installer-android project instead

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.

2 participants