public static class SystemSettings
{
/// <summary>
- /// Lock for EventHandlers.
- /// </summary>
- private static readonly object LockObj = new object();
-
- /// <summary>
/// The file path of the current ringtone.
/// </summary>
/// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
{
string path = SystemSettings.IncomingCallRingtone;
IncomingCallRingtoneChangedEventArgs eventArgs = new IncomingCallRingtoneChangedEventArgs(path);
- s_incomingCallRingtoneChanged?.Invoke(null, eventArgs);
+ lock (s_incomingCallRingtoneChangedLockObj)
+ {
+ s_incomingCallRingtoneChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<IncomingCallRingtoneChangedEventArgs> s_incomingCallRingtoneChanged;
+ private static readonly object s_incomingCallRingtoneChangedLockObj = new object();
/// <summary>
/// The IncomingCallRingtoneChanged event is triggered when the file path of the incoming ringtone is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_incomingCallRingtoneChangedLockObj)
{
if (s_incomingCallRingtoneChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_incomingCallRingtoneChangedLockObj)
{
if (s_incomingCallRingtoneChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
string path = SystemSettings.WallpaperHomeScreen;
WallpaperHomeScreenChangedEventArgs eventArgs = new WallpaperHomeScreenChangedEventArgs(path);
- s_wallpaperHomeScreenChanged?.Invoke(null, eventArgs);
+ lock (s_wallpaperHomeScreenChangedLockObj)
+ {
+ s_wallpaperHomeScreenChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<WallpaperHomeScreenChangedEventArgs> s_wallpaperHomeScreenChanged;
+ private static readonly object s_wallpaperHomeScreenChangedLockObj = new object();
/// <summary>
/// THe WallpaperHomeScreenChanged event is triggered when the file path of the current home screen wallpaper is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_wallpaperHomeScreenChangedLockObj)
{
if (s_wallpaperHomeScreenChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_wallpaperHomeScreenChangedLockObj)
{
if (s_wallpaperHomeScreenChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
string path = SystemSettings.WallpaperLockScreen;
WallpaperLockScreenChangedEventArgs eventArgs = new WallpaperLockScreenChangedEventArgs(path);
- s_wallpaperLockScreenChanged?.Invoke(null, eventArgs);
+ lock (s_wallpaperLockScreenChangedLockObj)
+ {
+ s_wallpaperLockScreenChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<WallpaperLockScreenChangedEventArgs> s_wallpaperLockScreenChanged;
+ private static readonly object s_wallpaperLockScreenChangedLockObj = new object();
/// <summary>
/// The WallpaperLockScreenChanged event is triggered when the file path of the current lock screen wallpaper is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_wallpaperLockScreenChangedLockObj)
{
if (s_wallpaperLockScreenChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_wallpaperLockScreenChangedLockObj)
{
if (s_wallpaperLockScreenChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
SystemSettingsFontSize fontSize = SystemSettings.FontSize;
FontSizeChangedEventArgs eventArgs = new FontSizeChangedEventArgs(fontSize);
- s_fontSizeChanged?.Invoke(null, eventArgs);
+ lock (s_fontSizeChangedLockObj)
+ {
+ s_fontSizeChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<FontSizeChangedEventArgs> s_fontSizeChanged;
+ private static readonly object s_fontSizeChangedLockObj = new object();
/// <summary>
/// The FontSizeChanged event is triggered when the current system font size is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_fontSizeChangedLockObj)
{
if (s_fontSizeChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_fontSizeChangedLockObj)
{
if (s_fontSizeChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
string fontType = SystemSettings.FontType;
FontTypeChangedEventArgs eventArgs = new FontTypeChangedEventArgs(fontType);
- s_fontTypeChanged?.Invoke(null, eventArgs);
+ lock (s_fontTypeChangedLockObj)
+ {
+ s_fontTypeChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<FontTypeChangedEventArgs> s_fontTypeChanged;
+ private static readonly object s_fontTypeChangedLockObj = new object();
/// <summary>
/// The FontTypeChanged event is triggered when the current system font type is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_fontTypeChangedLockObj)
{
if (s_fontTypeChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_fontTypeChangedLockObj)
{
if (s_fontTypeChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
bool motionActivation = SystemSettings.MotionActivationEnabled;
MotionActivationSettingChangedEventArgs eventArgs = new MotionActivationSettingChangedEventArgs(motionActivation);
- s_motionActivationChanged?.Invoke(null, eventArgs);
+ lock (s_motionActivationChangedLockObj)
+ {
+ s_motionActivationChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<MotionActivationSettingChangedEventArgs> s_motionActivationChanged;
+ private static readonly object s_motionActivationChangedLockObj = new object();
/// <summary>
/// The MotionActivationChanged event is triggered when the motion service status is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_motionActivationChangedLockObj)
{
if (s_motionActivationChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_motionActivationChangedLockObj)
{
if (s_motionActivationChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
string emailAlertRingtone = SystemSettings.EmailAlertRingtone;
EmailAlertRingtoneChangedEventArgs eventArgs = new EmailAlertRingtoneChangedEventArgs(emailAlertRingtone);
- s_emailAlertRingtoneChanged?.Invoke(null, eventArgs);
+ lock (s_emailAlertRingtoneChangedLockObj)
+ {
+ s_emailAlertRingtoneChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<EmailAlertRingtoneChangedEventArgs> s_emailAlertRingtoneChanged;
+ private static readonly object s_emailAlertRingtoneChangedLockObj = new object();
/// <summary>
/// The EmailAlertRingtoneChanged event is triggered when the file path of the current email alert ringtone is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_emailAlertRingtoneChangedLockObj)
{
if (s_emailAlertRingtoneChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_emailAlertRingtoneChangedLockObj)
{
if (s_emailAlertRingtoneChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
bool usbDebuggingEnabled = SystemSettings.UsbDebuggingEnabled;
UsbDebuggingSettingChangedEventArgs eventArgs = new UsbDebuggingSettingChangedEventArgs(usbDebuggingEnabled);
- s_usbDebuggingSettingChanged?.Invoke(null, eventArgs);
+ lock (s_usbDebuggingSettingChangedLockObj)
+ {
+ s_usbDebuggingSettingChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<UsbDebuggingSettingChangedEventArgs> s_usbDebuggingSettingChanged;
+ private static readonly object s_usbDebuggingSettingChangedLockObj = new object();
/// <summary>
/// The UsbDebuggingSettingChangedEventArgs event is triggered when the USB debugging status is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_usbDebuggingSettingChangedLockObj)
{
if (s_usbDebuggingSettingChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_usbDebuggingSettingChangedLockObj)
{
if (s_usbDebuggingSettingChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
bool data3GEnabled = SystemSettings.Data3GNetworkEnabled;
Data3GNetworkSettingChangedEventArgs eventArgs = new Data3GNetworkSettingChangedEventArgs(data3GEnabled);
- s_data3GNetworkSettingChanged?.Invoke(null, eventArgs);
+ lock (s_data3GNetworkSettingChangedLockObj)
+ {
+ s_data3GNetworkSettingChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<Data3GNetworkSettingChangedEventArgs> s_data3GNetworkSettingChanged;
+ private static readonly object s_data3GNetworkSettingChangedLockObj = new object();
/// <summary>
/// The Data3GNetworkSettingChanged event is triggered when the 3G data network status is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_data3GNetworkSettingChangedLockObj)
{
if (s_data3GNetworkSettingChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_data3GNetworkSettingChangedLockObj)
{
if (s_data3GNetworkSettingChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
string lockScreenApp = SystemSettings.LockScreenApp;
LockScreenAppChangedEventArgs eventArgs = new LockScreenAppChangedEventArgs(lockScreenApp);
- s_lockscreenAppChanged?.Invoke(null, eventArgs);
+ lock (s_lockscreenAppChangedLockObj)
+ {
+ s_lockscreenAppChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<LockScreenAppChangedEventArgs> s_lockscreenAppChanged;
+ private static readonly object s_lockscreenAppChangedLockObj = new object();
/// <summary>
/// The LockScreenAppChanged event is triggered when the lockscreen application package name is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_lockscreenAppChangedLockObj)
{
if (s_lockscreenAppChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_lockscreenAppChangedLockObj)
{
if (s_lockscreenAppChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
string localeCountry = SystemSettings.LocaleCountry;
LocaleCountryChangedEventArgs eventArgs = new LocaleCountryChangedEventArgs(localeCountry);
- s_localeCountryChanged?.Invoke(null, eventArgs);
+ lock (s_localeCountryChangedLockObj)
+ {
+ s_localeCountryChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<LocaleCountryChangedEventArgs> s_localeCountryChanged;
+ private static readonly object s_localeCountryChangedLockObj = new object();
/// <summary>
/// The LocaleCountryChanged event is triggered when the current country setting in the <LANGUAGE>_<REGION> syntax, is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_localeCountryChangedLockObj)
{
if (s_localeCountryChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_localeCountryChangedLockObj)
{
if (s_localeCountryChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
string localeLanguage = SystemSettings.LocaleLanguage;
LocaleLanguageChangedEventArgs eventArgs = new LocaleLanguageChangedEventArgs(localeLanguage);
- s_localeLanguageChanged?.Invoke(null, eventArgs);
+ lock (s_localeLanguageChangedLockObj)
+ {
+ s_localeLanguageChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<LocaleLanguageChangedEventArgs> s_localeLanguageChanged;
+ private static readonly object s_localeLanguageChangedLockObj = new object();
/// <summary>
/// The LocaleLanguageChanged event is triggered when the current language setting in the <LANGUAGE>_<REGION> syntax, is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_localeLanguageChangedLockObj)
{
if (null == value)
throw SystemSettingsExceptionFactory.CreateException(SystemSettingsError.InvalidParameter, "Error invalid callback");
remove
{
- lock (LockObj)
+ lock (s_localeLanguageChangedLockObj)
{
if (null == value)
throw SystemSettingsExceptionFactory.CreateException(SystemSettingsError.InvalidParameter, "Error invalid callback");
{
bool localeTimeFormat24Hour = SystemSettings.LocaleTimeFormat24HourEnabled;
LocaleTimeFormat24HourSettingChangedEventArgs eventArgs = new LocaleTimeFormat24HourSettingChangedEventArgs(localeTimeFormat24Hour);
- s_localeTimeFormat24HourChanged?.Invoke(null, eventArgs);
+ lock (s_localeTimeFormat24HourChangedLockObj)
+ {
+ s_localeTimeFormat24HourChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<LocaleTimeFormat24HourSettingChangedEventArgs> s_localeTimeFormat24HourChanged;
+ private static readonly object s_localeTimeFormat24HourChangedLockObj = new object();
/// <summary>
/// The LocaleTimeFormat24HourChanged event is triggered when the time format is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_localeTimeFormat24HourChangedLockObj)
{
if (s_localeTimeFormat24HourChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_localeTimeFormat24HourChangedLockObj)
{
if (s_localeTimeFormat24HourChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
string localeTimeZone = SystemSettings.LocaleTimeZone;
LocaleTimeZoneChangedEventArgs eventArgs = new LocaleTimeZoneChangedEventArgs(localeTimeZone);
- s_localeTimeZoneChanged?.Invoke(null, eventArgs);
+ lock (s_localeTimeZoneChangedLockObj)
+ {
+ s_localeTimeZoneChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<LocaleTimeZoneChangedEventArgs> s_localeTimeZoneChanged;
+ private static readonly object s_localeTimeZoneChangedLockObj = new object();
/// <summary>
/// The LocaleTimeZoneChanged event is triggered when the current time zone is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_localeTimeZoneChangedLockObj)
{
if (s_localeTimeZoneChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_localeTimeZoneChangedLockObj)
{
if (s_localeTimeZoneChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
int time = SystemSettings.Time;
TimeChangedEventArgs eventArgs = new TimeChangedEventArgs(time);
- s_timeChanged?.Invoke(null, eventArgs);
+ lock (s_timeChangedLockObj)
+ {
+ s_timeChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<TimeChangedEventArgs> s_timeChanged;
+ private static readonly object s_timeChangedLockObj = new object();
/// <summary>
/// The TimeChanged event is triggered when the system time is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_timeChangedLockObj)
{
if (s_timeChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_timeChangedLockObj)
{
if (s_timeChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
bool soundLock = SystemSettings.SoundLockEnabled;
SoundLockSettingChangedEventArgs eventArgs = new SoundLockSettingChangedEventArgs(soundLock);
- s_soundLockChanged?.Invoke(null, eventArgs);
+ lock (s_soundLockChangedLockObj)
+ {
+ s_soundLockChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<SoundLockSettingChangedEventArgs> s_soundLockChanged;
+ private static readonly object s_soundLockChangedLockObj = new object();
/// <summary>
/// The SoundLockChanged event is triggered when the screen lock sound enabled status is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_soundLockChangedLockObj)
{
if (s_soundLockChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_soundLockChangedLockObj)
{
if (s_soundLockChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
bool soundSilentMode = SystemSettings.SoundSilentModeEnabled;
SoundSilentModeSettingChangedEventArgs eventArgs = new SoundSilentModeSettingChangedEventArgs(soundSilentMode);
- s_soundSilentModeChanged?.Invoke(null, eventArgs);
+ lock (s_soundSilentModeChangedLockObj)
+ {
+ s_soundSilentModeChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<SoundSilentModeSettingChangedEventArgs> s_soundSilentModeChanged;
+ private static readonly object s_soundSilentModeChangedLockObj = new object();
/// <summary>
/// The SoundSilentModeChanged event is triggered when the silent mode status is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_soundSilentModeChangedLockObj)
{
if (s_soundSilentModeChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_soundSilentModeChangedLockObj)
{
if (s_soundSilentModeChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
bool soundTouch = SystemSettings.SoundTouchEnabled;
SoundTouchSettingChangedEventArgs eventArgs = new SoundTouchSettingChangedEventArgs(soundTouch);
- s_soundTouchChanged?.Invoke(null, eventArgs);
+ lock (s_soundTouchChangedLockObj)
+ {
+ s_soundTouchChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<SoundTouchSettingChangedEventArgs> s_soundTouchChanged;
+ private static readonly object s_soundTouchChangedLockObj = new object();
/// <summary>
/// THe SoundTouchChanged event is triggered when the screen touch sound enabled status is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_soundTouchChangedLockObj)
{
if (s_soundTouchChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_soundTouchChangedLockObj)
{
if (s_soundTouchChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
bool displayScreenRotationAuto = SystemSettings.DisplayScreenRotationAutoEnabled;
DisplayScreenRotationAutoSettingChangedEventArgs eventArgs = new DisplayScreenRotationAutoSettingChangedEventArgs(displayScreenRotationAuto);
- s_displayScreenRotationAutoChanged?.Invoke(null, eventArgs);
+ lock (s_displayScreenRotationAutoChangedLockObj)
+ {
+ s_displayScreenRotationAutoChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<DisplayScreenRotationAutoSettingChangedEventArgs> s_displayScreenRotationAutoChanged;
+ private static readonly object s_displayScreenRotationAutoChangedLockObj = new object();
/// <summary>
/// The DisplayScreenRotationAutoChanged event is triggered when the automatic rotation control status is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_displayScreenRotationAutoChangedLockObj)
{
if (s_displayScreenRotationAutoChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_displayScreenRotationAutoChangedLockObj)
{
if (s_displayScreenRotationAutoChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
string deviceName = SystemSettings.DeviceName;
DeviceNameChangedEventArgs eventArgs = new DeviceNameChangedEventArgs(deviceName);
- s_deviceNameChanged?.Invoke(null, eventArgs);
+ lock (s_deviceNameChangedLockObj)
+ {
+ s_deviceNameChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<DeviceNameChangedEventArgs> s_deviceNameChanged;
+ private static readonly object s_deviceNameChangedLockObj = new object();
/// <summary>
/// The DeviceNameChanged event is triggered when the device name is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_deviceNameChangedLockObj)
{
if (s_deviceNameChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_deviceNameChangedLockObj)
{
if (s_deviceNameChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
bool motionEnabled = SystemSettings.MotionEnabled;
MotionSettingChangedEventArgs eventArgs = new MotionSettingChangedEventArgs(motionEnabled);
- s_motionSettingChanged?.Invoke(null, eventArgs);
+ lock (s_motionSettingChangedLockObj)
+ {
+ s_motionSettingChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<MotionSettingChangedEventArgs> s_motionSettingChanged;
+ private static readonly object s_motionSettingChangedLockObj = new object();
/// <summary>
/// The MotionSettingChanged event is triggered when the motion feature enabled status is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_motionSettingChangedLockObj)
{
if (s_motionSettingChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_motionSettingChangedLockObj)
{
if (s_motionSettingChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
bool networkWifiNotification = SystemSettings.NetworkWifiNotificationEnabled;
NetworkWifiNotificationSettingChangedEventArgs eventArgs = new NetworkWifiNotificationSettingChangedEventArgs(networkWifiNotification);
- s_networkWifiNotificationChanged?.Invoke(null, eventArgs);
+ lock (s_networkWifiNotificationChangedLockObj)
+ {
+ s_networkWifiNotificationChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<NetworkWifiNotificationSettingChangedEventArgs> s_networkWifiNotificationChanged;
+ private static readonly object s_networkWifiNotificationChangedLockObj = new object();
/// <summary>
/// The NetworkWifiNotificationChanged event is triggered when the WiFi-related notifications enabled status is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_networkWifiNotificationChangedLockObj)
{
if (s_networkWifiNotificationChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_networkWifiNotificationChangedLockObj)
{
if (s_networkWifiNotificationChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
bool networkFlightMode = SystemSettings.NetworkFlightModeEnabled;
NetworkFlightModeSettingChangedEventArgs eventArgs = new NetworkFlightModeSettingChangedEventArgs(networkFlightMode);
- s_networkFlightModeChanged?.Invoke(null, eventArgs);
+ lock (s_networkFlightModeChangedLockObj)
+ {
+ s_networkFlightModeChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<NetworkFlightModeSettingChangedEventArgs> s_networkFlightModeChanged;
+ private static readonly object s_networkFlightModeChangedLockObj = new object();
/// <summary>
/// The NetworkFlightModeChanged event is triggered when the flight mode status is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_networkFlightModeChangedLockObj)
{
if (s_networkFlightModeChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_networkFlightModeChangedLockObj)
{
if (s_networkFlightModeChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
int screenBacklightTime = SystemSettings.ScreenBacklightTime;
ScreenBacklightTimeChangedEventArgs eventArgs = new ScreenBacklightTimeChangedEventArgs(screenBacklightTime);
- s_screenBacklightTimeChanged?.Invoke(null, eventArgs);
+ lock (s_screenBacklightTimeChangedLockObj)
+ {
+ s_screenBacklightTimeChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<ScreenBacklightTimeChangedEventArgs> s_screenBacklightTimeChanged;
+ private static readonly object s_screenBacklightTimeChangedLockObj = new object();
/// <summary>
/// THe ScreenBacklightTimeChanged event is triggered when the backlight time is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_screenBacklightTimeChangedLockObj)
{
if (s_screenBacklightTimeChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_screenBacklightTimeChangedLockObj)
{
if (s_screenBacklightTimeChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
string soundNotification = SystemSettings.SoundNotification;
SoundNotificationChangedEventArgs eventArgs = new SoundNotificationChangedEventArgs(soundNotification);
- s_soundNotificationChanged?.Invoke(null, eventArgs);
+ lock (s_soundNotificationChangedLockObj)
+ {
+ s_soundNotificationChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<SoundNotificationChangedEventArgs> s_soundNotificationChanged;
+ private static readonly object s_soundNotificationChangedLockObj = new object();
/// <summary>
/// The SoundNotificationChanged event is triggered when the file path of the current notification tone set by the user is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_soundNotificationChangedLockObj)
{
if (s_soundNotificationChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_soundNotificationChangedLockObj)
{
if (s_soundNotificationChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
int soundNotificationRepetitionPeriod = SystemSettings.SoundNotificationRepetitionPeriod;
SoundNotificationRepetitionPeriodChangedEventArgs eventArgs = new SoundNotificationRepetitionPeriodChangedEventArgs(soundNotificationRepetitionPeriod);
- s_soundNotificationRepetitionPeriodChanged?.Invoke(null, eventArgs);
+ lock (s_soundNotificationRepetitionPeriodChangedLockObj)
+ {
+ s_soundNotificationRepetitionPeriodChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<SoundNotificationRepetitionPeriodChangedEventArgs> s_soundNotificationRepetitionPeriodChanged;
+ private static readonly object s_soundNotificationRepetitionPeriodChangedLockObj = new object();
/// <summary>
/// The SoundNotificationRepetitionPeriodChanged event is triggered when the time period for notification repetitions is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_soundNotificationRepetitionPeriodChangedLockObj)
{
if (s_soundNotificationRepetitionPeriodChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_soundNotificationRepetitionPeriodChangedLockObj)
{
if (s_soundNotificationRepetitionPeriodChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
SystemSettingsIdleLockState lockState = SystemSettings.LockState;
LockStateChangedEventArgs eventArgs = new LockStateChangedEventArgs(lockState);
- s_lockStateChanged?.Invoke(null, eventArgs);
+ lock (s_lockStateChangedLockObj)
+ {
+ s_lockStateChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<LockStateChangedEventArgs> s_lockStateChanged;
+ private static readonly object s_lockStateChangedLockObj = new object();
/// <summary>
/// The LockStateChanged event is triggered when the current lock state is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_lockStateChangedLockObj)
{
if (s_lockStateChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_lockStateChangedLockObj)
{
if (s_lockStateChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
string adsId = SystemSettings.AdsId;
AdsIdChangedEventArgs eventArgs = new AdsIdChangedEventArgs(adsId);
- s_adsIdChanged?.Invoke(null, eventArgs);
+ lock (s_adsIdChangedLockObj)
+ {
+ s_adsIdChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<AdsIdChangedEventArgs> s_adsIdChanged;
+ private static readonly object s_adsIdChangedLockObj = new object();
/// <summary>
/// The AdsIdChanged event is triggered when the current ADS ID state is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_adsIdChangedLockObj)
{
if (s_adsIdChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_adsIdChangedLockObj)
{
if (s_adsIdChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
SystemSettingsUdsState ultraDataSave = SystemSettings.UltraDataSave;
UltraDataSaveChangedEventArgs eventArgs = new UltraDataSaveChangedEventArgs(ultraDataSave);
- s_ultraDataSaveChanged?.Invoke(null, eventArgs);
+ lock (s_ultraDataSaveChangedLockObj)
+ {
+ s_ultraDataSaveChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<UltraDataSaveChangedEventArgs> s_ultraDataSaveChanged;
+ private static readonly object s_ultraDataSaveChangedLockObj = new object();
/// <summary>
/// The UltraDataSaveChanged event is triggered when the current Ultra Data Save state is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_ultraDataSaveChangedLockObj)
{
if (s_ultraDataSaveChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_ultraDataSaveChangedLockObj)
{
if (s_ultraDataSaveChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
string ultraDataSavePackageList = "None";
UltraDataSavePackageListChangedEventArgs eventArgs = new UltraDataSavePackageListChangedEventArgs(ultraDataSavePackageList);
- s_ultraDataSavePackageListChanged?.Invoke(null, eventArgs);
+ lock (s_ultraDataSavePackageListChangedLockObj)
+ {
+ s_ultraDataSavePackageListChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<UltraDataSavePackageListChangedEventArgs> s_ultraDataSavePackageListChanged;
+ private static readonly object s_ultraDataSavePackageListChangedLockObj = new object();
/// <summary>
/// The UltraDataSavePackageListChanged event is triggered when the current ADS ID state is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_ultraDataSavePackageListChangedLockObj)
{
if (s_ultraDataSavePackageListChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_ultraDataSavePackageListChangedLockObj)
{
if (s_ultraDataSavePackageListChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
bool accessibilityTts = SystemSettings.AccessibilityTtsEnabled;
AccessibilityTtsSettingChangedEventArgs eventArgs = new AccessibilityTtsSettingChangedEventArgs(accessibilityTts);
- s_accessibilityTtsChanged?.Invoke(null, eventArgs);
+ lock (s_accessibilityTtsChangedLockObj)
+ {
+ s_accessibilityTtsChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<AccessibilityTtsSettingChangedEventArgs> s_accessibilityTtsChanged;
+ private static readonly object s_accessibilityTtsChangedLockObj = new object();
/// <summary>
/// THe AccessibilityTtsChanged event is triggered when the screen touch sound enabled status is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_accessibilityTtsChangedLockObj)
{
if (s_accessibilityTtsChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_accessibilityTtsChangedLockObj)
{
if (s_accessibilityTtsChanged == null) {
Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
{
bool vibration = SystemSettings.Vibration;
VibrationChangedEventArgs eventArgs = new VibrationChangedEventArgs(vibration);
- s_vibrationChanged?.Invoke(null, eventArgs);
+ lock (s_vibrationChangedLockObj)
+ {
+ s_vibrationChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<VibrationChangedEventArgs> s_vibrationChanged;
+ private static readonly object s_vibrationChangedLockObj = new object();
/// <summary>
/// The VibrationChanged event is triggered when the vibration value is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_vibrationChangedLockObj)
{
if (s_vibrationChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_vibrationChangedLockObj)
{
s_vibrationChanged -= value;
if (s_vibrationChanged == null)
{
bool automaticTimeUpdate = SystemSettings.AutomaticTimeUpdate;
AutomaticTimeUpdateChangedEventArgs eventArgs = new AutomaticTimeUpdateChangedEventArgs(automaticTimeUpdate);
- s_automaticTimeUpdateChanged?.Invoke(null, eventArgs);
+ lock (s_automaticTimeUpdateChangedLockObj)
+ {
+ s_automaticTimeUpdateChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<AutomaticTimeUpdateChangedEventArgs> s_automaticTimeUpdateChanged;
+ private static readonly object s_automaticTimeUpdateChangedLockObj = new object();
/// <summary>
/// The AutomaticTimeUpdateChanged event is triggered when the AutomaticTimeUpdate value is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_automaticTimeUpdateChangedLockObj)
{
if (s_automaticTimeUpdateChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_automaticTimeUpdateChangedLockObj)
{
s_automaticTimeUpdateChanged -= value;
if (s_automaticTimeUpdateChanged == null)
{
bool developerOptionState = SystemSettings.DeveloperOptionState;
DeveloperOptionStateChangedEventArgs eventArgs = new DeveloperOptionStateChangedEventArgs(developerOptionState);
- s_developerOptionStateChanged?.Invoke(null, eventArgs);
+ lock (s_developerOptionStateChangedLockObj)
+ {
+ s_developerOptionStateChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<DeveloperOptionStateChangedEventArgs> s_developerOptionStateChanged;
+ private static readonly object s_developerOptionStateChangedLockObj = new object();
/// <summary>
/// The DeveloperOptionStateChanged event is triggered when the DeveloperOptionState value is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_developerOptionStateChangedLockObj)
{
if (s_developerOptionStateChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_developerOptionStateChangedLockObj)
{
s_developerOptionStateChanged -= value;
if (s_developerOptionStateChanged == null)
{
bool accessibilityGrayscale = SystemSettings.AccessibilityGrayscale;
AccessibilityGrayscaleChangedEventArgs eventArgs = new AccessibilityGrayscaleChangedEventArgs(accessibilityGrayscale);
- s_accessibilityGrayscaleChanged?.Invoke(null, eventArgs);
+ lock (s_accessibilityGrayscaleChangedLockObj)
+ {
+ s_accessibilityGrayscaleChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<AccessibilityGrayscaleChangedEventArgs> s_accessibilityGrayscaleChanged;
+ private static readonly object s_accessibilityGrayscaleChangedLockObj = new object();
/// <summary>
/// The AccessibilityGrayscaleChanged event is triggered when the AccessibilityGrayscale value is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_accessibilityGrayscaleChangedLockObj)
{
if (s_accessibilityGrayscaleChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_accessibilityGrayscaleChangedLockObj)
{
s_accessibilityGrayscaleChanged -= value;
if (s_accessibilityGrayscaleChanged == null)
{
bool accessibilityNegativeColor = SystemSettings.AccessibilityNegativeColor;
AccessibilityNegativeColorChangedEventArgs eventArgs = new AccessibilityNegativeColorChangedEventArgs(accessibilityNegativeColor);
- s_accessibilityNegativeColorChanged?.Invoke(null, eventArgs);
+ lock (s_accessibilityNegativeColorChangedLockObj)
+ {
+ s_accessibilityNegativeColorChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<AccessibilityNegativeColorChangedEventArgs> s_accessibilityNegativeColorChanged;
+ private static readonly object s_accessibilityNegativeColorChangedLockObj = new object();
/// <summary>
/// The AccessibilityNegativeColorChanged event is triggered when the AccessibilityNegativeColor value is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_accessibilityNegativeColorChangedLockObj)
{
if (s_accessibilityNegativeColorChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_accessibilityNegativeColorChangedLockObj)
{
s_accessibilityNegativeColorChanged -= value;
if (s_accessibilityNegativeColorChanged == null)
{
bool rotaryEventEnabled = SystemSettings.RotaryEventEnabled;
RotaryEventEnabledChangedEventArgs eventArgs = new RotaryEventEnabledChangedEventArgs(rotaryEventEnabled);
- s_rotaryEventEnabledChanged?.Invoke(null, eventArgs);
+ lock (s_rotaryEventEnabledChangedLockObj)
+ {
+ s_rotaryEventEnabledChanged?.Invoke(null, eventArgs);
+ }
};
private static event EventHandler<RotaryEventEnabledChangedEventArgs> s_rotaryEventEnabledChanged;
+ private static readonly object s_rotaryEventEnabledChangedLockObj = new object();
/// <summary>
/// The RotaryEventEnabledChanged event is triggered when the RotaryEventEnabled value is changed.
/// </summary>
{
add
{
- lock (LockObj)
+ lock (s_rotaryEventEnabledChangedLockObj)
{
if (s_rotaryEventEnabledChanged == null)
{
remove
{
- lock (LockObj)
+ lock (s_rotaryEventEnabledChangedLockObj)
{
s_rotaryEventEnabledChanged -= value;
if (s_rotaryEventEnabledChanged == null)