Commit 2041f52b authored by Felix Paul Kühne's avatar Felix Paul Kühne

Correctly activate Passcode lock after time-out (close #9252)

parent c43d49fa
......@@ -20,6 +20,8 @@
#import "VLCHTTPUploaderController.h"
#import "VLCMenuTableViewController.h"
#define PASSCODE_CHECK_INTERVAL 300
@interface VLCAppDelegate () <PAPasscodeViewControllerDelegate, VLCMediaFileDiscovererDelegate> {
PAPasscodeViewController *_passcodeLockController;
VLCDropboxTableViewController *_dropboxTableViewController;
......@@ -140,10 +142,12 @@
- (void)applicationWillEnterForeground:(UIApplication *)application
{
[[MLMediaLibrary sharedMediaLibrary] applicationWillStart];
[self validatePasscode];
}
- (void)applicationWillResignActive:(UIApplication *)application
{
self.nextPasscodeCheckDate = [NSDate dateWithTimeIntervalSinceNow:PASSCODE_CHECK_INTERVAL];
[[MLMediaLibrary sharedMediaLibrary] applicationWillExit];
}
......@@ -153,11 +157,6 @@
[self updateMediaList];
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
[self validatePasscode]; // Lock library when going to background
}
- (void)applicationWillTerminate:(UIApplication *)application
{
[[NSUserDefaults standardUserDefaults] synchronize];
......@@ -264,7 +263,7 @@
- (void)PAPasscodeViewControllerDidEnterPasscode:(PAPasscodeViewController *)controller
{
// TODO add transition animation, i.e. fade
self.nextPasscodeCheckDate = [NSDate dateWithTimeIntervalSinceNow:300];
self.nextPasscodeCheckDate = [NSDate dateWithTimeIntervalSinceNow:PASSCODE_CHECK_INTERVAL];
self.window.rootViewController = self.revealController;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment