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

Code improvements for media file downloading #6334

Merged
merged 6 commits into from
Aug 13, 2024

Conversation

grzesiek2010
Copy link
Member

@grzesiek2010 grzesiek2010 commented Aug 12, 2024

Why is this the best possible solution? Were any other approaches considered?

I've introduced sanitizing media file names and removed the support for InstanceProvider#update as we discussed with @seadowg.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

The only thing that is worth testing here is downloading forms with media files.

Do we need any specific form for testing your changes? If so, please attach one.

No.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

No.

Before submitting this PR, please make sure you have:

  • added or modified tests for any new or changed behavior
  • run ./gradlew connectedAndroidTest (or ./gradlew testLab) and confirmed all checks still pass
  • added a comment above any new strings describing it for translators
  • added any new strings with date formatting to DateFormatsTest
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.
  • verified that any new UI elements use theme colors. UI Components Style guidelines

@seadowg seadowg changed the title Odk 01 00 Code improvements Aug 12, 2024
@seadowg seadowg changed the title Code improvements Code improvements for media file downloading Aug 12, 2024
@grzesiek2010 grzesiek2010 marked this pull request as ready for review August 12, 2024 12:35
@grzesiek2010 grzesiek2010 requested a review from seadowg August 12, 2024 12:35
@seadowg seadowg changed the base branch from master to v2024.2.x August 12, 2024 13:28
@seadowg seadowg changed the base branch from v2024.2.x to master August 12, 2024 13:28
Copy link
Member

@seadowg seadowg left a comment

Choose a reason for hiding this comment

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

This needs to merge into v2024.2.x instead of master

@grzesiek2010 grzesiek2010 changed the base branch from master to v2024.2.x August 13, 2024 09:32
@grzesiek2010 grzesiek2010 requested a review from seadowg August 13, 2024 09:58
DaggerUtils.getComponent(getContext()).inject(this);

String projectId = getProjectId(uri);
logServerEvent(projectId, AnalyticsEvents.INSTANCE_PROVIDER_UPDATE);
Copy link
Member

Choose a reason for hiding this comment

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

This analytics event should be deleted as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@grzesiek2010 grzesiek2010 requested a review from seadowg August 13, 2024 13:49
@seadowg seadowg merged commit c720c27 into getodk:v2024.2.x Aug 13, 2024
6 checks passed
@seadowg seadowg added needs testing high priority Should be looked at before other PRs/issues labels Aug 13, 2024
@WKobus
Copy link

WKobus commented Aug 16, 2024

Tested with Success!

Verified on device with Android 14
Dominika verified this PR on Android 10

Verified Cases:

  • Downloading forms with media files
  • Uploading different types of media files
  • Updating media files
  • Cancelling downloading of forms with media files
  • Manual and match exactly update settings

seadowg added a commit to seadowg/collect that referenced this pull request Aug 22, 2024
Code improvements for media file downloading
seadowg added a commit to seadowg/collect that referenced this pull request Aug 23, 2024
Code improvements for media file downloading
grzesiek2010 pushed a commit to grzesiek2010/collect that referenced this pull request Oct 29, 2024
Code improvements for media file downloading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
behavior verified high priority Should be looked at before other PRs/issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants