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

android: extract resources to external storage on first launch #15396

Merged
merged 1 commit into from Feb 9, 2017

Conversation

@zhuowei
Copy link
Contributor

zhuowei commented Feb 6, 2017

If /sdcard/servo doesn't exist, extract it from the assets/ folder of the APK. This fixes issue #12129.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #12129 (github issue number if applicable).
  • There are tests for these changes OR
  • These changes do not require tests because _____

I tested this on a Nexus 6P running Android 7.1: on launch, the app correctly detects that /sdcard/servo is missing, extracts the contents from assets/, and launches without force closing.

This is my first Servo pull request, so apologies in advance if I'm doing something wrong. Also, I was unable to build the entirety of Servo from source (complains about missing freetype), so I just built the Java portion separately; would that impact anything?


This change is Reviewable

@highfive
Copy link

highfive commented Feb 6, 2017

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @nox (or someone else) soon.

@zhuowei
Copy link
Contributor Author

zhuowei commented Feb 6, 2017

@larsbergstrom is this ok?

@nox nox assigned larsbergstrom and unassigned nox Feb 8, 2017
@larsbergstrom
Copy link
Contributor

larsbergstrom commented Feb 9, 2017

@bors-servo r+

@zhuowei This is an AMAZING first version - thanks a ton! It will really especially help for new users grabbing the APK for the first time. We can work on a follow-update later that handles extracting updated versions / doing cleanup, but this provides a much improved experience and a good basis for that next step.

@bors-servo
Copy link
Contributor

bors-servo commented Feb 9, 2017

📌 Commit f101956 has been approved by larsbergstrom

@bors-servo
Copy link
Contributor

bors-servo commented Feb 9, 2017

Testing commit f101956 with merge 349971b...

bors-servo added a commit that referenced this pull request Feb 9, 2017
…trom

android: extract resources to external storage on first launch

<!-- Please describe your changes on the following line: -->

If /sdcard/servo doesn't exist, extract it from the assets/ folder of the APK. This fixes issue #12129.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #12129 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

I tested this on a Nexus 6P running Android 7.1: on launch, the app correctly detects that /sdcard/servo is missing, extracts the contents from assets/, and launches without force closing.

This is my first Servo pull request, so apologies in advance if I'm doing something wrong. Also, I was unable to build the entirety of Servo from source (complains about missing freetype), so I just built the Java portion separately; would that impact anything?

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15396)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Feb 9, 2017

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-gnu-dev, windows-msvc-dev
Approved by: larsbergstrom
Pushing 349971b to master...

@bors-servo bors-servo merged commit f101956 into servo:master Feb 9, 2017
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants
You can’t perform that action at this time.