By definition, there is no such thing as a temporary directory on Android. However, at the moment, GetSpecialSystemDirectory returns "/tmp", which is simply false. Either GetSpecialSystemDirectory should fail on Android, or we should implement a notion of temporary directory by ourselves.
Turns out that I'm partially wrong. Thanks to GeckoAppShell monkey-patching TEMP, GetSpecialSystemDirectory returns an existing directory. However, this directory does not behave as a temporary directory, insofar as it is never cleaned-up. I suggest the following mechanism: - don't return Activity.getDir("tmp", ...) but Activity.getDir("tmp/randomuniquename", ...) - store both that directory and Activity.getDir("tmp", ...) - spawn a thread that, after a few seconds, starts progressively removing all other directories from "tmp".
Working on a patch.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.