Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
linphone-iphone
Commits
d88641c3
Commit
d88641c3
authored
May 10, 2021
by
DanmeiChen
Browse files
disable VFS for simulators or error case
parent
7183116b
Pipeline
#29009
passed with stage
in 4 minutes and 40 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
6 deletions
+19
-6
Classes/LinphoneAppDelegate.m
Classes/LinphoneAppDelegate.m
+9
-3
Classes/LinphoneCoreSettingsStore.m
Classes/LinphoneCoreSettingsStore.m
+10
-3
No files found.
Classes/LinphoneAppDelegate.m
View file @
d88641c3
...
...
@@ -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
;
...
...
Classes/LinphoneCoreSettingsStore.m
View file @
d88641c3
...
...
@@ -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"
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment