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(prepare): delete splash screens if none are used #1227

Merged
merged 2 commits into from May 6, 2021

Conversation

raphinesse
Copy link
Contributor

@raphinesse raphinesse commented May 4, 2021

Motivation and Context

We copy default splash screens to the platform folder during platform creation. But then we do not delete them when the user uses no splash screens at all. This causes #1226 and what is described in #689.

Fixes #1226

Description

The new implementation does not return early when updating splashes and none are defined. Instead, we let the cleanup map we create initially take care of deleting all unused splash screens. This also deletes the default splashes during the first prepare after platform creation.

Testing

Manual testing on a default app.
A regression test would be great but I'm on a tight schedule. Feel free to add one if you feel like it.

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@raphinesse raphinesse added the bug label May 4, 2021
@raphinesse raphinesse requested review from erisu and breautek May 4, 2021 08:41
@raphinesse raphinesse added this to the 9.1.1 milestone May 4, 2021
@codecov-commenter
Copy link

codecov-commenter commented May 4, 2021

Codecov Report

Merging #1227 (fa37f1a) into master (f9e8ce8) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1227      +/-   ##
==========================================
- Coverage   71.97%   71.95%   -0.02%     
==========================================
  Files          21       21              
  Lines        1695     1694       -1     
==========================================
- Hits         1220     1219       -1     
  Misses        475      475              
Impacted Files Coverage Δ
bin/templates/cordova/lib/prepare.js 47.78% <ø> (-0.17%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f9e8ce8...fa37f1a. Read the comment docs.

@raphinesse raphinesse merged commit 1b78746 into apache:master May 6, 2021
@raphinesse raphinesse deleted the fix-1226 branch May 6, 2021 07:30
wedgberto pushed a commit to wedgberto/cordova-android that referenced this pull request May 17, 2022
Currently, we copy default splash screens to the platform folder during platform creation, but then we do not delete them when the user uses no splash screens at all. This causes apache#1226 and what is described in apache#689.

The new implementation does not return early when updating splashes and none are defined. Instead, we let the cleanup map we create initially take care of deleting all unused splash screens. This also deletes the default splashes during the first prepare after platform creation.

Fixes apache#1226
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default splash screens end up in APKs even if no splash screens are used
4 participants