guardianproject / haven

Haven is for people who need a way to protect their personal spaces and possessions without compromising their own privacy, through an Android app and on-device sensors
https://guardianproject.github.io/haven/
GNU General Public License v3.0
6.58k stars 728 forks source link

Logs cannot be deleted in Android 7 #354

Closed ghost closed 5 years ago

ghost commented 5 years ago

The deleting of Logs is still not fixed. Using the Menu "Delete all Logs" wipes the Logs. Also I can wipe a log swiping it to a side. But when I restart or choose Menu and then Back all Logs are still there.

lukeswitz commented 5 years ago

The 3s delay to allow for an 'Undo' causes this in most cases. Reproducible at API levels 22-28 emulator/device.

The good news is #307 from @archie94 is on the way with a fantastic persistence layer, eliminating potential for these documented bugs. Hope that's of help in the interim.

Cheers, Luke

deviantollam commented 5 years ago

i found (and reported in a different issue, #333) that if Haven attempts to delete a log (by either swipe or menu command) but doesn't find all of the files it was expecting to find within the folder (say, maybe a user moved the photos and such somewhere off of the device) then Haven's delete command kind of shits the bed or something and just gives up.

So the logs appear to vanish, but if you leave that screen and come back... the logs appear back again. Are you possibly trying to delete logs but have previously removed some image files, etc?

(You can clean all this up, a bit clumsily, by clearing all android app data from Haven. All logs will finally be gone, but so will any of your configuration settings)

archie94 commented 5 years ago

As reported in #333 Haven's delete command is incomplete if either the database or the file corresponding to any Event Trigger is not removed. Hence even if the files are removed from the storage directory on disk the app keeps a record of the log(s) and leads to an inconsistent state.

307 aims to handle this and the bugs due to the 3s delay for 'Undo' better. It is almost done and hopefully, by this weekend I will be able to wrap up the remaining tasks and ready the patch for review.

Big thanks to all for reporting these bugs. Please report more if you find.

absorber commented 5 years ago

I can confirm this on Android 6 as well.

n8fr8 commented 5 years ago

This all be fixed with the latest merge of #307. Please test nightly from F-Droid and/or wait for the next 0.2.0 release build.

n8fr8 commented 5 years ago

Fixed in the latest 0.2.0 beta 3 release