Repository navigation
feat: removed use of storage manager script #3172
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
Merged
RohitKushvaha01
merged 3 commits into
Acode-Foundation:main
from
RohitKushvaha01:storage_manager
Dec 5, 2026
+60
−29
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,5 @@ | ||
| #!/usr/bin/env node | ||
| import readline from "node:readline/promises"; | ||
| import { readFile, writeFile } from "node:fs/promises"; | ||
|
|
||
| const manifest = new URL("../platforms/android/app/src/main/AndroidManifest.xml", import.meta.url); | ||
| const args = process.argv.slice(2); | ||
| let answer = args[0]; | ||
| if (!answer) { | ||
| const prompt = readline.createInterface({ input: process.stdin, output: process.stdout }); | ||
| answer = await prompt.question("Enable 'MANAGE_EXTERNAL_STORAGE' permission? Y/n: "); | ||
| prompt.close(); | ||
| } | ||
| if (!["y", "yes", "--yes", "-y", "n", "no", "--no", "-n"].includes(answer.toLowerCase())) throw new Error("Choose yes or no."); | ||
| const enabled = ["y", "yes", "--yes", "-y"].includes(answer.toLowerCase()); | ||
| const source = await readFile(manifest, "utf8"); | ||
| const permission = ' <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />'; | ||
| const clean = source.replace(/\s*<uses-permission android:name="android\.permission\.MANAGE_EXTERNAL_STORAGE"\s*\/>/g, ""); | ||
| await writeFile(manifest, enabled ? clean.replace("</manifest>", `${permission}\n</manifest>`) : clean); | ||
| console.log(`All-files access ${enabled ? "enabled" : "disabled"} for the next Android build.`); | ||
| console.log( | ||
| "All-files access is declared permanently in the fdroid flavor; storage_manager is a no-op.", | ||
| ); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" /> | ||
| </manifest> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import { Storage } from "happy-dom"; | ||
|
|
||
| // Node 25+ defines localStorage/sessionStorage globally but leaves them | ||
| // undefined without --localstorage-file, which stops Vitest from installing | ||
| // happy-dom's implementations on the global object. | ||
| if (typeof window !== "undefined") { | ||
| for (const key of ["localStorage", "sessionStorage"]) { | ||
| Object.defineProperty(globalThis, key, { | ||
| value: new Storage(), | ||
| configurable: true, | ||
| }); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.