SecrecySupportTeam / secrecy

http://forum.xda-developers.com/showthread.php?t=2704486
Apache License 2.0
79 stars 27 forks source link

Fixed: Exit to vault list on screen lock in photo view #124

Closed L-Henke closed 9 years ago

L-Henke commented 9 years ago

Maybe this fix works better :) It was a little confusing that the FilePhotoFragment.java contains an FragmentActivity and a FragmentStatePagerAdapter.

L-Henke commented 9 years ago

In this PR this is to be expected, because it contains the faulty #116, but not the fix #121.

StelianMorariu commented 9 years ago

This is still not working for me. I played around with creating a BroadcastReciever to recieve SCREEN_OFF events. The event gets intercepted correctly by the FilesActivity but I can't understand why the photos are still visible (you get an encrypted photo after screen unlock - but the view is still there). Ping me when you have time and I'll send a patch.

L-Henke commented 9 years ago

Without having seen your patch I can only guess. And I would guess: Because the FilesActivity is not the active activity when viewing a picture. It is FilePhotoFragment (which extends a FragmentActivity although the name doesn't really fit). That activity is together with the SamplePagerAdapter in the file FilePhotoFragment.java. That file is another candidate for a little refactorization ;-)

L-Henke commented 9 years ago

A quick test shows, that the broadcast receiver will work in the FilePhotoFragment(Activity) https://github.com/L-Henke/secrecy/commit/7c13a8784cba9e129670f1356625c8f1e175613c

StelianMorariu commented 9 years ago

Hmmm, please have a look at #129. I couldn't get the event to reach FilePhotoFragment, even if it did, the photo view would still be visible.

L-Henke commented 9 years ago

Closed, because according to @StelianMorariu this doesn't work reliable.