forked from mirrors/linphone-iphone
disable VFS for simulators or error case
This commit is contained in:
parent
7183116b4b
commit
d88641c31c
2 changed files with 19 additions and 6 deletions
|
|
@ -269,10 +269,16 @@
|
|||
#endif
|
||||
|
||||
|
||||
if ([[LinphoneManager instance] lpConfigBoolForKey:@"vfs_enabled_preference"] && !VFSUtil.activateVFS) {
|
||||
[VFSUtil oslogWithLog:@"[VFS] Error unable to activate." level:OS_LOG_TYPE_ERROR];
|
||||
if ([[LinphoneManager instance] lpConfigBoolForKey:@"vfs_enabled_preference"]) {
|
||||
if (TARGET_IPHONE_SIMULATOR) {
|
||||
LOGW(@"[VFS] Can not active for simulators.");
|
||||
[[LinphoneManager instance] lpConfigSetBool:FALSE forKey:@"vfs_enabled_preference"];
|
||||
} else if (!VFSUtil.activateVFS) {
|
||||
[VFSUtil oslogWithLog:@"[VFS] Error unable to activate." level:OS_LOG_TYPE_ERROR];
|
||||
[[LinphoneManager instance] lpConfigSetBool:FALSE forKey:@"vfs_enabled_preference"];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
UIApplication *app = [UIApplication sharedApplication];
|
||||
UIApplicationState state = app.applicationState;
|
||||
|
||||
|
|
|
|||
|
|
@ -784,10 +784,17 @@
|
|||
[lm lpConfigSetString:[self stringForKey:@"auto_download_mode"] forKey:@"auto_download_mode"];
|
||||
BOOL vfsEnabled = [self boolForKey:@"vfs_enabled_mode"] || [lm lpConfigBoolForKey:@"vfs_enabled_preference"];
|
||||
if (vfsEnabled) {
|
||||
[lm lpConfigSetBool:TRUE forKey:@"vfs_enabled_preference"];
|
||||
[self setBool:TRUE forKey:@"vfs_enabled_mode"];
|
||||
if (!VFSUtil.activateVFS) {
|
||||
if (TARGET_IPHONE_SIMULATOR) {
|
||||
LOGW(@"[VFS] Can not active for simulators.");
|
||||
[lm lpConfigSetBool:FALSE forKey:@"vfs_enabled_preference"];
|
||||
[self setBool:FALSE forKey:@"vfs_enabled_mode"];
|
||||
} else if (!VFSUtil.activateVFS) {
|
||||
[VFSUtil oslogWithLog:@"[VFS] Error unable to activate." level:OS_LOG_TYPE_ERROR];
|
||||
[lm lpConfigSetBool:FALSE forKey:@"vfs_enabled_preference"];
|
||||
[self setBool:FALSE forKey:@"vfs_enabled_mode"];
|
||||
} else {
|
||||
[lm lpConfigSetBool:TRUE forKey:@"vfs_enabled_preference"];
|
||||
[self setBool:TRUE forKey:@"vfs_enabled_mode"];
|
||||
}
|
||||
}
|
||||
[lm lpConfigSetBool:[self boolForKey:@"auto_write_to_gallery_mode"] forKey:@"auto_write_to_gallery_preference"];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue