Commit 6d21e939 authored by Felix Paul Kühne's avatar Felix Paul Kühne

App Delegate: remove time-out until passcode is requested since this wasn't...

App Delegate: remove time-out until passcode is requested since this wasn't secure enough for users who enabled the feature
parent e5f39a6a
......@@ -41,8 +41,6 @@
@property (nonatomic, strong) GHRevealViewController *revealController;
@property (nonatomic, strong) VLCMenuTableViewController *menuViewController;
@property (nonatomic, retain) NSDate *nextPasscodeCheckDate;
@property (nonatomic) VLCHTTPUploaderController *uploadController;
@end
......@@ -26,8 +26,6 @@
#import "VLCHTTPUploaderController.h"
#import "VLCMenuTableViewController.h"
#define PASSCODE_CHECK_INTERVAL 300
@interface VLCAppDelegate () <PAPasscodeViewControllerDelegate, VLCMediaFileDiscovererDelegate> {
PAPasscodeViewController *_passcodeLockController;
VLCDropboxTableViewController *_dropboxTableViewController;
......@@ -158,12 +156,12 @@
- (void)applicationWillResignActive:(UIApplication *)application
{
self.nextPasscodeCheckDate = [NSDate dateWithTimeIntervalSinceNow:PASSCODE_CHECK_INTERVAL];
[[MLMediaLibrary sharedMediaLibrary] applicationWillExit];
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
[self validatePasscode];
[[MLMediaLibrary sharedMediaLibrary] updateMediaDatabase];
[self updateMediaList];
}
......@@ -271,20 +269,16 @@
}
if (!self.passcodeValidated) {
if ([self.nextPasscodeCheckDate earlierDate:[NSDate date]] == self.nextPasscodeCheckDate) {
_passcodeLockController = [[PAPasscodeViewController alloc] initForAction:PasscodeActionEnter];
_passcodeLockController.delegate = self;
_passcodeLockController.passcode = passcode;
self.window.rootViewController = _passcodeLockController;
} else
self.passcodeValidated = YES;
_passcodeLockController = [[PAPasscodeViewController alloc] initForAction:PasscodeActionEnter];
_passcodeLockController.delegate = self;
_passcodeLockController.passcode = passcode;
self.window.rootViewController = _passcodeLockController;
}
}
- (void)PAPasscodeViewControllerDidEnterPasscode:(PAPasscodeViewController *)controller
{
// TODO add transition animation, i.e. fade
self.nextPasscodeCheckDate = [NSDate dateWithTimeIntervalSinceNow:PASSCODE_CHECK_INTERVAL];
self.window.rootViewController = self.revealController;
}
......
......@@ -82,8 +82,6 @@
[defaults setObject:@(YES) forKey:kVLCSettingPasscodeOnKey];
[defaults setObject:controller.passcode forKey:kVLCSettingPasscodeKey];
[defaults synchronize];
VLCAppDelegate* appDelegate = [UIApplication sharedApplication].delegate;
appDelegate.nextPasscodeCheckDate = [NSDate dateWithTimeIntervalSinceNow:300];
[controller dismissViewControllerAnimated:YES completion:nil];
}
......
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