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

fix: app crash when download asset #2093

Merged
merged 2 commits into from
Aug 14, 2023

Conversation

github-actions[bot]
Copy link
Contributor

Cherry pick from the original PR:


⚠️ Conflicts during cherry-pick:


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

When downloading an asset from the context menu, we were not checking for saving to external permission when user was on Android 9 (API level 28) or lower.

Causes (Optional)

We were not checking permissions.

Solutions

Change downloadAssetExternally to downloadOrFetchAssetAndShowDialog so there is a Dialog handling everything:

  • Checking for device API Level + Permissions
  • Save
  • Open
  • Cancel

And showing a snackbar when successfully saved.

Testing

How to Test

  • Open App
  • Open Conversation
  • Receive an Image or Audio file
  • do not grant file storage permission to app before-hand
  • Long click on Image/Audio file
  • Select Download from the context menu
  • A new Dialog should popup asking if you want to Save/Open/Cancel, if Save then asking permission will be shown

@github-actions github-actions bot added the cherry-pick PR is cherry-picking changes from another banch label Aug 11, 2023
@alexandreferris alexandreferris requested review from a team, gongracr, yamilmedina, alexandreferris, trOnk12 and ohassine and removed request for a team August 11, 2023 15:58
@AndroidBob
Copy link
Collaborator

Build 1049 succeeded.

The build produced the following APK's:

@ohassine ohassine added this pull request to the merge queue Aug 14, 2023
@github-actions
Copy link
Contributor Author

Test Results

533 tests  ±0   532 ✔️ ±0   5m 49s ⏱️ - 1m 48s
  79 suites ±0       1 💤 ±0 
  79 files   ±0       0 ±0 

Results for commit d2e9c81. ± Comparison against base commit db45542.

@github-actions
Copy link
Contributor Author

APKs built during tests are available here. Scroll down to Artifacts!

Merged via the queue into develop with commit 218494d Aug 14, 2023
12 of 13 checks passed
@ohassine ohassine deleted the fix/app_crash_when_download_asset-cherry-pick branch August 14, 2023 07:31
@AndroidBob
Copy link
Collaborator

Build 1053 succeeded.

The build produced the following APK's:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick PR is cherry-picking changes from another banch size/XS
Projects
None yet
5 participants