Commit dd9197b8 authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

Remove legacy passcode conversation code and add missing return

(cherry picked from commit 7fcba87b)
parent 78aeb90c
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
* Stability improvements * Stability improvements
* Improved HTTP connectivity * Improved HTTP connectivity
* Improved UPnP reliability, notably with Twonky * Improved UPnP reliability, notably with Twonky
* Fixed issues unlocking the app when a passcode was never set
2.7.1: 2.7.1:
------ ------
......
...@@ -61,8 +61,7 @@ NSString *const VLCDropboxSessionWasAuthorized = @"VLCDropboxSessionWasAuthorize ...@@ -61,8 +61,7 @@ NSString *const VLCDropboxSessionWasAuthorized = @"VLCDropboxSessionWasAuthorize
else else
skipLoopFilterDefaultValue = kVLCSettingSkipLoopFilterNonRef; skipLoopFilterDefaultValue = kVLCSettingSkipLoopFilterNonRef;
NSDictionary *appDefaults = @{kVLCSettingPasscodeKey : @"", NSDictionary *appDefaults = @{kVLCSettingPasscodeAllowTouchID : @(1),
kVLCSettingPasscodeAllowTouchID : @(1),
kVLCSettingContinueAudioInBackgroundKey : @(YES), kVLCSettingContinueAudioInBackgroundKey : @(YES),
kVLCSettingStretchAudio : @(NO), kVLCSettingStretchAudio : @(NO),
kVLCSettingTextEncoding : kVLCSettingTextEncodingDefaultValue, kVLCSettingTextEncoding : kVLCSettingTextEncodingDefaultValue,
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#define kVLCVersionCodename @"All Along the Watchtower" #define kVLCVersionCodename @"All Along the Watchtower"
#define kVLCSettingPasscodeKey @"Passcode"
#define kVLCSettingPasscodeOnKey @"PasscodeProtection" #define kVLCSettingPasscodeOnKey @"PasscodeProtection"
#define kVLCSettingPasscodeAllowTouchID @"AllowTouchID" #define kVLCSettingPasscodeAllowTouchID @"AllowTouchID"
#define kVLCSettingContinueAudioInBackgroundKey @"BackgroundAudioPlayback" #define kVLCSettingContinueAudioInBackgroundKey @"BackgroundAudioPlayback"
......
...@@ -77,20 +77,6 @@ NSString *const VLCPasscode = @"org.videolan.vlc-ios.passcode"; ...@@ -77,20 +77,6 @@ NSString *const VLCPasscode = @"org.videolan.vlc-ios.passcode";
- (NSString *)_obtainPasscode - (NSString *)_obtainPasscode
{ {
NSString *passcode = [SSKeychain passwordForService:VLCPasscode account:VLCPasscode]; NSString *passcode = [SSKeychain passwordForService:VLCPasscode account:VLCPasscode];
if (!passcode) {
/* legacy passcode conversion to keychain - only do that once */
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
passcode = [defaults objectForKey:kVLCSettingPasscodeKey];
if (passcode && passcode.length > 0) {
APLog(@"Move passcode from setting to keychain");
[self setPasscode:passcode];
// delete passcode from old setting
[defaults removeObjectForKey:kVLCSettingPasscodeKey];
[defaults synchronize];
}
}
return passcode; return passcode;
} }
...@@ -117,6 +103,7 @@ NSString *const VLCPasscode = @"org.videolan.vlc-ios.passcode"; ...@@ -117,6 +103,7 @@ NSString *const VLCPasscode = @"org.videolan.vlc-ios.passcode";
NSString *passcode = [self _obtainPasscode]; NSString *passcode = [self _obtainPasscode];
if (passcode == nil || [passcode isEqualToString:@""]) { if (passcode == nil || [passcode isEqualToString:@""]) {
[[NSNotificationCenter defaultCenter] postNotificationName:VLCPasscodeValidated object:self]; [[NSNotificationCenter defaultCenter] postNotificationName:VLCPasscodeValidated object:self];
return;
} }
_passcodeLockController = [[PAPasscodeViewController alloc] initForAction:PasscodeActionEnter]; _passcodeLockController = [[PAPasscodeViewController alloc] initForAction:PasscodeActionEnter];
......
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