Skip to content

Fix getPojavStorageRoot handling - #390

Open
thejudge156 wants to merge 2 commits into
v3_openjdkfrom
judge/storage_root_fix
Open

thejudge156 wants to merge 2 commits into
v3_openjdkfrom
judge/storage_root_fix

Conversation

@thejudge156

Copy link
Copy Markdown

Android spec dictates that getExternalFilesDir can return null.

Our getPojavStorageRoot will crash relying methods if getExternalFilesDir returns null, add handling for said case.

Notes:

  • Since this is the only shared storage location we can try, and we can't do shared, fall back to private directory.
  • Adds a marker file to indicate to the app that files are stored privately in case getExternalFilesDir's state changes later.

@alexytomi

Copy link
Copy Markdown
Member

Did you test whether the app actually works in private dir? Afaik there are a lot of strewn across assumptions using Android/data

@thejudge156

thejudge156 commented Oct 15, 2026 •

Copy link
Copy Markdown
Author

Did you test whether the app actually works in private dir? Afaik there are a lot of strewn across assumptions using Android/data

This only takes effect on Android >=29, I just double-checked and there aren't any references that should fire post Android 29.

I did not test it, as I do not have a device that can test that.

@thejudge156

Copy link
Copy Markdown
Author

Made a quick commit, just made the marker file name a constant.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants