2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 namespace Tizen.System
22 /// The System Settings API provides APIs for sharing the configuration over a system.
25 /// The System Settings API provides functions for getting the system configuration related to user preferences.
26 /// The main features of the System Settings API include accessing system-wide configurations, such as ringtones, wallpapers, and so on.
28 /// <since_tizen> 3 </since_tizen>
29 public static class SystemSettings
32 /// The file path of the current ringtone.
34 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
35 /// <privlevel>platform</privlevel>
36 /// <feature>http://tizen.org/feature/systemsetting</feature>
37 /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
38 /// <exception cref="ArgumentException">Invalid Argument</exception>
39 /// <exception cref="NotSupportedException">Not Supported feature</exception>
40 /// <exception cref="InvalidOperationException">Invalid operation</exception>
41 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
42 /// <since_tizen> 3 </since_tizen>
43 public static string IncomingCallRingtone
48 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.IncomingCallRingtone, out filePath);
49 if (res != SystemSettingsError.None)
51 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get IncomingCallRingtone system setting.");
57 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.IncomingCallRingtone, value);
58 if (res != SystemSettingsError.None)
60 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set IncomingCallRingtone system setting.");
66 /// The file path of the current home-screen wallpaper.
68 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
69 /// <privlevel>platform</privlevel>
70 /// <feature>http://tizen.org/feature/systemsetting</feature>
71 /// <feature>http://tizen.org/feature/systemsetting.home_screen</feature>
72 /// <exception cref="ArgumentException">Invalid Argument</exception>
73 /// <exception cref="NotSupportedException">Not Supported feature</exception>
74 /// <exception cref="InvalidOperationException">Invalid operation</exception>
75 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
76 /// <since_tizen> 3 </since_tizen>
77 public static string WallpaperHomeScreen
82 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.WallpaperHomeScreen, out filePath);
83 if (res != SystemSettingsError.None)
85 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get WallpaperHomeScreen system setting.");
91 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.WallpaperHomeScreen, value);
92 if (res != SystemSettingsError.None)
94 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set WallpaperHomeScreen system setting.");
100 /// The file path of the current lock-screen wallpaper.
102 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
103 /// <privlevel>platform</privlevel>
104 /// <feature>http://tizen.org/feature/systemsetting</feature>
105 /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
106 /// <exception cref="ArgumentException">Invalid Argument</exception>
107 /// <exception cref="NotSupportedException">Not Supported feature</exception>
108 /// <exception cref="InvalidOperationException">Invalid operation</exception>
109 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
110 /// <since_tizen> 3 </since_tizen>
111 public static string WallpaperLockScreen
116 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.WallpaperLockScreen, out filePath);
117 if (res != SystemSettingsError.None)
119 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get WallpaperLockScreen system setting.");
125 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.WallpaperLockScreen, value);
126 if (res != SystemSettingsError.None)
128 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set WallpaperLockScreen system setting.");
134 /// The current system font size.
136 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
137 /// <privlevel>platform</privlevel>
138 /// <feature>http://tizen.org/feature/systemsetting</feature>
139 /// <feature>http://tizen.org/feature/systemsetting.font</feature>
140 /// <exception cref="ArgumentException">Invalid Argument</exception>
141 /// <exception cref="NotSupportedException">Not Supported feature</exception>
142 /// <exception cref="InvalidOperationException">Invalid operation</exception>
143 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
144 /// <since_tizen> 3 </since_tizen>
145 public static SystemSettingsFontSize FontSize
150 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.FontSize, out fontSize);
151 if (res != SystemSettingsError.None)
153 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get FontSize system setting.");
155 return (SystemSettingsFontSize)fontSize;
159 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueInt(SystemSettingsKeys.FontSize, (int)value);
160 if (res != SystemSettingsError.None)
162 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set FontSize system setting.");
168 /// The current system font type.
170 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
171 /// <privlevel>platform</privlevel>
172 /// <feature>http://tizen.org/feature/systemsetting</feature>
173 /// <feature>http://tizen.org/feature/systemsetting.font</feature>
174 /// <exception cref="ArgumentException">Invalid Argument</exception>
175 /// <exception cref="NotSupportedException">Not Supported feature</exception>
176 /// <exception cref="InvalidOperationException">Invalid operation</exception>
177 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
178 /// <since_tizen> 3 </since_tizen>
179 public static string FontType
184 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.FontType, out fontType);
185 if (res != SystemSettingsError.None)
187 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get FontType system setting.");
193 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.FontType, value);
194 if (res != SystemSettingsError.None)
196 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set FontType system setting.");
202 /// Indicates whether the motion service is activated.
204 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
205 /// <privlevel>platform</privlevel>
206 /// <feature>http://tizen.org/feature/systemsetting</feature>
207 /// <exception cref="ArgumentException">Invalid Argument</exception>
208 /// <exception cref="NotSupportedException">Not Supported feature</exception>
209 /// <exception cref="InvalidOperationException">Invalid operation</exception>
210 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
211 /// <since_tizen> 3 </since_tizen>
212 public static bool MotionActivationEnabled
216 bool isMotionServiceActivated;
217 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.MotionActivationEnabled, out isMotionServiceActivated);
218 if (res != SystemSettingsError.None)
220 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get MotionActivation system setting.");
222 return isMotionServiceActivated;
226 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.MotionActivationEnabled, value);
227 if (res != SystemSettingsError.None)
229 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set MotionActivation system setting.");
235 /// The file path of the current email alert ringtone.
237 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
238 /// <privlevel>platform</privlevel>
239 /// <feature>http://tizen.org/feature/systemsetting</feature>
240 /// <feature>http://tizen.org/feature/systemsetting.notification_email</feature>
241 /// <exception cref="ArgumentException">Invalid Argument</exception>
242 /// <exception cref="NotSupportedException">Not Supported feature</exception>
243 /// <exception cref="InvalidOperationException">Invalid operation</exception>
244 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
245 /// <since_tizen> 3 </since_tizen>
246 public static string EmailAlertRingtone
251 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.EmailAlertRingtone, out filePath);
252 if (res != SystemSettingsError.None)
254 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get EmailAlertRingtone system setting.");
260 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.EmailAlertRingtone, value);
261 if (res != SystemSettingsError.None)
263 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set EmailAlertRingtone system setting.");
268 /// Indicates whether the USB debugging is enabled.
270 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
271 /// <privlevel>platform</privlevel>
272 /// <feature>http://tizen.org/feature/systemsetting</feature>
273 /// <exception cref="ArgumentException">Invalid Argument</exception>
274 /// <exception cref="NotSupportedException">Not Supported feature</exception>
275 /// <exception cref="InvalidOperationException">Invalid operation</exception>
276 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
277 /// <since_tizen> 3 </since_tizen>
278 public static bool UsbDebuggingEnabled
282 bool isusbDebuggingEnabled;
283 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.UsbDebuggingEnabled, out isusbDebuggingEnabled);
284 if (res != SystemSettingsError.None)
286 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get UsbDebuggingEnabled system setting.");
288 return isusbDebuggingEnabled;
292 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.UsbDebuggingEnabled, value);
293 if (res != SystemSettingsError.None)
295 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set UsbDebuggingEnabled system setting.");
301 /// Indicates whether the 3G data network is enabled.
303 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
304 /// <privlevel>platform</privlevel>
305 /// <feature>http://tizen.org/feature/systemsetting</feature>
306 /// <exception cref="ArgumentException">Invalid Argument</exception>
307 /// <exception cref="NotSupportedException">Not Supported feature</exception>
308 /// <exception cref="InvalidOperationException">Invalid operation</exception>
309 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
310 /// <since_tizen> 3 </since_tizen>
311 public static bool Data3GNetworkEnabled
315 bool is3GDataEnabled;
316 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.Data3GNetworkEnabled, out is3GDataEnabled);
317 if (res != SystemSettingsError.None)
319 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get Data3GNetworkEnabled system setting.");
321 return is3GDataEnabled;
325 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.Data3GNetworkEnabled, value);
326 if (res != SystemSettingsError.None)
328 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set Data3GNetworkEnabled system setting.");
334 /// Indicates the lock-screen application package name.
336 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
337 /// <privlevel>platform</privlevel>
338 /// <feature>http://tizen.org/feature/systemsetting</feature>
339 /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
340 /// <exception cref="ArgumentException">Invalid Argument</exception>
341 /// <exception cref="NotSupportedException">Not Supported feature</exception>
342 /// <exception cref="InvalidOperationException">Invalid operation</exception>
343 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
344 /// <since_tizen> 4 </since_tizen>
345 public static string LockScreenApp
350 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LockScreenApp, out pkgName);
351 if (res != SystemSettingsError.None)
353 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LockScreenApp system setting.");
359 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.LockScreenApp, value);
360 if (res != SystemSettingsError.None)
362 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LockScreenApp system setting.");
368 /// The current system default font type (only supports Get).
370 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
371 /// <privlevel>platform</privlevel>
372 /// <feature>http://tizen.org/feature/systemsetting</feature>
373 /// <feature>http://tizen.org/feature/systemsetting.font</feature>
374 /// <exception cref="ArgumentException">Invalid Argument</exception>
375 /// <exception cref="NotSupportedException">Not Supported feature</exception>
376 /// <exception cref="InvalidOperationException">Invalid operation</exception>
377 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
378 /// <since_tizen> 3 </since_tizen>
379 public static string DefaultFontType
383 string defaultFontType;
384 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.DefaultFontType, out defaultFontType);
385 if (res != SystemSettingsError.None)
387 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get DefaultFontType system setting value.");
389 return defaultFontType;
394 /// Indicates the current country setting in the <LANGUAGE>_<REGION> syntax.
395 /// The country setting is in the ISO 639-2 format,
396 /// and the region setting is in the ISO 3166-1 alpha-2 format.
398 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
399 /// <privlevel>platform</privlevel>
400 /// <feature>http://tizen.org/feature/systemsetting</feature>
401 /// <exception cref="ArgumentException">Invalid Argument</exception>
402 /// <exception cref="NotSupportedException">Not Supported feature</exception>
403 /// <exception cref="InvalidOperationException">Invalid operation</exception>
404 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
405 /// <since_tizen> 3 </since_tizen>
406 public static string LocaleCountry
410 string countrySetting;
411 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LocaleCountry, out countrySetting);
412 if (res != SystemSettingsError.None)
414 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleCountry system setting.");
416 return countrySetting;
420 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.LocaleCountry, value);
421 if (res != SystemSettingsError.None)
423 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleCountry system setting.");
429 /// Indicates the current language setting in the <LANGUAGE>_<REGION> syntax.
430 /// The language setting is in the ISO 639-2 format,
431 /// and the region setting is in the ISO 3166-1 alpha-2 format.
433 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
434 /// <privlevel>platform</privlevel>
435 /// <feature>http://tizen.org/feature/systemsetting</feature>
436 /// <exception cref="ArgumentException">Invalid Argument</exception>
437 /// <exception cref="NotSupportedException">Not Supported feature</exception>
438 /// <exception cref="InvalidOperationException">Invalid operation</exception>
439 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
440 /// <since_tizen> 3 </since_tizen>
441 public static string LocaleLanguage
445 string languageSetting;
446 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LocaleLanguage, out languageSetting);
447 if (res != SystemSettingsError.None)
449 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleLanguage system setting.");
451 return languageSetting;
455 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.LocaleLanguage, value);
456 if (res != SystemSettingsError.None)
458 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleLanguage system setting.");
464 /// Indicates whether the 24-hour clock is used.
465 /// If the value is false, the 12-hour clock is used.
467 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
468 /// <privlevel>platform</privlevel>
469 /// <feature>http://tizen.org/feature/systemsetting</feature>
470 /// <exception cref="ArgumentException">Invalid Argument</exception>
471 /// <exception cref="NotSupportedException">Not Supported feature</exception>
472 /// <exception cref="InvalidOperationException">Invalid operation</exception>
473 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
474 /// <since_tizen> 3 </since_tizen>
475 public static bool LocaleTimeFormat24HourEnabled
480 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, out is24HrFormat);
481 if (res != SystemSettingsError.None)
483 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleTimeFormat24Hour system setting.");
489 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, value);
490 if (res != SystemSettingsError.None)
492 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleTimeFormat24Hour system setting.");
498 /// Indicates the current time zone, for example, Pacific/Tahiti.
500 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
501 /// <privlevel>platform</privlevel>
502 /// <feature>http://tizen.org/feature/systemsetting</feature>
503 /// <exception cref="ArgumentException">Invalid Argument</exception>
504 /// <exception cref="NotSupportedException">Not Supported feature</exception>
505 /// <exception cref="InvalidOperationException">Invalid operation</exception>
506 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
507 /// <since_tizen> 3 </since_tizen>
508 public static string LocaleTimeZone
513 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LocaleTimeZone, out timeZone);
514 if (res != SystemSettingsError.None)
516 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleTimeZone system setting.");
522 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.LocaleTimeZone, value);
523 if (res != SystemSettingsError.None)
525 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleTimeZone system setting.");
531 /// Once the system changes time, this event occurs to notify the time change.
533 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
534 /// <privlevel>platform</privlevel>
535 /// <feature>http://tizen.org/feature/systemsetting</feature>
536 /// <exception cref="ArgumentException">Invalid Argument</exception>
537 /// <exception cref="NotSupportedException">Not Supported feature</exception>
538 /// <exception cref="InvalidOperationException">Invalid operation</exception>
539 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
540 /// <since_tizen> 3 </since_tizen>
541 public static int Time
546 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.Time, out time);
547 if (res != SystemSettingsError.None)
549 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get Time system setting.");
555 /// Indicates whether the screen lock sound is enabled on the device, for example, the LCD on or off sound.
557 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
558 /// <privlevel>platform</privlevel>
559 /// <feature>http://tizen.org/feature/systemsetting</feature>
560 /// <exception cref="ArgumentException">Invalid Argument</exception>
561 /// <exception cref="NotSupportedException">Not Supported feature</exception>
562 /// <exception cref="InvalidOperationException">Invalid operation</exception>
563 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
564 /// <since_tizen> 3 </since_tizen>
565 public static bool SoundLockEnabled
569 bool isSoundLockEnabled;
570 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundLockEnabled, out isSoundLockEnabled);
571 if (res != SystemSettingsError.None)
573 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundLock system setting.");
575 return isSoundLockEnabled;
580 /// Indicates whether the device is in the silent mode.
582 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
583 /// <privlevel>platform</privlevel>
584 /// <feature>http://tizen.org/feature/systemsetting</feature>
585 /// <exception cref="ArgumentException">Invalid Argument</exception>
586 /// <exception cref="NotSupportedException">Not Supported feature</exception>
587 /// <exception cref="InvalidOperationException">Invalid operation</exception>
588 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
589 /// <since_tizen> 3 </since_tizen>
590 public static bool SoundSilentModeEnabled
595 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundSilentModeEnabled, out isSilent);
596 if (res != SystemSettingsError.None)
598 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundSilentMode system setting.");
605 /// Indicates whether the screen touch sound is enabled on the device.
607 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
608 /// <privlevel>platform</privlevel>
609 /// <feature>http://tizen.org/feature/systemsetting</feature>
610 /// <exception cref="ArgumentException">Invalid Argument</exception>
611 /// <exception cref="NotSupportedException">Not Supported feature</exception>
612 /// <exception cref="InvalidOperationException">Invalid operation</exception>
613 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
614 /// <since_tizen> 3 </since_tizen>
615 public static bool SoundTouchEnabled
619 bool isTouchSoundEnabled;
620 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundTouchEnabled, out isTouchSoundEnabled);
621 if (res != SystemSettingsError.None)
623 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundTouch system setting value.");
625 return isTouchSoundEnabled;
630 /// Indicates whether the rotation control is automatic.
632 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
633 /// <privlevel>platform</privlevel>
634 /// <feature>http://tizen.org/feature/systemsetting</feature>
635 /// <exception cref="ArgumentException">Invalid Argument</exception>
636 /// <exception cref="NotSupportedException">Not Supported feature</exception>
637 /// <exception cref="InvalidOperationException">Invalid operation</exception>
638 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
639 /// <since_tizen> 3 </since_tizen>
640 public static bool DisplayScreenRotationAutoEnabled
644 bool isRotationAutomatic;
645 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, out isRotationAutomatic);
646 if (res != SystemSettingsError.None)
648 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get DisplayScreenRotationAuto system setting.");
650 return isRotationAutomatic;
655 /// Indicates the device name.
657 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
658 /// <privlevel>platform</privlevel>
659 /// <feature>http://tizen.org/feature/systemsetting</feature>
660 /// <exception cref="ArgumentException">Invalid Argument</exception>
661 /// <exception cref="NotSupportedException">Not Supported feature</exception>
662 /// <exception cref="InvalidOperationException">Invalid operation</exception>
663 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
664 /// <since_tizen> 3 </since_tizen>
665 public static string DeviceName
670 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.DeviceName, out deviceName);
671 if (res != SystemSettingsError.None)
673 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get DeviceName system setting value.");
679 /// Indicates whether the device user has enabled the motion feature.
681 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
682 /// <privlevel>platform</privlevel>
683 /// <feature>http://tizen.org/feature/systemsetting</feature>
684 /// <exception cref="ArgumentException">Invalid Argument</exception>
685 /// <exception cref="NotSupportedException">Not Supported feature</exception>
686 /// <exception cref="InvalidOperationException">Invalid operation</exception>
687 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
688 /// <since_tizen> 3 </since_tizen>
689 public static bool MotionEnabled
693 bool isMotionEnabled;
694 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.MotionEnabled, out isMotionEnabled);
695 if (res != SystemSettingsError.None)
697 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get MotionEnabled system setting value.");
699 return isMotionEnabled;
704 /// Indicates whether Wi-Fi related notifications are enabled on the device.
706 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
707 /// <privlevel>platform</privlevel>
708 /// <feature>http://tizen.org/feature/systemsetting</feature>
709 /// <feature>http://tizen.org/feature/network.wifi</feature>
710 /// <exception cref="ArgumentException">Invalid Argument</exception>
711 /// <exception cref="NotSupportedException">Not Supported feature</exception>
712 /// <exception cref="InvalidOperationException">Invalid operation</exception>
713 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
714 /// <since_tizen> 3 </since_tizen>
715 public static bool NetworkWifiNotificationEnabled
719 bool isWifiNotificationEnabled;
720 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.NetworkWifiNotificationEnabled, out isWifiNotificationEnabled);
721 if (res != SystemSettingsError.None)
723 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get NetworkWifiNotification system setting.");
725 return isWifiNotificationEnabled;
730 /// Indicates whether the device is in the flight mode.
732 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
733 /// <privlevel>platform</privlevel>
734 /// <feature>http://tizen.org/feature/systemsetting</feature>
735 /// <exception cref="ArgumentException">Invalid Argument</exception>
736 /// <exception cref="NotSupportedException">Not Supported feature</exception>
737 /// <exception cref="InvalidOperationException">Invalid operation</exception>
738 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
739 /// <since_tizen> 3 </since_tizen>
740 public static bool NetworkFlightModeEnabled
744 bool isFlightModeEnabled;
745 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.NetworkFlightModeEnabled, out isFlightModeEnabled);
746 if (res != SystemSettingsError.None)
748 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get NetworkFlightMode system setting.");
750 return isFlightModeEnabled;
755 /// Indicates the backlight time (in seconds). The following values can be used: 15, 30, 60, 120, 300, and 600.
757 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
758 /// <privlevel>platform</privlevel>
759 /// <feature>http://tizen.org/feature/systemsetting</feature>
760 /// <exception cref="ArgumentException">Invalid Argument</exception>
761 /// <exception cref="NotSupportedException">Not Supported feature</exception>
762 /// <exception cref="InvalidOperationException">Invalid operation</exception>
763 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
764 /// <since_tizen> 3 </since_tizen>
765 public static int ScreenBacklightTime
770 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.ScreenBacklightTime, out backlightTime);
771 if (res != SystemSettingsError.None)
773 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get ScreenBacklightTime system setting.");
775 return backlightTime;
779 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueInt(SystemSettingsKeys.ScreenBacklightTime, value);
780 if (res != SystemSettingsError.None)
782 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set ScreenBacklightTime system setting.");
788 /// Indicates the file path of the current notification tone set by the user.
790 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
791 /// <privlevel>platform</privlevel>
792 /// <feature>http://tizen.org/feature/systemsetting</feature>
793 /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
794 /// <exception cref="ArgumentException">Invalid Argument</exception>
795 /// <exception cref="NotSupportedException">Not Supported feature</exception>
796 /// <exception cref="InvalidOperationException">Invalid operation</exception>
797 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
798 /// <since_tizen> 3 </since_tizen>
799 public static string SoundNotification
804 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.SoundNotification, out filePath);
805 if (res != SystemSettingsError.None)
807 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundNotification system setting.");
813 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.SoundNotification, value);
814 if (res != SystemSettingsError.None)
816 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set SoundNotification system setting.");
822 /// Indicates the time period for notification repetitions.
824 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
825 /// <privlevel>platform</privlevel>
826 /// <feature>http://tizen.org/feature/systemsetting</feature>
827 /// <exception cref="ArgumentException">Invalid Argument</exception>
828 /// <exception cref="NotSupportedException">Not Supported feature</exception>
829 /// <exception cref="InvalidOperationException">Invalid operation</exception>
830 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
831 /// <since_tizen> 3 </since_tizen>
832 public static int SoundNotificationRepetitionPeriod
836 int notificationRepetitionPeriod;
837 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.SoundNotificationRepetitionPeriod, out notificationRepetitionPeriod);
838 if (res != SystemSettingsError.None)
840 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundNotificationRepetitionPeriod system setting.");
842 return notificationRepetitionPeriod;
846 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueInt(SystemSettingsKeys.SoundNotificationRepetitionPeriod, value);
847 if (res != SystemSettingsError.None)
849 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set SoundNotificationRepetitionPeriod system setting.");
855 /// Indicates the current lock state.
857 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
858 /// <privlevel>platform</privlevel>
859 /// <feature>http://tizen.org/feature/systemsetting</feature>
860 /// <exception cref="ArgumentException">Invalid Argument</exception>
861 /// <exception cref="NotSupportedException">Not Supported feature</exception>
862 /// <exception cref="InvalidOperationException">Invalid operation</exception>
863 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
864 /// <since_tizen> 3 </since_tizen>
865 public static SystemSettingsIdleLockState LockState
870 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.LockState, out LockState);
871 if (res != SystemSettingsError.None)
873 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LockState system setting.");
875 return (SystemSettingsIdleLockState)LockState;
879 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueInt(SystemSettingsKeys.LockState, (int)value);
880 if (res != SystemSettingsError.None)
882 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LockState system setting.");
888 /// The current system ADS ID.
890 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
891 /// <privlevel>platform</privlevel>
892 /// <feature>http://tizen.org/feature/systemsetting</feature>
893 /// <exception cref="ArgumentException">Invalid Argument</exception>
894 /// <exception cref="NotSupportedException">Not Supported feature</exception>
895 /// <exception cref="InvalidOperationException">Invalid operation</exception>
896 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
897 /// <since_tizen> 3 </since_tizen>
898 public static string AdsId
903 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.AdsId, out adsId);
904 if (res != SystemSettingsError.None)
906 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get AdsId system setting.");
912 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.AdsId, value);
913 if (res != SystemSettingsError.None)
915 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set AdsId system setting.");
922 /// Indicates the time period for notification repetitions.
924 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
925 /// <privlevel>platform</privlevel>
926 /// <feature>http://tizen.org/feature/systemsetting</feature>
927 /// <feature>http://tizen.org/feature/network.telephony</feature>
928 /// <exception cref="ArgumentException">Invalid Argument</exception>
929 /// <exception cref="NotSupportedException">Not Supported feature</exception>
930 /// <exception cref="InvalidOperationException">Invalid operation</exception>
931 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
932 /// <since_tizen> 3 </since_tizen>
933 public static SystemSettingsUdsState UltraDataSave
938 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.UltraDataSave, out UltraDataSave);
939 if (res != SystemSettingsError.None)
941 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get UltraDataSave system setting.");
943 return (SystemSettingsUdsState)UltraDataSave;
948 /// Indicates whether the accessibility TTS is enabled on the device.
950 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
951 /// <privlevel>platform</privlevel>
952 /// <feature>http://tizen.org/feature/systemsetting</feature>
953 /// <exception cref="ArgumentException">Invalid Argument</exception>
954 /// <exception cref="NotSupportedException">Not Supported feature</exception>
955 /// <exception cref="InvalidOperationException">Invalid operation</exception>
956 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
957 /// <since_tizen> 4 </since_tizen>
958 public static bool AccessibilityTtsEnabled
962 bool isAccessibilityTTSEnabled;
963 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.AccessibilityTtsEnabled, out isAccessibilityTTSEnabled);
964 if (res != SystemSettingsError.None)
966 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get AccessibilityTTS system setting value.");
968 return isAccessibilityTTSEnabled;
973 /// Indicates whether the vibration is enabled on the device or not.
975 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
976 /// <privlevel>platform</privlevel>
977 /// <feature>http://tizen.org/feature/systemsetting</feature>
978 /// <exception cref="ArgumentException">Invalid Argument</exception>
979 /// <exception cref="NotSupportedException">Not Supported feature</exception>
980 /// <exception cref="InvalidOperationException">Invalid operation</exception>
981 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
982 /// <since_tizen> 5 </since_tizen>
983 public static bool Vibration
988 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.Vibration, out isVibration);
989 if (res != SystemSettingsError.None)
991 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get isVibration system setting.");
997 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.Vibration, value);
998 if (res != SystemSettingsError.None)
1000 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set isVibration system setting.");
1006 /// Indicates whether the automatic time update is enabled on the device or not.
1008 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1009 /// <privlevel>platform</privlevel>
1010 /// <feature>http://tizen.org/feature/systemsetting</feature>
1011 /// <feature>http://tizen.org/feature/network.telephony</feature>
1012 /// <exception cref="ArgumentException">Invalid Argument</exception>
1013 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1014 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1015 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1016 /// <since_tizen> 5 </since_tizen>
1017 public static bool AutomaticTimeUpdate
1021 bool isAutomaticTimeUpdate;
1022 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.AutomaticTimeUpdate, out isAutomaticTimeUpdate);
1023 if (res != SystemSettingsError.None)
1025 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get isAutomaticTimeUpdate system setting.");
1027 return isAutomaticTimeUpdate;
1031 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.AutomaticTimeUpdate, value);
1032 if (res != SystemSettingsError.None)
1034 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set isAutomaticTimeUpdate system setting.");
1040 /// Indicates whether the developer option state is enabled on the device or not.
1042 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1043 /// <privlevel>platform</privlevel>
1044 /// <feature>http://tizen.org/feature/systemsetting</feature>
1045 /// <exception cref="ArgumentException">Invalid Argument</exception>
1046 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1047 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1048 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1049 /// <since_tizen> 5 </since_tizen>
1050 public static bool DeveloperOptionState
1054 bool isDeveloperOptionState;
1055 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.DeveloperOptionState, out isDeveloperOptionState);
1056 if (res != SystemSettingsError.None)
1058 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get isDeveloperOptionState system setting.");
1060 return isDeveloperOptionState;
1064 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.DeveloperOptionState, value);
1065 if (res != SystemSettingsError.None)
1067 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set isDeveloperOptionState system setting.");
1072 private static readonly Interop.Settings.SystemSettingsChangedCallback s_incomingCallRingtoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1074 string path = SystemSettings.IncomingCallRingtone;
1075 IncomingCallRingtoneChangedEventArgs eventArgs = new IncomingCallRingtoneChangedEventArgs(path);
1076 s_incomingCallRingtoneChanged?.Invoke(null, eventArgs);
1078 private static event EventHandler<IncomingCallRingtoneChangedEventArgs> s_incomingCallRingtoneChanged;
1080 /// The IncomingCallRingtoneChanged event is triggered when the file path of the incoming ringtone is changed.
1082 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1083 /// <privlevel>platform</privlevel>
1084 /// <feature>http://tizen.org/feature/systemsetting</feature>
1085 /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
1086 /// <exception cref="ArgumentException">Invalid Argument</exception>
1087 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1088 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1089 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1090 /// <since_tizen> 3 </since_tizen>
1091 public static event EventHandler<IncomingCallRingtoneChangedEventArgs> IncomingCallRingtoneChanged
1095 if (s_incomingCallRingtoneChanged == null)
1097 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.IncomingCallRingtone, s_incomingCallRingtoneChangedCallback, IntPtr.Zero);
1098 if (ret != SystemSettingsError.None)
1100 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1103 s_incomingCallRingtoneChanged += value;
1108 if (s_incomingCallRingtoneChanged == null) {
1109 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1112 s_incomingCallRingtoneChanged -= value;
1113 if (s_incomingCallRingtoneChanged == null)
1115 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.IncomingCallRingtone, s_incomingCallRingtoneChangedCallback);
1116 if (ret != SystemSettingsError.None)
1118 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1124 private static readonly Interop.Settings.SystemSettingsChangedCallback s_wallpaperHomeScreenChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1126 string path = SystemSettings.WallpaperHomeScreen;
1127 WallpaperHomeScreenChangedEventArgs eventArgs = new WallpaperHomeScreenChangedEventArgs(path);
1128 s_wallpaperHomeScreenChanged?.Invoke(null, eventArgs);
1130 private static event EventHandler<WallpaperHomeScreenChangedEventArgs> s_wallpaperHomeScreenChanged;
1132 /// THe WallpaperHomeScreenChanged event is triggered when the file path of the current home screen wallpaper is changed.
1134 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1135 /// <privlevel>platform</privlevel>
1136 /// <feature>http://tizen.org/feature/systemsetting</feature>
1137 /// <feature>http://tizen.org/feature/systemsetting.home_screen</feature>
1138 /// <exception cref="ArgumentException">Invalid Argument</exception>
1139 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1140 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1141 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1142 /// <since_tizen> 3 </since_tizen>
1143 public static event EventHandler<WallpaperHomeScreenChangedEventArgs> WallpaperHomeScreenChanged
1147 if (s_wallpaperHomeScreenChanged == null)
1149 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.WallpaperHomeScreen, s_wallpaperHomeScreenChangedCallback, IntPtr.Zero);
1150 if (ret != SystemSettingsError.None)
1152 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1155 s_wallpaperHomeScreenChanged += value;
1160 if (s_wallpaperHomeScreenChanged == null) {
1161 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1164 s_wallpaperHomeScreenChanged -= value;
1165 if (s_wallpaperHomeScreenChanged == null)
1167 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.WallpaperHomeScreen, s_wallpaperHomeScreenChangedCallback);
1168 if (ret != SystemSettingsError.None)
1170 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1176 private static readonly Interop.Settings.SystemSettingsChangedCallback s_wallpaperLockScreenChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1178 string path = SystemSettings.WallpaperLockScreen;
1179 WallpaperLockScreenChangedEventArgs eventArgs = new WallpaperLockScreenChangedEventArgs(path);
1180 s_wallpaperLockScreenChanged?.Invoke(null, eventArgs);
1182 private static event EventHandler<WallpaperLockScreenChangedEventArgs> s_wallpaperLockScreenChanged;
1184 /// The WallpaperLockScreenChanged event is triggered when the file path of the current lock screen wallpaper is changed.
1186 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1187 /// <privlevel>platform</privlevel>
1188 /// <feature>http://tizen.org/feature/systemsetting</feature>
1189 /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
1190 /// <exception cref="ArgumentException">Invalid Argument</exception>
1191 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1192 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1193 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1194 /// <since_tizen> 3 </since_tizen>
1195 public static event EventHandler<WallpaperLockScreenChangedEventArgs> WallpaperLockScreenChanged
1199 if (s_wallpaperLockScreenChanged == null)
1201 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.WallpaperLockScreen, s_wallpaperLockScreenChangedCallback, IntPtr.Zero);
1202 if (ret != SystemSettingsError.None)
1204 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1207 s_wallpaperLockScreenChanged += value;
1212 if (s_wallpaperLockScreenChanged == null) {
1213 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1216 s_wallpaperLockScreenChanged -= value;
1217 if (s_wallpaperLockScreenChanged == null)
1219 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.WallpaperLockScreen, s_wallpaperLockScreenChangedCallback);
1220 if (ret != SystemSettingsError.None)
1222 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1228 private static readonly Interop.Settings.SystemSettingsChangedCallback s_fontSizeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1230 SystemSettingsFontSize fontSize = SystemSettings.FontSize;
1231 FontSizeChangedEventArgs eventArgs = new FontSizeChangedEventArgs(fontSize);
1232 s_fontSizeChanged?.Invoke(null, eventArgs);
1234 private static event EventHandler<FontSizeChangedEventArgs> s_fontSizeChanged;
1236 /// The FontSizeChanged event is triggered when the current system font size is changed.
1238 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1239 /// <privlevel>platform</privlevel>
1240 /// <feature>http://tizen.org/feature/systemsetting</feature>
1241 /// <exception cref="ArgumentException">Invalid Argument</exception>
1242 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1243 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1244 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1245 /// <since_tizen> 3 </since_tizen>
1246 public static event EventHandler<FontSizeChangedEventArgs> FontSizeChanged
1250 if (s_fontSizeChanged == null)
1252 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.FontSize, s_fontSizeChangedCallback, IntPtr.Zero);
1253 if (ret != SystemSettingsError.None)
1255 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1258 s_fontSizeChanged += value;
1263 if (s_fontSizeChanged == null) {
1264 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1267 s_fontSizeChanged -= value;
1268 if (s_fontSizeChanged == null)
1270 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.FontSize, s_fontSizeChangedCallback);
1271 if (ret != SystemSettingsError.None)
1273 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1279 private static readonly Interop.Settings.SystemSettingsChangedCallback s_fontTypeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1281 string fontType = SystemSettings.FontType;
1282 FontTypeChangedEventArgs eventArgs = new FontTypeChangedEventArgs(fontType);
1283 s_fontTypeChanged?.Invoke(null, eventArgs);
1285 private static event EventHandler<FontTypeChangedEventArgs> s_fontTypeChanged;
1287 /// The FontTypeChanged event is triggered when the current system font type is changed.
1289 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1290 /// <privlevel>platform</privlevel>
1291 /// <feature>http://tizen.org/feature/systemsetting</feature>
1292 /// <exception cref="ArgumentException">Invalid Argument</exception>
1293 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1294 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1295 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1296 /// <since_tizen> 3 </since_tizen>
1297 public static event EventHandler<FontTypeChangedEventArgs> FontTypeChanged
1301 if (s_fontTypeChanged == null)
1303 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.FontType, s_fontTypeChangedCallback, IntPtr.Zero);
1304 if (ret != SystemSettingsError.None)
1306 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1309 s_fontTypeChanged += value;
1314 if (s_fontTypeChanged == null) {
1315 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1318 s_fontTypeChanged -= value;
1319 if (s_fontTypeChanged == null)
1321 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.FontType, s_fontTypeChangedCallback);
1322 if (ret != SystemSettingsError.None)
1324 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1330 private static readonly Interop.Settings.SystemSettingsChangedCallback s_motionActivationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1332 bool motionActivation = SystemSettings.MotionActivationEnabled;
1333 MotionActivationSettingChangedEventArgs eventArgs = new MotionActivationSettingChangedEventArgs(motionActivation);
1334 s_motionActivationChanged?.Invoke(null, eventArgs);
1336 private static event EventHandler<MotionActivationSettingChangedEventArgs> s_motionActivationChanged;
1338 /// The MotionActivationChanged event is triggered when the motion service status is changed.
1340 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1341 /// <privlevel>platform</privlevel>
1342 /// <feature>http://tizen.org/feature/systemsetting</feature>
1343 /// <exception cref="ArgumentException">Invalid Argument</exception>
1344 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1345 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1346 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1347 /// <since_tizen> 3 </since_tizen>
1348 public static event EventHandler<MotionActivationSettingChangedEventArgs> MotionActivationSettingChanged
1352 if (s_motionActivationChanged == null)
1354 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.MotionActivationEnabled, s_motionActivationChangedCallback, IntPtr.Zero);
1355 if (ret != SystemSettingsError.None)
1357 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1360 s_motionActivationChanged += value;
1365 if (s_motionActivationChanged == null) {
1366 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1369 s_motionActivationChanged -= value;
1370 if (s_motionActivationChanged == null)
1372 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.MotionActivationEnabled, s_motionActivationChangedCallback);
1373 if (ret != SystemSettingsError.None)
1375 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1381 private static readonly Interop.Settings.SystemSettingsChangedCallback s_emailAlertRingtoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1383 string emailAlertRingtone = SystemSettings.EmailAlertRingtone;
1384 EmailAlertRingtoneChangedEventArgs eventArgs = new EmailAlertRingtoneChangedEventArgs(emailAlertRingtone);
1385 s_emailAlertRingtoneChanged?.Invoke(null, eventArgs);
1387 private static event EventHandler<EmailAlertRingtoneChangedEventArgs> s_emailAlertRingtoneChanged;
1389 /// The EmailAlertRingtoneChanged event is triggered when the file path of the current email alert ringtone is changed.
1391 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1392 /// <privlevel>platform</privlevel>
1393 /// <feature>http://tizen.org/feature/systemsetting</feature>
1394 /// <feature>http://tizen.org/feature/systemsetting.notification_email</feature>
1395 /// <exception cref="ArgumentException">Invalid Argument</exception>
1396 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1397 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1398 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1399 /// <since_tizen> 3 </since_tizen>
1400 public static event EventHandler<EmailAlertRingtoneChangedEventArgs> EmailAlertRingtoneChanged
1404 if (s_emailAlertRingtoneChanged == null)
1406 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.EmailAlertRingtone, s_emailAlertRingtoneChangedCallback, IntPtr.Zero);
1407 if (ret != SystemSettingsError.None)
1409 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1412 s_emailAlertRingtoneChanged += value;
1417 if (s_emailAlertRingtoneChanged == null) {
1418 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1421 s_emailAlertRingtoneChanged -= value;
1422 if (s_emailAlertRingtoneChanged == null)
1424 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.EmailAlertRingtone, s_emailAlertRingtoneChangedCallback);
1425 if (ret != SystemSettingsError.None)
1427 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1433 private static readonly Interop.Settings.SystemSettingsChangedCallback s_usbDebuggingSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1435 bool usbDebuggingEnabled = SystemSettings.UsbDebuggingEnabled;
1436 UsbDebuggingSettingChangedEventArgs eventArgs = new UsbDebuggingSettingChangedEventArgs(usbDebuggingEnabled);
1437 s_usbDebuggingSettingChanged?.Invoke(null, eventArgs);
1439 private static event EventHandler<UsbDebuggingSettingChangedEventArgs> s_usbDebuggingSettingChanged;
1441 /// The UsbDebuggingSettingChangedEventArgs event is triggered when the USB debugging status is changed.
1443 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1444 /// <privlevel>platform</privlevel>
1445 /// <feature>http://tizen.org/feature/systemsetting</feature>
1446 /// <exception cref="ArgumentException">Invalid Argument</exception>
1447 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1448 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1449 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1450 /// <since_tizen> 3 </since_tizen>
1451 public static event EventHandler<UsbDebuggingSettingChangedEventArgs> UsbDebuggingSettingChanged
1455 if (s_usbDebuggingSettingChanged == null)
1457 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UsbDebuggingEnabled, s_usbDebuggingSettingChangedCallback, IntPtr.Zero);
1458 if (ret != SystemSettingsError.None)
1460 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1463 s_usbDebuggingSettingChanged += value;
1468 if (s_usbDebuggingSettingChanged == null) {
1469 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1472 s_usbDebuggingSettingChanged -= value;
1473 if (s_usbDebuggingSettingChanged == null)
1475 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UsbDebuggingEnabled, s_usbDebuggingSettingChangedCallback);
1476 if (ret != SystemSettingsError.None)
1478 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1484 private static readonly Interop.Settings.SystemSettingsChangedCallback s_data3GNetworkSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1486 bool data3GEnabled = SystemSettings.Data3GNetworkEnabled;
1487 Data3GNetworkSettingChangedEventArgs eventArgs = new Data3GNetworkSettingChangedEventArgs(data3GEnabled);
1488 s_data3GNetworkSettingChanged?.Invoke(null, eventArgs);
1490 private static event EventHandler<Data3GNetworkSettingChangedEventArgs> s_data3GNetworkSettingChanged;
1492 /// The Data3GNetworkSettingChanged event is triggered when the 3G data network status is changed.
1494 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1495 /// <privlevel>platform</privlevel>
1496 /// <feature>http://tizen.org/feature/systemsetting</feature>
1497 /// <exception cref="ArgumentException">Invalid Argument</exception>
1498 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1499 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1500 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1501 /// <since_tizen> 3 </since_tizen>
1502 public static event EventHandler<Data3GNetworkSettingChangedEventArgs> Data3GNetworkSettingChanged
1506 if (s_data3GNetworkSettingChanged == null)
1508 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Data3GNetworkEnabled, s_data3GNetworkSettingChangedCallback, IntPtr.Zero);
1509 if (ret != SystemSettingsError.None)
1511 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1514 s_data3GNetworkSettingChanged += value;
1519 if (s_data3GNetworkSettingChanged == null) {
1520 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1523 s_data3GNetworkSettingChanged -= value;
1524 if (s_data3GNetworkSettingChanged == null)
1526 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Data3GNetworkEnabled, s_data3GNetworkSettingChangedCallback);
1527 if (ret != SystemSettingsError.None)
1529 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1535 private static readonly Interop.Settings.SystemSettingsChangedCallback s_lockscreenAppChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1537 string lockScreenApp = SystemSettings.LockScreenApp;
1538 LockScreenAppChangedEventArgs eventArgs = new LockScreenAppChangedEventArgs(lockScreenApp);
1539 s_lockscreenAppChanged?.Invoke(null, eventArgs);
1541 private static event EventHandler<LockScreenAppChangedEventArgs> s_lockscreenAppChanged;
1543 /// The LockScreenAppChanged event is triggered when the lockscreen application package name is changed.
1545 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1546 /// <privlevel>platform</privlevel>
1547 /// <feature>http://tizen.org/feature/systemsetting</feature>
1548 /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
1549 /// <exception cref="ArgumentException">Invalid Argument</exception>
1550 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1551 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1552 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1553 /// <since_tizen> 4 </since_tizen>
1554 public static event EventHandler<LockScreenAppChangedEventArgs> LockScreenAppChanged
1558 if (s_lockscreenAppChanged == null)
1560 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LockScreenApp, s_lockscreenAppChangedCallback, IntPtr.Zero);
1561 if (ret != SystemSettingsError.None)
1563 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1566 s_lockscreenAppChanged += value;
1571 if (s_lockscreenAppChanged == null) {
1572 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1576 s_lockscreenAppChanged -= value;
1577 if (s_lockscreenAppChanged == null)
1579 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LockScreenApp, s_lockscreenAppChangedCallback);
1580 if (ret != SystemSettingsError.None)
1582 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1588 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeCountryChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1590 string localeCountry = SystemSettings.LocaleCountry;
1591 LocaleCountryChangedEventArgs eventArgs = new LocaleCountryChangedEventArgs(localeCountry);
1592 s_localeCountryChanged?.Invoke(null, eventArgs);
1594 private static event EventHandler<LocaleCountryChangedEventArgs> s_localeCountryChanged;
1596 /// The LocaleCountryChanged event is triggered when the current country setting in the <LANGUAGE>_<REGION> syntax, is changed.
1598 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1599 /// <privlevel>platform</privlevel>
1600 /// <feature>http://tizen.org/feature/systemsetting</feature>
1601 /// <exception cref="ArgumentException">Invalid Argument</exception>
1602 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1603 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1604 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1605 /// <since_tizen> 3 </since_tizen>
1606 public static event EventHandler<LocaleCountryChangedEventArgs> LocaleCountryChanged
1610 if (s_localeCountryChanged == null)
1612 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleCountry, s_localeCountryChangedCallback, IntPtr.Zero);
1613 if (ret != SystemSettingsError.None)
1615 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1618 s_localeCountryChanged += value;
1623 if (s_localeCountryChanged == null) {
1624 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1627 s_localeCountryChanged -= value;
1628 if (s_localeCountryChanged == null)
1630 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleCountry, s_localeCountryChangedCallback);
1631 if (ret != SystemSettingsError.None)
1633 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1639 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeLanguageChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1641 string localeLanguage = SystemSettings.LocaleLanguage;
1642 LocaleLanguageChangedEventArgs eventArgs = new LocaleLanguageChangedEventArgs(localeLanguage);
1643 s_localeLanguageChanged?.Invoke(null, eventArgs);
1645 private static event EventHandler<LocaleLanguageChangedEventArgs> s_localeLanguageChanged;
1647 /// The LocaleLanguageChanged event is triggered when the current language setting in the <LANGUAGE>_<REGION> syntax, is changed.
1649 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1650 /// <privlevel>platform</privlevel>
1651 /// <feature>http://tizen.org/feature/systemsetting</feature>
1652 /// <exception cref="ArgumentException">Invalid Argument</exception>
1653 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1654 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1655 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1656 /// <since_tizen> 3 </since_tizen>
1657 public static event EventHandler<LocaleLanguageChangedEventArgs> LocaleLanguageChanged
1661 if (s_localeLanguageChanged == null)
1663 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleLanguage, s_localeLanguageChangedCallback, IntPtr.Zero);
1664 if (ret != SystemSettingsError.None)
1666 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1669 s_localeLanguageChanged += value;
1674 if (s_localeLanguageChanged == null) {
1675 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1678 s_localeLanguageChanged -= value;
1679 if (s_localeLanguageChanged == null)
1681 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleLanguage, s_localeLanguageChangedCallback);
1682 if (ret != SystemSettingsError.None)
1684 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1690 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeTimeFormat24HourChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1692 bool localeTimeFormat24Hour = SystemSettings.LocaleTimeFormat24HourEnabled;
1693 LocaleTimeFormat24HourSettingChangedEventArgs eventArgs = new LocaleTimeFormat24HourSettingChangedEventArgs(localeTimeFormat24Hour);
1694 s_localeTimeFormat24HourChanged?.Invoke(null, eventArgs);
1696 private static event EventHandler<LocaleTimeFormat24HourSettingChangedEventArgs> s_localeTimeFormat24HourChanged;
1698 /// The LocaleTimeFormat24HourChanged event is triggered when the time format is changed.
1700 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1701 /// <privlevel>platform</privlevel>
1702 /// <feature>http://tizen.org/feature/systemsetting</feature>
1703 /// <exception cref="ArgumentException">Invalid Argument</exception>
1704 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1705 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1706 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1707 /// <since_tizen> 3 </since_tizen>
1708 public static event EventHandler<LocaleTimeFormat24HourSettingChangedEventArgs> LocaleTimeFormat24HourSettingChanged
1712 if (s_localeTimeFormat24HourChanged == null)
1714 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, s_localeTimeFormat24HourChangedCallback, IntPtr.Zero);
1715 if (ret != SystemSettingsError.None)
1717 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1720 s_localeTimeFormat24HourChanged += value;
1725 if (s_localeTimeFormat24HourChanged == null) {
1726 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1729 s_localeTimeFormat24HourChanged -= value;
1730 if (s_localeTimeFormat24HourChanged == null)
1732 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, s_localeTimeFormat24HourChangedCallback);
1733 if (ret != SystemSettingsError.None)
1735 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1741 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeTimeZoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1743 string localeTimeZone = SystemSettings.LocaleTimeZone;
1744 LocaleTimeZoneChangedEventArgs eventArgs = new LocaleTimeZoneChangedEventArgs(localeTimeZone);
1745 s_localeTimeZoneChanged?.Invoke(null, eventArgs);
1747 private static event EventHandler<LocaleTimeZoneChangedEventArgs> s_localeTimeZoneChanged;
1749 /// The LocaleTimeZoneChanged event is triggered when the current time zone is changed.
1751 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1752 /// <privlevel>platform</privlevel>
1753 /// <feature>http://tizen.org/feature/systemsetting</feature>
1754 /// <exception cref="ArgumentException">Invalid Argument</exception>
1755 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1756 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1757 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1758 /// <since_tizen> 3 </since_tizen>
1759 public static event EventHandler<LocaleTimeZoneChangedEventArgs> LocaleTimeZoneChanged
1763 if (s_localeTimeZoneChanged == null)
1765 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleTimeZone, s_localeTimeZoneChangedCallback, IntPtr.Zero);
1766 if (ret != SystemSettingsError.None)
1768 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1771 s_localeTimeZoneChanged += value;
1776 if (s_localeTimeZoneChanged == null) {
1777 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1780 s_localeTimeZoneChanged -= value;
1781 if (s_localeTimeZoneChanged == null)
1783 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleTimeZone, s_localeTimeZoneChangedCallback);
1784 if (ret != SystemSettingsError.None)
1786 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1792 private static readonly Interop.Settings.SystemSettingsChangedCallback s_timeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1795 int time = SystemSettings.Time;
1796 TimeChangedEventArgs eventArgs = new TimeChangedEventArgs(time);
1797 s_timeChanged?.Invoke(null, eventArgs);
1799 private static event EventHandler<TimeChangedEventArgs> s_timeChanged;
1801 /// The TimeChanged event is triggered when the system time is changed.
1803 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1804 /// <privlevel>platform</privlevel>
1805 /// <feature>http://tizen.org/feature/systemsetting</feature>
1806 /// <exception cref="ArgumentException">Invalid Argument</exception>
1807 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1808 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1809 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1810 /// <since_tizen> 3 </since_tizen>
1811 public static event EventHandler<TimeChangedEventArgs> TimeChanged
1815 if (s_timeChanged == null)
1817 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Time, s_timeChangedCallback, IntPtr.Zero);
1818 if (ret != SystemSettingsError.None)
1820 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1823 s_timeChanged += value;
1828 if (s_timeChanged == null) {
1829 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1832 s_timeChanged -= value;
1833 if (s_timeChanged == null)
1835 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Time, s_timeChangedCallback);
1836 if (ret != SystemSettingsError.None)
1838 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1844 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundLockChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1846 bool soundLock = SystemSettings.SoundLockEnabled;
1847 SoundLockSettingChangedEventArgs eventArgs = new SoundLockSettingChangedEventArgs(soundLock);
1848 s_soundLockChanged?.Invoke(null, eventArgs);
1850 private static event EventHandler<SoundLockSettingChangedEventArgs> s_soundLockChanged;
1852 /// The SoundLockChanged event is triggered when the screen lock sound enabled status is changed.
1854 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1855 /// <privlevel>platform</privlevel>
1856 /// <feature>http://tizen.org/feature/systemsetting</feature>
1857 /// <exception cref="ArgumentException">Invalid Argument</exception>
1858 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1859 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1860 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1861 /// <since_tizen> 3 </since_tizen>
1862 public static event EventHandler<SoundLockSettingChangedEventArgs> SoundLockSettingChanged
1866 if (s_soundLockChanged == null)
1868 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundLockEnabled, s_soundLockChangedCallback, IntPtr.Zero);
1869 if (ret != SystemSettingsError.None)
1871 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1874 s_soundLockChanged += value;
1879 if (s_soundLockChanged == null) {
1880 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1883 s_soundLockChanged -= value;
1884 if (s_soundLockChanged == null)
1886 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundLockEnabled, s_soundLockChangedCallback);
1887 if (ret != SystemSettingsError.None)
1889 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1895 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundSilentModeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1897 bool soundSilentMode = SystemSettings.SoundSilentModeEnabled;
1898 SoundSilentModeSettingChangedEventArgs eventArgs = new SoundSilentModeSettingChangedEventArgs(soundSilentMode);
1899 s_soundSilentModeChanged?.Invoke(null, eventArgs);
1901 private static event EventHandler<SoundSilentModeSettingChangedEventArgs> s_soundSilentModeChanged;
1903 /// The SoundSilentModeChanged event is triggered when the silent mode status is changed.
1905 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1906 /// <privlevel>platform</privlevel>
1907 /// <feature>http://tizen.org/feature/systemsetting</feature>
1908 /// <exception cref="ArgumentException">Invalid Argument</exception>
1909 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1910 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1911 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1912 /// <since_tizen> 3 </since_tizen>
1913 public static event EventHandler<SoundSilentModeSettingChangedEventArgs> SoundSilentModeSettingChanged
1917 if (s_soundSilentModeChanged == null)
1919 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundSilentModeEnabled, s_soundSilentModeChangedCallback, IntPtr.Zero);
1920 if (ret != SystemSettingsError.None)
1922 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1925 s_soundSilentModeChanged += value;
1930 if (s_soundSilentModeChanged == null) {
1931 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1934 s_soundSilentModeChanged -= value;
1935 if (s_soundSilentModeChanged == null)
1937 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundSilentModeEnabled, s_soundSilentModeChangedCallback);
1938 if (ret != SystemSettingsError.None)
1940 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1946 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundTouchChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1948 bool soundTouch = SystemSettings.SoundTouchEnabled;
1949 SoundTouchSettingChangedEventArgs eventArgs = new SoundTouchSettingChangedEventArgs(soundTouch);
1950 s_soundTouchChanged?.Invoke(null, eventArgs);
1952 private static event EventHandler<SoundTouchSettingChangedEventArgs> s_soundTouchChanged;
1954 /// THe SoundTouchChanged event is triggered when the screen touch sound enabled status is changed.
1956 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1957 /// <privlevel>platform</privlevel>
1958 /// <feature>http://tizen.org/feature/systemsetting</feature>
1959 /// <exception cref="ArgumentException">Invalid Argument</exception>
1960 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1961 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1962 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1963 /// <since_tizen> 3 </since_tizen>
1964 public static event EventHandler<SoundTouchSettingChangedEventArgs> SoundTouchSettingChanged
1968 if (s_soundTouchChanged == null)
1970 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundTouchEnabled, s_soundTouchChangedCallback, IntPtr.Zero);
1971 if (ret != SystemSettingsError.None)
1973 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1976 s_soundTouchChanged += value;
1981 if (s_soundTouchChanged == null) {
1982 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1985 s_soundTouchChanged -= value;
1986 if (s_soundTouchChanged == null)
1989 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundTouchEnabled, s_soundTouchChangedCallback);
1990 if (ret != SystemSettingsError.None)
1992 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1998 private static readonly Interop.Settings.SystemSettingsChangedCallback s_displayScreenRotationAutoChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2000 bool displayScreenRotationAuto = SystemSettings.DisplayScreenRotationAutoEnabled;
2001 DisplayScreenRotationAutoSettingChangedEventArgs eventArgs = new DisplayScreenRotationAutoSettingChangedEventArgs(displayScreenRotationAuto);
2002 s_displayScreenRotationAutoChanged?.Invoke(null, eventArgs);
2004 private static event EventHandler<DisplayScreenRotationAutoSettingChangedEventArgs> s_displayScreenRotationAutoChanged;
2006 /// The DisplayScreenRotationAutoChanged event is triggered when the automatic rotation control status is changed.
2008 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2009 /// <privlevel>platform</privlevel>
2010 /// <feature>http://tizen.org/feature/systemsetting</feature>
2011 /// <exception cref="ArgumentException">Invalid Argument</exception>
2012 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2013 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2014 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2015 /// <since_tizen> 3 </since_tizen>
2016 public static event EventHandler<DisplayScreenRotationAutoSettingChangedEventArgs> DisplayScreenRotationAutoSettingChanged
2020 if (s_displayScreenRotationAutoChanged == null)
2022 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, s_displayScreenRotationAutoChangedCallback, IntPtr.Zero);
2023 if (ret != SystemSettingsError.None)
2025 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2028 s_displayScreenRotationAutoChanged += value;
2033 if (s_displayScreenRotationAutoChanged == null) {
2034 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2037 s_displayScreenRotationAutoChanged -= value;
2038 if (s_displayScreenRotationAutoChanged == null)
2040 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, s_displayScreenRotationAutoChangedCallback);
2041 if (ret != SystemSettingsError.None)
2043 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2049 private static readonly Interop.Settings.SystemSettingsChangedCallback s_deviceNameChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2051 string deviceName = SystemSettings.DeviceName;
2052 DeviceNameChangedEventArgs eventArgs = new DeviceNameChangedEventArgs(deviceName);
2053 s_deviceNameChanged?.Invoke(null, eventArgs);
2055 private static event EventHandler<DeviceNameChangedEventArgs> s_deviceNameChanged;
2057 /// The DeviceNameChanged event is triggered when the device name is changed.
2059 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2060 /// <privlevel>platform</privlevel>
2061 /// <feature>http://tizen.org/feature/systemsetting</feature>
2062 /// <exception cref="ArgumentException">Invalid Argument</exception>
2063 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2064 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2065 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2066 /// <since_tizen> 3 </since_tizen>
2067 public static event EventHandler<DeviceNameChangedEventArgs> DeviceNameChanged
2071 if (s_deviceNameChanged == null)
2073 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DeviceName, s_deviceNameChangedCallback, IntPtr.Zero);
2074 if (ret != SystemSettingsError.None)
2076 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2079 s_deviceNameChanged += value;
2084 if (s_deviceNameChanged == null) {
2085 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2088 s_deviceNameChanged -= value;
2089 if (s_deviceNameChanged == null)
2091 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DeviceName, s_deviceNameChangedCallback);
2092 if (ret != SystemSettingsError.None)
2094 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2100 private static readonly Interop.Settings.SystemSettingsChangedCallback s_motionSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2102 bool motionEnabled = SystemSettings.MotionEnabled;
2103 MotionSettingChangedEventArgs eventArgs = new MotionSettingChangedEventArgs(motionEnabled);
2104 s_motionSettingChanged?.Invoke(null, eventArgs);
2106 private static event EventHandler<MotionSettingChangedEventArgs> s_motionSettingChanged;
2108 /// The MotionSettingChanged event is triggered when the motion feature enabled status is changed.
2110 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2111 /// <privlevel>platform</privlevel>
2112 /// <feature>http://tizen.org/feature/systemsetting</feature>
2113 /// <exception cref="ArgumentException">Invalid Argument</exception>
2114 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2115 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2116 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2117 /// <since_tizen> 3 </since_tizen>
2118 public static event EventHandler<MotionSettingChangedEventArgs> MotionSettingChanged
2122 if (s_motionSettingChanged == null)
2124 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.MotionEnabled, s_motionSettingChangedCallback, IntPtr.Zero);
2125 if (ret != SystemSettingsError.None)
2127 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2130 s_motionSettingChanged += value;
2135 if (s_motionSettingChanged == null) {
2136 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2139 s_motionSettingChanged -= value;
2140 if (s_motionSettingChanged == null)
2142 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.MotionEnabled, s_motionSettingChangedCallback);
2143 if (ret != SystemSettingsError.None)
2145 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2151 private static readonly Interop.Settings.SystemSettingsChangedCallback s_networkWifiNotificationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2153 bool networkWifiNotification = SystemSettings.NetworkWifiNotificationEnabled;
2154 NetworkWifiNotificationSettingChangedEventArgs eventArgs = new NetworkWifiNotificationSettingChangedEventArgs(networkWifiNotification);
2155 s_networkWifiNotificationChanged?.Invoke(null, eventArgs);
2157 private static event EventHandler<NetworkWifiNotificationSettingChangedEventArgs> s_networkWifiNotificationChanged;
2159 /// The NetworkWifiNotificationChanged event is triggered when the WiFi-related notifications enabled status is changed.
2161 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2162 /// <privlevel>platform</privlevel>
2163 /// <feature>http://tizen.org/feature/systemsetting</feature>
2164 /// <feature>http://tizen.org/feature/network.wifi</feature>
2165 /// <exception cref="ArgumentException">Invalid Argument</exception>
2166 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2167 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2168 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2169 /// <since_tizen> 3 </since_tizen>
2170 public static event EventHandler<NetworkWifiNotificationSettingChangedEventArgs> NetworkWifiNotificationSettingChanged
2174 if (s_networkWifiNotificationChanged == null)
2176 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.NetworkWifiNotificationEnabled, s_networkWifiNotificationChangedCallback, IntPtr.Zero);
2177 if (ret != SystemSettingsError.None)
2179 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2182 s_networkWifiNotificationChanged += value;
2187 if (s_networkWifiNotificationChanged == null) {
2188 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2191 s_networkWifiNotificationChanged -= value;
2192 if (s_networkWifiNotificationChanged == null)
2194 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.NetworkWifiNotificationEnabled, s_networkWifiNotificationChangedCallback);
2195 if (ret != SystemSettingsError.None)
2197 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2203 private static readonly Interop.Settings.SystemSettingsChangedCallback s_networkFlightModeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2205 bool networkFlightMode = SystemSettings.NetworkFlightModeEnabled;
2206 NetworkFlightModeSettingChangedEventArgs eventArgs = new NetworkFlightModeSettingChangedEventArgs(networkFlightMode);
2207 s_networkFlightModeChanged?.Invoke(null, eventArgs);
2209 private static event EventHandler<NetworkFlightModeSettingChangedEventArgs> s_networkFlightModeChanged;
2211 /// The NetworkFlightModeChanged event is triggered when the flight mode status is changed.
2213 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2214 /// <privlevel>platform</privlevel>
2215 /// <feature>http://tizen.org/feature/systemsetting</feature>
2216 /// <exception cref="ArgumentException">Invalid Argument</exception>
2217 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2218 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2219 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2220 /// <since_tizen> 3 </since_tizen>
2221 public static event EventHandler<NetworkFlightModeSettingChangedEventArgs> NetworkFlightModeSettingChanged
2225 if (s_networkFlightModeChanged == null)
2227 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.NetworkFlightModeEnabled, s_networkFlightModeChangedCallback, IntPtr.Zero);
2228 if (ret != SystemSettingsError.None)
2230 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2233 s_networkFlightModeChanged += value;
2238 if (s_networkFlightModeChanged == null) {
2239 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2242 s_networkFlightModeChanged -= value;
2243 if (s_networkFlightModeChanged == null)
2245 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.NetworkFlightModeEnabled, s_networkFlightModeChangedCallback);
2246 if (ret != SystemSettingsError.None)
2248 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2254 private static readonly Interop.Settings.SystemSettingsChangedCallback s_screenBacklightTimeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2256 int screenBacklightTime = SystemSettings.ScreenBacklightTime;
2257 ScreenBacklightTimeChangedEventArgs eventArgs = new ScreenBacklightTimeChangedEventArgs(screenBacklightTime);
2258 s_screenBacklightTimeChanged?.Invoke(null, eventArgs);
2260 private static event EventHandler<ScreenBacklightTimeChangedEventArgs> s_screenBacklightTimeChanged;
2262 /// THe ScreenBacklightTimeChanged event is triggered when the backlight time is changed.
2264 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2265 /// <privlevel>platform</privlevel>
2266 /// <feature>http://tizen.org/feature/systemsetting</feature>
2267 /// <exception cref="ArgumentException">Invalid Argument</exception>
2268 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2269 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2270 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2271 /// <since_tizen> 3 </since_tizen>
2272 public static event EventHandler<ScreenBacklightTimeChangedEventArgs> ScreenBacklightTimeChanged
2276 if (s_screenBacklightTimeChanged == null)
2278 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.ScreenBacklightTime, s_screenBacklightTimeChangedCallback, IntPtr.Zero);
2279 if (ret != SystemSettingsError.None)
2281 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2284 s_screenBacklightTimeChanged += value;
2289 if (s_screenBacklightTimeChanged == null) {
2290 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2293 s_screenBacklightTimeChanged -= value;
2294 if (s_screenBacklightTimeChanged == null)
2296 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.ScreenBacklightTime, s_screenBacklightTimeChangedCallback);
2297 if (ret != SystemSettingsError.None)
2299 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2305 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundNotificationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2307 string soundNotification = SystemSettings.SoundNotification;
2308 SoundNotificationChangedEventArgs eventArgs = new SoundNotificationChangedEventArgs(soundNotification);
2309 s_soundNotificationChanged?.Invoke(null, eventArgs);
2311 private static event EventHandler<SoundNotificationChangedEventArgs> s_soundNotificationChanged;
2313 /// The SoundNotificationChanged event is triggered when the file path of the current notification tone set by the user is changed.
2315 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2316 /// <privlevel>platform</privlevel>
2317 /// <feature>http://tizen.org/feature/systemsetting</feature>
2318 /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
2319 /// <exception cref="ArgumentException">Invalid Argument</exception>
2320 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2321 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2322 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2323 /// <since_tizen> 3 </since_tizen>
2324 public static event EventHandler<SoundNotificationChangedEventArgs> SoundNotificationChanged
2328 if (s_soundNotificationChanged == null)
2330 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundNotification, s_soundNotificationChangedCallback, IntPtr.Zero);
2331 if (ret != SystemSettingsError.None)
2333 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2336 s_soundNotificationChanged += value;
2341 if (s_soundNotificationChanged == null) {
2342 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2345 s_soundNotificationChanged -= value;
2346 if (s_soundNotificationChanged == null)
2348 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundNotification, s_soundNotificationChangedCallback);
2349 if (ret != SystemSettingsError.None)
2351 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2357 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundNotificationRepetitionPeriodChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2359 int soundNotificationRepetitionPeriod = SystemSettings.SoundNotificationRepetitionPeriod;
2360 SoundNotificationRepetitionPeriodChangedEventArgs eventArgs = new SoundNotificationRepetitionPeriodChangedEventArgs(soundNotificationRepetitionPeriod);
2361 s_soundNotificationRepetitionPeriodChanged?.Invoke(null, eventArgs);
2363 private static event EventHandler<SoundNotificationRepetitionPeriodChangedEventArgs> s_soundNotificationRepetitionPeriodChanged;
2365 /// The SoundNotificationRepetitionPeriodChanged event is triggered when the time period for notification repetitions is changed.
2367 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2368 /// <privlevel>platform</privlevel>
2369 /// <feature>http://tizen.org/feature/systemsetting</feature>
2370 /// <exception cref="ArgumentException">Invalid Argument</exception>
2371 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2372 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2373 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2374 /// <since_tizen> 3 </since_tizen>
2375 public static event EventHandler<SoundNotificationRepetitionPeriodChangedEventArgs> SoundNotificationRepetitionPeriodChanged
2379 if (s_soundNotificationRepetitionPeriodChanged == null)
2381 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundNotificationRepetitionPeriod, s_soundNotificationRepetitionPeriodChangedCallback, IntPtr.Zero);
2382 if (ret != SystemSettingsError.None)
2384 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2387 s_soundNotificationRepetitionPeriodChanged += value;
2392 if (s_soundNotificationRepetitionPeriodChanged == null) {
2393 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2396 s_soundNotificationRepetitionPeriodChanged -= value;
2397 if (s_soundNotificationRepetitionPeriodChanged == null)
2399 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundNotificationRepetitionPeriod, s_soundNotificationRepetitionPeriodChangedCallback);
2400 if (ret != SystemSettingsError.None)
2402 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2408 private static readonly Interop.Settings.SystemSettingsChangedCallback s_lockStateChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2410 SystemSettingsIdleLockState lockState = SystemSettings.LockState;
2411 LockStateChangedEventArgs eventArgs = new LockStateChangedEventArgs(lockState);
2412 s_lockStateChanged?.Invoke(null, eventArgs);
2414 private static event EventHandler<LockStateChangedEventArgs> s_lockStateChanged;
2416 /// The LockStateChanged event is triggered when the current lock state is changed.
2418 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2419 /// <privlevel>platform</privlevel>
2420 /// <feature>http://tizen.org/feature/systemsetting</feature>
2421 /// <exception cref="ArgumentException">Invalid Argument</exception>
2422 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2423 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2424 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2425 /// <since_tizen> 3 </since_tizen>
2426 public static event EventHandler<LockStateChangedEventArgs> LockStateChanged
2430 if (s_lockStateChanged == null)
2432 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LockState, s_lockStateChangedCallback, IntPtr.Zero);
2433 if (ret != SystemSettingsError.None)
2435 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2438 s_lockStateChanged += value;
2443 if (s_lockStateChanged == null) {
2444 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2447 s_lockStateChanged -= value;
2448 if (s_lockStateChanged == null)
2450 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LockState, s_lockStateChangedCallback);
2451 if (ret != SystemSettingsError.None)
2453 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2459 private static readonly Interop.Settings.SystemSettingsChangedCallback s_adsIdChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2461 string adsId = SystemSettings.AdsId;
2462 AdsIdChangedEventArgs eventArgs = new AdsIdChangedEventArgs(adsId);
2463 s_adsIdChanged?.Invoke(null, eventArgs);
2465 private static event EventHandler<AdsIdChangedEventArgs> s_adsIdChanged;
2467 /// The AdsIdChanged event is triggered when the current ADS ID state is changed.
2469 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2470 /// <privlevel>platform</privlevel>
2471 /// <feature>http://tizen.org/feature/systemsetting</feature>
2472 /// <exception cref="ArgumentException">Invalid Argument</exception>
2473 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2474 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2475 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2476 /// <since_tizen> 3 </since_tizen>
2477 public static event EventHandler<AdsIdChangedEventArgs> AdsIdChanged
2481 if (s_adsIdChanged == null)
2483 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AdsId, s_adsIdChangedCallback, IntPtr.Zero);
2484 if (ret != SystemSettingsError.None)
2486 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2489 s_adsIdChanged += value;
2494 if (s_adsIdChanged == null) {
2495 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2498 s_adsIdChanged -= value;
2499 if (s_adsIdChanged == null)
2501 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AdsId, s_adsIdChangedCallback);
2502 if (ret != SystemSettingsError.None)
2504 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2510 private static readonly Interop.Settings.SystemSettingsChangedCallback s_ultraDataSaveChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2512 SystemSettingsUdsState ultraDataSave = SystemSettings.UltraDataSave;
2513 UltraDataSaveChangedEventArgs eventArgs = new UltraDataSaveChangedEventArgs(ultraDataSave);
2514 s_ultraDataSaveChanged?.Invoke(null, eventArgs);
2516 private static event EventHandler<UltraDataSaveChangedEventArgs> s_ultraDataSaveChanged;
2518 /// The UltraDataSaveChanged event is triggered when the current Ultra Data Save state is changed.
2520 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2521 /// <privlevel>platform</privlevel>
2522 /// <feature>http://tizen.org/feature/systemsetting</feature>
2523 /// <feature>http://tizen.org/feature/network.telephony</feature>
2524 /// <exception cref="ArgumentException">Invalid Argument</exception>
2525 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2526 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2527 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2528 /// <since_tizen> 3 </since_tizen>
2529 public static event EventHandler<UltraDataSaveChangedEventArgs> UltraDataSaveChanged
2533 if (s_ultraDataSaveChanged == null)
2535 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UltraDataSave, s_ultraDataSaveChangedCallback, IntPtr.Zero);
2536 if (ret != SystemSettingsError.None)
2538 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2541 s_ultraDataSaveChanged += value;
2546 if (s_ultraDataSaveChanged == null) {
2547 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2550 s_ultraDataSaveChanged -= value;
2551 if (s_ultraDataSaveChanged == null)
2553 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UltraDataSave, s_ultraDataSaveChangedCallback);
2554 if (ret != SystemSettingsError.None)
2556 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2562 private static readonly Interop.Settings.SystemSettingsChangedCallback s_ultraDataSavePackageListChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2564 string ultraDataSavePackageList = "None";
2565 UltraDataSavePackageListChangedEventArgs eventArgs = new UltraDataSavePackageListChangedEventArgs(ultraDataSavePackageList);
2566 s_ultraDataSavePackageListChanged?.Invoke(null, eventArgs);
2568 private static event EventHandler<UltraDataSavePackageListChangedEventArgs> s_ultraDataSavePackageListChanged;
2570 /// The UltraDataSavePackageListChanged event is triggered when the current ADS ID state is changed.
2572 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2573 /// <privlevel>platform</privlevel>
2574 /// <feature>http://tizen.org/feature/systemsetting</feature>
2575 /// <feature>http://tizen.org/feature/network.telephony</feature>
2576 /// <exception cref="ArgumentException">Invalid Argument</exception>
2577 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2578 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2579 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2580 /// <since_tizen> 3 </since_tizen>
2581 public static event EventHandler<UltraDataSavePackageListChangedEventArgs> UltraDataSavePackageListChanged
2585 if (s_ultraDataSavePackageListChanged == null)
2587 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UltraDataSavePackageList, s_ultraDataSavePackageListChangedCallback, IntPtr.Zero);
2588 if (ret != SystemSettingsError.None)
2590 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2593 s_ultraDataSavePackageListChanged += value;
2598 if (s_ultraDataSavePackageListChanged == null) {
2599 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2602 s_ultraDataSavePackageListChanged -= value;
2603 if (s_ultraDataSavePackageListChanged == null)
2605 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UltraDataSavePackageList, s_ultraDataSavePackageListChangedCallback);
2606 if (ret != SystemSettingsError.None)
2608 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2614 private static readonly Interop.Settings.SystemSettingsChangedCallback s_accessibilityTtsChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2616 bool accessibilityTts = SystemSettings.AccessibilityTtsEnabled;
2617 AccessibilityTtsSettingChangedEventArgs eventArgs = new AccessibilityTtsSettingChangedEventArgs(accessibilityTts);
2618 s_accessibilityTtsChanged?.Invoke(null, eventArgs);
2620 private static event EventHandler<AccessibilityTtsSettingChangedEventArgs> s_accessibilityTtsChanged;
2622 /// THe AccessibilityTtsChanged event is triggered when the screen touch sound enabled status is changed.
2624 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2625 /// <privlevel>platform</privlevel>
2626 /// <feature>http://tizen.org/feature/systemsetting</feature>
2627 /// <exception cref="ArgumentException">Invalid Argument</exception>
2628 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2629 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2630 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2631 /// <since_tizen> 4 </since_tizen>
2632 public static event EventHandler<AccessibilityTtsSettingChangedEventArgs> AccessibilityTtsSettingChanged
2636 if (s_accessibilityTtsChanged == null)
2638 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AccessibilityTtsEnabled, s_accessibilityTtsChangedCallback, IntPtr.Zero);
2639 if (ret != SystemSettingsError.None)
2641 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2644 s_accessibilityTtsChanged += value;
2649 if (s_accessibilityTtsChanged == null) {
2650 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2653 s_accessibilityTtsChanged -= value;
2654 if (s_accessibilityTtsChanged == null)
2657 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AccessibilityTtsEnabled, s_accessibilityTtsChangedCallback);
2658 if (ret != SystemSettingsError.None)
2660 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2666 private static readonly Interop.Settings.SystemSettingsChangedCallback s_vibrationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2668 bool vibration = SystemSettings.Vibration;
2669 VibrationChangedEventArgs eventArgs = new VibrationChangedEventArgs(vibration);
2670 s_vibrationChanged?.Invoke(null, eventArgs);
2672 private static event EventHandler<VibrationChangedEventArgs> s_vibrationChanged;
2674 /// The VibrationChanged event is triggered when the vibration value is changed.
2676 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2677 /// <privlevel>platform</privlevel>
2678 /// <feature>http://tizen.org/feature/systemsetting</feature>
2679 /// <exception cref="ArgumentException">Invalid Argument</exception>
2680 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2681 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2682 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2683 /// <since_tizen> 5 </since_tizen>
2684 public static event EventHandler<VibrationChangedEventArgs> VibrationChanged
2688 if (s_vibrationChanged == null)
2690 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Vibration, s_vibrationChangedCallback, IntPtr.Zero);
2691 if (ret != SystemSettingsError.None)
2693 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2696 s_vibrationChanged += value;
2701 s_vibrationChanged -= value;
2702 if (s_vibrationChanged == null)
2704 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Vibration, s_vibrationChangedCallback);
2705 if (ret != SystemSettingsError.None)
2707 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2713 private static readonly Interop.Settings.SystemSettingsChangedCallback s_automaticTimeUpdateChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2715 bool automaticTimeUpdate = SystemSettings.AutomaticTimeUpdate;
2716 AutomaticTimeUpdateChangedEventArgs eventArgs = new AutomaticTimeUpdateChangedEventArgs(automaticTimeUpdate);
2717 s_automaticTimeUpdateChanged?.Invoke(null, eventArgs);
2719 private static event EventHandler<AutomaticTimeUpdateChangedEventArgs> s_automaticTimeUpdateChanged;
2721 /// The AutomaticTimeUpdateChanged event is triggered when the AutomaticTimeUpdate value is changed.
2723 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2724 /// <privlevel>platform</privlevel>
2725 /// <feature>http://tizen.org/feature/systemsetting</feature>
2726 /// <exception cref="ArgumentException">Invalid Argument</exception>
2727 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2728 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2729 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2730 /// <since_tizen> 5 </since_tizen>
2731 public static event EventHandler<AutomaticTimeUpdateChangedEventArgs> AutomaticTimeUpdateChanged
2735 if (s_automaticTimeUpdateChanged == null)
2737 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AutomaticTimeUpdate, s_automaticTimeUpdateChangedCallback, IntPtr.Zero);
2738 if (ret != SystemSettingsError.None)
2740 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2743 s_automaticTimeUpdateChanged += value;
2748 s_automaticTimeUpdateChanged -= value;
2749 if (s_automaticTimeUpdateChanged == null)
2751 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AutomaticTimeUpdate, s_automaticTimeUpdateChangedCallback);
2752 if (ret != SystemSettingsError.None)
2754 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2760 private static readonly Interop.Settings.SystemSettingsChangedCallback s_developerOptionStateChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2762 bool developerOptionState = SystemSettings.DeveloperOptionState;
2763 DeveloperOptionStateChangedEventArgs eventArgs = new DeveloperOptionStateChangedEventArgs(developerOptionState);
2764 s_developerOptionStateChanged?.Invoke(null, eventArgs);
2766 private static event EventHandler<DeveloperOptionStateChangedEventArgs> s_developerOptionStateChanged;
2768 /// The DeveloperOptionStateChanged event is triggered when the DeveloperOptionState value is changed.
2770 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2771 /// <privlevel>platform</privlevel>
2772 /// <feature>http://tizen.org/feature/systemsetting</feature>
2773 /// <exception cref="ArgumentException">Invalid Argument</exception>
2774 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2775 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2776 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2777 /// <since_tizen> 5 </since_tizen>
2778 public static event EventHandler<DeveloperOptionStateChangedEventArgs> DeveloperOptionStateChanged
2782 if (s_developerOptionStateChanged == null)
2784 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DeveloperOptionState, s_developerOptionStateChangedCallback, IntPtr.Zero);
2785 if (ret != SystemSettingsError.None)
2787 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2790 s_developerOptionStateChanged += value;
2795 s_developerOptionStateChanged -= value;
2796 if (s_developerOptionStateChanged == null)
2798 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DeveloperOptionState, s_developerOptionStateChangedCallback);
2799 if (ret != SystemSettingsError.None)
2801 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");