n76 / Local-GSM-Backend

GSM LocationProvider backend for µg UnifiedNlp
Apache License 2.0
91 stars 23 forks source link

Move /sdcard/.nogapps to /sdcard/Android/data/org.fitchfamily.android.gsmlocation/files; Cleaned up code #52

Closed ghost closed 8 years ago

ghost commented 8 years ago

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.

n76 commented 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.

ghost commented 8 years ago

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.