Skip to content

Conversation

@ashpieboop
Copy link
Contributor

@ashpieboop ashpieboop commented Dec 16, 2019

Fix denied access (throwing FileNotFoundExceptions) to "out of scoped storage" files.

https://developer.android.com/training/data-storage/compatibility

The Nextcloud android app needs to access any external storage in the case of a custom folder sync or external media file folders.

While I named the branch "-workaround", it looks like the app will never use scoped storage unless it implements some on-demand by path access permission (correct me if I'm wrong).

@ashpieboop ashpieboop added 3. to review needs info Waiting for info from user(s). Issues with this label will auto-stale. labels Dec 16, 2019
Signed-off-by: Alice Gaudon <alice@gaudon.pro>
@ashpieboop ashpieboop force-pushed the android-10-scoped-storage-workaround branch from f46f15e to 1919a66 Compare December 16, 2019 10:56
@nextcloud-android-bot
Copy link
Collaborator

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/12008.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@nextcloud-android-bot
Copy link
Collaborator

Codacy

328

Lint

TypemasterPR
Warnings7373
Errors00

SpotBugs (new)

Warning TypeNumber
Bad practice Warnings26
Correctness Warnings70
Internationalization Warnings13
Malicious code vulnerability Warnings5
Multithreaded correctness Warnings9
Performance Warnings106
Security Warnings44
Dodgy code Warnings136
Total409

SpotBugs (master)

Warning TypeNumber
Bad practice Warnings26
Correctness Warnings70
Internationalization Warnings13
Malicious code vulnerability Warnings5
Multithreaded correctness Warnings9
Performance Warnings106
Security Warnings44
Dodgy code Warnings136
Total409

@codecov
Copy link

codecov bot commented Dec 16, 2019

Codecov Report

Merging #5014 into master will increase coverage by 0.1%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master    #5014     +/-   ##
===========================================
+ Coverage     17.57%   17.68%   +0.1%     
  Complexity        3        3             
===========================================
  Files           385      385             
  Lines         32679    32679             
  Branches       4594     4594             
===========================================
+ Hits           5743     5778     +35     
+ Misses        26009    25970     -39     
- Partials        927      931      +4
Impacted Files Coverage Δ Complexity Δ
.../third_parties/daveKoeller/AlphanumComparator.java 80.95% <0%> (-1.2%) 0% <0%> (ø)
...oud/android/ui/activity/SyncedFoldersActivity.java 26.31% <0%> (ø) 0% <0%> (ø) ⬇️
...cloud/android/ui/activity/FileDisplayActivity.java 21.09% <0%> (+0.8%) 0% <0%> (ø) ⬇️
...in/java/com/owncloud/android/utils/ThemeUtils.java 50.97% <0%> (+1.55%) 0% <0%> (ø) ⬇️
...m/owncloud/android/ui/activity/DrawerActivity.java 45.46% <0%> (+2.3%) 0% <0%> (ø) ⬇️
...in/java/com/owncloud/android/datamodel/OCFile.java 67.11% <0%> (+3.15%) 0% <0%> (ø) ⬇️

@tobiasKaminsky
Copy link
Member

tobiasKaminsky commented Dec 16, 2019

it looks like the app will never use scoped storage unless it implements some on-demand by path access permission (correct me if I'm wrong).

I did not had the time to look into scoped storages…
Let us discuss this in a new issue.

@AndyScherzinger AndyScherzinger merged commit 8daa9a2 into master Dec 16, 2019
@delete-merged-branch delete-merged-branch bot deleted the android-10-scoped-storage-workaround branch December 16, 2019 13:45
@AndyScherzinger AndyScherzinger added this to the Nextcloud App 3.10.0 milestone Dec 16, 2019
@AndyScherzinger AndyScherzinger removed the needs info Waiting for info from user(s). Issues with this label will auto-stale. label Dec 16, 2019
tobiasKaminsky added a commit that referenced this pull request Dec 17, 2019
8daa9a2 Merge pull request #5014 from nextcloud/android-10-scoped-storage-workaround
1919a66 Opt-out of scoped storage
1656f64 Merge pull request #5012 from nextcloud/darkThemePref
74ab9a0 Merge pull request #5013 from nextcloud/addLibCommit
0ad5785 add library commit hash for reproducable builds
b065e9b fix dark theme preference for dev version: use different preference name
14a7493 [tx-robot] updated from transifex
a6eb5dd [tx-robot] updated from transifex
669b269 daily dev 20191214
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants