Closed L-Henke closed 9 years ago
In this PR this is to be expected, because it contains the faulty #116, but not the fix #121.
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.
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 ;-)
A quick test shows, that the broadcast receiver will work in the FilePhotoFragment(Activity) https://github.com/L-Henke/secrecy/commit/7c13a8784cba9e129670f1356625c8f1e175613c
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.
Closed, because according to @StelianMorariu this doesn't work reliable.
Maybe this fix works better :) It was a little confusing that the FilePhotoFragment.java contains an FragmentActivity and a FragmentStatePagerAdapter.