Commit 481fccad authored by Felix Paul Kühne's avatar Felix Paul Kühne

App Delegate: don't ask for passcode if disabled by the user (close #8695)

parent 1ecea0ef
......@@ -62,7 +62,7 @@ static void PrintReachabilityFlags(SCNetworkReachabilityFlags flags, const ch
{
#if kShouldPrintReachabilityFlags
NSLog(@"Reachability Flag Status: %c%c %c%c%c%c%c%c%c %s\n",
APLog(@"Reachability Flag Status: %c%c %c%c%c%c%c%c%c %s\n",
(flags & kSCNetworkReachabilityFlagsIsWWAN) ? 'W' : '-',
(flags & kSCNetworkReachabilityFlagsReachable) ? 'R' : '-',
......
......@@ -49,7 +49,6 @@
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
if ([[DBSession sharedSession] handleOpenURL:url]) {
NSLog(@"dropbox URL handled");
[self.dropboxTableViewController updateViewAfterSessionChange];
return YES;
}
......@@ -91,7 +90,7 @@
- (void)applicationWillEnterForeground:(UIApplication *)application
{
NSLog(@"applicationWillEnterForeground: %i", self.passcodeValidated);
APLog(@"applicationWillEnterForeground: %i", self.passcodeValidated);
}
- (void)applicationDidBecomeActive:(UIApplication *)application
......@@ -140,11 +139,11 @@
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *passcode = [defaults objectForKey:kVLCSettingPasscodeKey];
if ([passcode isEqualToString:@""]) {
if ([passcode isEqualToString:@""] || ![[defaults objectForKey:kVLCSettingPasscodeOnKey] intValue]) {
self.passcodeValidated = YES;
return;
}
if (!self.passcodeValidated) {
if ([self.nextPasscodeCheckDate earlierDate:[NSDate date]] == self.nextPasscodeCheckDate) {
_passcodeLockController = [[PAPasscodeViewController alloc] initForAction:PasscodeActionEnter];
......
......@@ -31,7 +31,7 @@
- (void)settingDidChange:(NSNotification*)notification
{
if ([notification.object isEqual:kVLCSettingPasscodeOnKey]) {
BOOL passcodeOn = (BOOL)[[notification.userInfo objectForKey:@"PasscodeProtection"] intValue];
BOOL passcodeOn = (BOOL)[[notification.userInfo objectForKey:kVLCSettingPasscodeOnKey] intValue];
if (passcodeOn) {
PAPasscodeViewController *passcodeLockController = [[PAPasscodeViewController alloc] initForAction:PasscodeActionSet];
......
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