only reset validation flag once we actually went to the background

This commit is contained in:
Stephan Diederich 2013-09-24 17:28:42 +02:00
parent bc9ee21078
commit 9ddcad6da7

View File

@ -666,7 +666,10 @@ static NSString* const kBITAuthenticatorAuthTokenTypeKey = @"BITAuthenticatorAut
} }
- (void)applicationWillResignActive:(NSNotification *)note { - (void)applicationWillResignActive:(NSNotification *)note {
if(BITAuthenticatorAppRestrictionEnforcementOnAppActive == self.restrictionEnforcementFrequency) { //only reset if app is really going into the background, e.g not when pulling down
//the notification center
if(BITAuthenticatorAppRestrictionEnforcementOnAppActive == self.restrictionEnforcementFrequency &&
[[UIApplication sharedApplication] applicationState] == UIApplicationStateBackground) {
self.validated = NO; self.validated = NO;
} }
} }