Closed ghost closed 8 years ago
See comments on https://github.com/UnknownUntilNow/Local-GSM-Backend/commit/8a7d1ecd5bfc43c2bc4c4db54a1136729ad55206
the /sdcard/.nogapps directory may have other items unrelated to Local-GMS-Backend which need to be left alone. So the existence of the directory is not a good check nor is moving everything in it a good thing to do.
Update: Maybe the blankstore directory can be deleted. It looks like BlankStore will rebuild it. Not sure if there are any other older nogapps/microG components that use that directory however so it would still be better to only move (or copy/delete) those used by Local-GSM-Backend.
Now only the files which are relevant for LocalGsmBackend are moved (and the .nogapps directory is kept).
Because "/sdcard/.nogapps/" and "/sdcard/Android/data/org.fitchfamily.android-gsmlocation/files" are on the same mount point ("/sdcard/" which is an internal or an external sdcard) using renameTo will work.
The files are moved when calling Settings.with(...).
Fix issue #33 since the lacells database sharing between other apps is insignificant.
The READ/WRITE_EXTERNAL_STORAGE permission should not be removed before all users installed the updated version and used it at least once (opened the app or used the location service).
When the READ/WRITE_EXTERNAL_STORAGE permission is removed, the permission check (and request) from the UpdateDatabaseFragment and the data moving from the settings class should be removed too.