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.
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.
1008 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1009 /// <privlevel>platform</privlevel>
1010 /// <feature>http://tizen.org/feature/systemsetting</feature>
1011 /// <exception cref="ArgumentException">Invalid Argument</exception>
1012 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1013 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1014 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1015 /// <since_tizen> 5 </since_tizen>
1016 public static bool AutomaticTimeUpdate
1020 bool isAutomaticTimeUpdate;
1021 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.AutomaticTimeUpdate, out isAutomaticTimeUpdate);
1022 if (res != SystemSettingsError.None)
1024 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get isAutomaticTimeUpdate system setting.");
1026 return isAutomaticTimeUpdate;
1030 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.AutomaticTimeUpdate, value);
1031 if (res != SystemSettingsError.None)
1033 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set isAutomaticTimeUpdate system setting.");
1039 /// Indicates whether the developer option state is enabled on the device.
1041 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1042 /// <privlevel>platform</privlevel>
1043 /// <feature>http://tizen.org/feature/systemsetting</feature>
1044 /// <exception cref="ArgumentException">Invalid Argument</exception>
1045 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1046 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1047 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1048 /// <since_tizen> 5 </since_tizen>
1049 public static bool DeveloperOptionState
1053 bool isDeveloperOptionState;
1054 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.DeveloperOptionState, out isDeveloperOptionState);
1055 if (res != SystemSettingsError.None)
1057 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get isDeveloperOptionState system setting.");
1059 return isDeveloperOptionState;
1063 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.DeveloperOptionState, value);
1064 if (res != SystemSettingsError.None)
1066 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set isDeveloperOptionState system setting.");
1071 private static readonly Interop.Settings.SystemSettingsChangedCallback s_incomingCallRingtoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1073 string path = SystemSettings.IncomingCallRingtone;
1074 IncomingCallRingtoneChangedEventArgs eventArgs = new IncomingCallRingtoneChangedEventArgs(path);
1075 s_incomingCallRingtoneChanged?.Invoke(null, eventArgs);
1077 private static event EventHandler<IncomingCallRingtoneChangedEventArgs> s_incomingCallRingtoneChanged;
1079 /// The IncomingCallRingtoneChanged event is triggered when the file path of the incoming ringtone is changed.
1081 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1082 /// <privlevel>platform</privlevel>
1083 /// <feature>http://tizen.org/feature/systemsetting</feature>
1084 /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
1085 /// <exception cref="ArgumentException">Invalid Argument</exception>
1086 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1087 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1088 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1089 /// <since_tizen> 3 </since_tizen>
1090 public static event EventHandler<IncomingCallRingtoneChangedEventArgs> IncomingCallRingtoneChanged
1094 if (s_incomingCallRingtoneChanged == null)
1096 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.IncomingCallRingtone, s_incomingCallRingtoneChangedCallback, IntPtr.Zero);
1097 if (ret != SystemSettingsError.None)
1099 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1102 s_incomingCallRingtoneChanged += value;
1107 if (s_incomingCallRingtoneChanged == null) {
1108 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1111 s_incomingCallRingtoneChanged -= value;
1112 if (s_incomingCallRingtoneChanged == null)
1114 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.IncomingCallRingtone, s_incomingCallRingtoneChangedCallback);
1115 if (ret != SystemSettingsError.None)
1117 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1123 private static readonly Interop.Settings.SystemSettingsChangedCallback s_wallpaperHomeScreenChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1125 string path = SystemSettings.WallpaperHomeScreen;
1126 WallpaperHomeScreenChangedEventArgs eventArgs = new WallpaperHomeScreenChangedEventArgs(path);
1127 s_wallpaperHomeScreenChanged?.Invoke(null, eventArgs);
1129 private static event EventHandler<WallpaperHomeScreenChangedEventArgs> s_wallpaperHomeScreenChanged;
1131 /// THe WallpaperHomeScreenChanged event is triggered when the file path of the current home screen wallpaper is changed.
1133 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1134 /// <privlevel>platform</privlevel>
1135 /// <feature>http://tizen.org/feature/systemsetting</feature>
1136 /// <feature>http://tizen.org/feature/systemsetting.home_screen</feature>
1137 /// <exception cref="ArgumentException">Invalid Argument</exception>
1138 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1139 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1140 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1141 /// <since_tizen> 3 </since_tizen>
1142 public static event EventHandler<WallpaperHomeScreenChangedEventArgs> WallpaperHomeScreenChanged
1146 if (s_wallpaperHomeScreenChanged == null)
1148 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.WallpaperHomeScreen, s_wallpaperHomeScreenChangedCallback, IntPtr.Zero);
1149 if (ret != SystemSettingsError.None)
1151 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1154 s_wallpaperHomeScreenChanged += value;
1159 if (s_wallpaperHomeScreenChanged == null) {
1160 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1163 s_wallpaperHomeScreenChanged -= value;
1164 if (s_wallpaperHomeScreenChanged == null)
1166 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.WallpaperHomeScreen, s_wallpaperHomeScreenChangedCallback);
1167 if (ret != SystemSettingsError.None)
1169 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1175 private static readonly Interop.Settings.SystemSettingsChangedCallback s_wallpaperLockScreenChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1177 string path = SystemSettings.WallpaperLockScreen;
1178 WallpaperLockScreenChangedEventArgs eventArgs = new WallpaperLockScreenChangedEventArgs(path);
1179 s_wallpaperLockScreenChanged?.Invoke(null, eventArgs);
1181 private static event EventHandler<WallpaperLockScreenChangedEventArgs> s_wallpaperLockScreenChanged;
1183 /// The WallpaperLockScreenChanged event is triggered when the file path of the current lock screen wallpaper is changed.
1185 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1186 /// <privlevel>platform</privlevel>
1187 /// <feature>http://tizen.org/feature/systemsetting</feature>
1188 /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
1189 /// <exception cref="ArgumentException">Invalid Argument</exception>
1190 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1191 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1192 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1193 /// <since_tizen> 3 </since_tizen>
1194 public static event EventHandler<WallpaperLockScreenChangedEventArgs> WallpaperLockScreenChanged
1198 if (s_wallpaperLockScreenChanged == null)
1200 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.WallpaperLockScreen, s_wallpaperLockScreenChangedCallback, IntPtr.Zero);
1201 if (ret != SystemSettingsError.None)
1203 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1206 s_wallpaperLockScreenChanged += value;
1211 if (s_wallpaperLockScreenChanged == null) {
1212 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1215 s_wallpaperLockScreenChanged -= value;
1216 if (s_wallpaperLockScreenChanged == null)
1218 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.WallpaperLockScreen, s_wallpaperLockScreenChangedCallback);
1219 if (ret != SystemSettingsError.None)
1221 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1227 private static readonly Interop.Settings.SystemSettingsChangedCallback s_fontSizeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1229 SystemSettingsFontSize fontSize = SystemSettings.FontSize;
1230 FontSizeChangedEventArgs eventArgs = new FontSizeChangedEventArgs(fontSize);
1231 s_fontSizeChanged?.Invoke(null, eventArgs);
1233 private static event EventHandler<FontSizeChangedEventArgs> s_fontSizeChanged;
1235 /// The FontSizeChanged event is triggered when the current system font size is changed.
1237 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1238 /// <privlevel>platform</privlevel>
1239 /// <feature>http://tizen.org/feature/systemsetting</feature>
1240 /// <exception cref="ArgumentException">Invalid Argument</exception>
1241 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1242 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1243 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1244 /// <since_tizen> 3 </since_tizen>
1245 public static event EventHandler<FontSizeChangedEventArgs> FontSizeChanged
1249 if (s_fontSizeChanged == null)
1251 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.FontSize, s_fontSizeChangedCallback, IntPtr.Zero);
1252 if (ret != SystemSettingsError.None)
1254 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1257 s_fontSizeChanged += value;
1262 if (s_fontSizeChanged == null) {
1263 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1266 s_fontSizeChanged -= value;
1267 if (s_fontSizeChanged == null)
1269 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.FontSize, s_fontSizeChangedCallback);
1270 if (ret != SystemSettingsError.None)
1272 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1278 private static readonly Interop.Settings.SystemSettingsChangedCallback s_fontTypeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1280 string fontType = SystemSettings.FontType;
1281 FontTypeChangedEventArgs eventArgs = new FontTypeChangedEventArgs(fontType);
1282 s_fontTypeChanged?.Invoke(null, eventArgs);
1284 private static event EventHandler<FontTypeChangedEventArgs> s_fontTypeChanged;
1286 /// The FontTypeChanged event is triggered when the current system font type is changed.
1288 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1289 /// <privlevel>platform</privlevel>
1290 /// <feature>http://tizen.org/feature/systemsetting</feature>
1291 /// <exception cref="ArgumentException">Invalid Argument</exception>
1292 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1293 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1294 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1295 /// <since_tizen> 3 </since_tizen>
1296 public static event EventHandler<FontTypeChangedEventArgs> FontTypeChanged
1300 if (s_fontTypeChanged == null)
1302 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.FontType, s_fontTypeChangedCallback, IntPtr.Zero);
1303 if (ret != SystemSettingsError.None)
1305 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1308 s_fontTypeChanged += value;
1313 if (s_fontTypeChanged == null) {
1314 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1317 s_fontTypeChanged -= value;
1318 if (s_fontTypeChanged == null)
1320 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.FontType, s_fontTypeChangedCallback);
1321 if (ret != SystemSettingsError.None)
1323 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1329 private static readonly Interop.Settings.SystemSettingsChangedCallback s_motionActivationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1331 bool motionActivation = SystemSettings.MotionActivationEnabled;
1332 MotionActivationSettingChangedEventArgs eventArgs = new MotionActivationSettingChangedEventArgs(motionActivation);
1333 s_motionActivationChanged?.Invoke(null, eventArgs);
1335 private static event EventHandler<MotionActivationSettingChangedEventArgs> s_motionActivationChanged;
1337 /// The MotionActivationChanged event is triggered when the motion service status is changed.
1339 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1340 /// <privlevel>platform</privlevel>
1341 /// <feature>http://tizen.org/feature/systemsetting</feature>
1342 /// <exception cref="ArgumentException">Invalid Argument</exception>
1343 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1344 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1345 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1346 /// <since_tizen> 3 </since_tizen>
1347 public static event EventHandler<MotionActivationSettingChangedEventArgs> MotionActivationSettingChanged
1351 if (s_motionActivationChanged == null)
1353 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.MotionActivationEnabled, s_motionActivationChangedCallback, IntPtr.Zero);
1354 if (ret != SystemSettingsError.None)
1356 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1359 s_motionActivationChanged += value;
1364 if (s_motionActivationChanged == null) {
1365 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1368 s_motionActivationChanged -= value;
1369 if (s_motionActivationChanged == null)
1371 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.MotionActivationEnabled, s_motionActivationChangedCallback);
1372 if (ret != SystemSettingsError.None)
1374 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1380 private static readonly Interop.Settings.SystemSettingsChangedCallback s_emailAlertRingtoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1382 string emailAlertRingtone = SystemSettings.EmailAlertRingtone;
1383 EmailAlertRingtoneChangedEventArgs eventArgs = new EmailAlertRingtoneChangedEventArgs(emailAlertRingtone);
1384 s_emailAlertRingtoneChanged?.Invoke(null, eventArgs);
1386 private static event EventHandler<EmailAlertRingtoneChangedEventArgs> s_emailAlertRingtoneChanged;
1388 /// The EmailAlertRingtoneChanged event is triggered when the file path of the current email alert ringtone is changed.
1390 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1391 /// <privlevel>platform</privlevel>
1392 /// <feature>http://tizen.org/feature/systemsetting</feature>
1393 /// <feature>http://tizen.org/feature/systemsetting.notification_email</feature>
1394 /// <exception cref="ArgumentException">Invalid Argument</exception>
1395 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1396 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1397 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1398 /// <since_tizen> 3 </since_tizen>
1399 public static event EventHandler<EmailAlertRingtoneChangedEventArgs> EmailAlertRingtoneChanged
1403 if (s_emailAlertRingtoneChanged == null)
1405 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.EmailAlertRingtone, s_emailAlertRingtoneChangedCallback, IntPtr.Zero);
1406 if (ret != SystemSettingsError.None)
1408 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1411 s_emailAlertRingtoneChanged += value;
1416 if (s_emailAlertRingtoneChanged == null) {
1417 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1420 s_emailAlertRingtoneChanged -= value;
1421 if (s_emailAlertRingtoneChanged == null)
1423 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.EmailAlertRingtone, s_emailAlertRingtoneChangedCallback);
1424 if (ret != SystemSettingsError.None)
1426 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1432 private static readonly Interop.Settings.SystemSettingsChangedCallback s_usbDebuggingSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1434 bool usbDebuggingEnabled = SystemSettings.UsbDebuggingEnabled;
1435 UsbDebuggingSettingChangedEventArgs eventArgs = new UsbDebuggingSettingChangedEventArgs(usbDebuggingEnabled);
1436 s_usbDebuggingSettingChanged?.Invoke(null, eventArgs);
1438 private static event EventHandler<UsbDebuggingSettingChangedEventArgs> s_usbDebuggingSettingChanged;
1440 /// The UsbDebuggingSettingChangedEventArgs event is triggered when the USB debugging status is changed.
1442 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1443 /// <privlevel>platform</privlevel>
1444 /// <feature>http://tizen.org/feature/systemsetting</feature>
1445 /// <exception cref="ArgumentException">Invalid Argument</exception>
1446 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1447 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1448 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1449 /// <since_tizen> 3 </since_tizen>
1450 public static event EventHandler<UsbDebuggingSettingChangedEventArgs> UsbDebuggingSettingChanged
1454 if (s_usbDebuggingSettingChanged == null)
1456 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UsbDebuggingEnabled, s_usbDebuggingSettingChangedCallback, IntPtr.Zero);
1457 if (ret != SystemSettingsError.None)
1459 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1462 s_usbDebuggingSettingChanged += value;
1467 if (s_usbDebuggingSettingChanged == null) {
1468 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1471 s_usbDebuggingSettingChanged -= value;
1472 if (s_usbDebuggingSettingChanged == null)
1474 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UsbDebuggingEnabled, s_usbDebuggingSettingChangedCallback);
1475 if (ret != SystemSettingsError.None)
1477 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1483 private static readonly Interop.Settings.SystemSettingsChangedCallback s_data3GNetworkSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1485 bool data3GEnabled = SystemSettings.Data3GNetworkEnabled;
1486 Data3GNetworkSettingChangedEventArgs eventArgs = new Data3GNetworkSettingChangedEventArgs(data3GEnabled);
1487 s_data3GNetworkSettingChanged?.Invoke(null, eventArgs);
1489 private static event EventHandler<Data3GNetworkSettingChangedEventArgs> s_data3GNetworkSettingChanged;
1491 /// The Data3GNetworkSettingChanged event is triggered when the 3G data network status is changed.
1493 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1494 /// <privlevel>platform</privlevel>
1495 /// <feature>http://tizen.org/feature/systemsetting</feature>
1496 /// <exception cref="ArgumentException">Invalid Argument</exception>
1497 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1498 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1499 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1500 /// <since_tizen> 3 </since_tizen>
1501 public static event EventHandler<Data3GNetworkSettingChangedEventArgs> Data3GNetworkSettingChanged
1505 if (s_data3GNetworkSettingChanged == null)
1507 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Data3GNetworkEnabled, s_data3GNetworkSettingChangedCallback, IntPtr.Zero);
1508 if (ret != SystemSettingsError.None)
1510 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1513 s_data3GNetworkSettingChanged += value;
1518 if (s_data3GNetworkSettingChanged == null) {
1519 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1522 s_data3GNetworkSettingChanged -= value;
1523 if (s_data3GNetworkSettingChanged == null)
1525 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Data3GNetworkEnabled, s_data3GNetworkSettingChangedCallback);
1526 if (ret != SystemSettingsError.None)
1528 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1534 private static readonly Interop.Settings.SystemSettingsChangedCallback s_lockscreenAppChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1536 string lockScreenApp = SystemSettings.LockScreenApp;
1537 LockScreenAppChangedEventArgs eventArgs = new LockScreenAppChangedEventArgs(lockScreenApp);
1538 s_lockscreenAppChanged?.Invoke(null, eventArgs);
1540 private static event EventHandler<LockScreenAppChangedEventArgs> s_lockscreenAppChanged;
1542 /// The LockScreenAppChanged event is triggered when the lockscreen application package name is changed.
1544 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1545 /// <privlevel>platform</privlevel>
1546 /// <feature>http://tizen.org/feature/systemsetting</feature>
1547 /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
1548 /// <exception cref="ArgumentException">Invalid Argument</exception>
1549 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1550 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1551 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1552 /// <since_tizen> 4 </since_tizen>
1553 public static event EventHandler<LockScreenAppChangedEventArgs> LockScreenAppChanged
1557 if (s_lockscreenAppChanged == null)
1559 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LockScreenApp, s_lockscreenAppChangedCallback, IntPtr.Zero);
1560 if (ret != SystemSettingsError.None)
1562 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1565 s_lockscreenAppChanged += value;
1570 if (s_lockscreenAppChanged == null) {
1571 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1575 s_lockscreenAppChanged -= value;
1576 if (s_lockscreenAppChanged == null)
1578 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LockScreenApp, s_lockscreenAppChangedCallback);
1579 if (ret != SystemSettingsError.None)
1581 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1587 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeCountryChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1589 string localeCountry = SystemSettings.LocaleCountry;
1590 LocaleCountryChangedEventArgs eventArgs = new LocaleCountryChangedEventArgs(localeCountry);
1591 s_localeCountryChanged?.Invoke(null, eventArgs);
1593 private static event EventHandler<LocaleCountryChangedEventArgs> s_localeCountryChanged;
1595 /// The LocaleCountryChanged event is triggered when the current country setting in the <LANGUAGE>_<REGION> syntax, is changed.
1597 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1598 /// <privlevel>platform</privlevel>
1599 /// <feature>http://tizen.org/feature/systemsetting</feature>
1600 /// <exception cref="ArgumentException">Invalid Argument</exception>
1601 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1602 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1603 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1604 /// <since_tizen> 3 </since_tizen>
1605 public static event EventHandler<LocaleCountryChangedEventArgs> LocaleCountryChanged
1609 if (s_localeCountryChanged == null)
1611 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleCountry, s_localeCountryChangedCallback, IntPtr.Zero);
1612 if (ret != SystemSettingsError.None)
1614 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1617 s_localeCountryChanged += value;
1622 if (s_localeCountryChanged == null) {
1623 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1626 s_localeCountryChanged -= value;
1627 if (s_localeCountryChanged == null)
1629 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleCountry, s_localeCountryChangedCallback);
1630 if (ret != SystemSettingsError.None)
1632 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1638 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeLanguageChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1640 string localeLanguage = SystemSettings.LocaleLanguage;
1641 LocaleLanguageChangedEventArgs eventArgs = new LocaleLanguageChangedEventArgs(localeLanguage);
1642 s_localeLanguageChanged?.Invoke(null, eventArgs);
1644 private static event EventHandler<LocaleLanguageChangedEventArgs> s_localeLanguageChanged;
1646 /// The LocaleLanguageChanged event is triggered when the current language setting in the <LANGUAGE>_<REGION> syntax, is changed.
1648 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1649 /// <privlevel>platform</privlevel>
1650 /// <feature>http://tizen.org/feature/systemsetting</feature>
1651 /// <exception cref="ArgumentException">Invalid Argument</exception>
1652 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1653 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1654 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1655 /// <since_tizen> 3 </since_tizen>
1656 public static event EventHandler<LocaleLanguageChangedEventArgs> LocaleLanguageChanged
1660 if (s_localeLanguageChanged == null)
1662 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleLanguage, s_localeLanguageChangedCallback, IntPtr.Zero);
1663 if (ret != SystemSettingsError.None)
1665 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1668 s_localeLanguageChanged += value;
1673 if (s_localeLanguageChanged == null) {
1674 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1677 s_localeLanguageChanged -= value;
1678 if (s_localeLanguageChanged == null)
1680 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleLanguage, s_localeLanguageChangedCallback);
1681 if (ret != SystemSettingsError.None)
1683 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1689 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeTimeFormat24HourChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1691 bool localeTimeFormat24Hour = SystemSettings.LocaleTimeFormat24HourEnabled;
1692 LocaleTimeFormat24HourSettingChangedEventArgs eventArgs = new LocaleTimeFormat24HourSettingChangedEventArgs(localeTimeFormat24Hour);
1693 s_localeTimeFormat24HourChanged?.Invoke(null, eventArgs);
1695 private static event EventHandler<LocaleTimeFormat24HourSettingChangedEventArgs> s_localeTimeFormat24HourChanged;
1697 /// The LocaleTimeFormat24HourChanged event is triggered when the time format is changed.
1699 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1700 /// <privlevel>platform</privlevel>
1701 /// <feature>http://tizen.org/feature/systemsetting</feature>
1702 /// <exception cref="ArgumentException">Invalid Argument</exception>
1703 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1704 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1705 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1706 /// <since_tizen> 3 </since_tizen>
1707 public static event EventHandler<LocaleTimeFormat24HourSettingChangedEventArgs> LocaleTimeFormat24HourSettingChanged
1711 if (s_localeTimeFormat24HourChanged == null)
1713 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, s_localeTimeFormat24HourChangedCallback, IntPtr.Zero);
1714 if (ret != SystemSettingsError.None)
1716 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1719 s_localeTimeFormat24HourChanged += value;
1724 if (s_localeTimeFormat24HourChanged == null) {
1725 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1728 s_localeTimeFormat24HourChanged -= value;
1729 if (s_localeTimeFormat24HourChanged == null)
1731 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, s_localeTimeFormat24HourChangedCallback);
1732 if (ret != SystemSettingsError.None)
1734 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1740 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeTimeZoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1742 string localeTimeZone = SystemSettings.LocaleTimeZone;
1743 LocaleTimeZoneChangedEventArgs eventArgs = new LocaleTimeZoneChangedEventArgs(localeTimeZone);
1744 s_localeTimeZoneChanged?.Invoke(null, eventArgs);
1746 private static event EventHandler<LocaleTimeZoneChangedEventArgs> s_localeTimeZoneChanged;
1748 /// The LocaleTimeZoneChanged event is triggered when the current time zone is changed.
1750 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1751 /// <privlevel>platform</privlevel>
1752 /// <feature>http://tizen.org/feature/systemsetting</feature>
1753 /// <exception cref="ArgumentException">Invalid Argument</exception>
1754 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1755 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1756 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1757 /// <since_tizen> 3 </since_tizen>
1758 public static event EventHandler<LocaleTimeZoneChangedEventArgs> LocaleTimeZoneChanged
1762 if (s_localeTimeZoneChanged == null)
1764 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleTimeZone, s_localeTimeZoneChangedCallback, IntPtr.Zero);
1765 if (ret != SystemSettingsError.None)
1767 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1770 s_localeTimeZoneChanged += value;
1775 if (s_localeTimeZoneChanged == null) {
1776 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1779 s_localeTimeZoneChanged -= value;
1780 if (s_localeTimeZoneChanged == null)
1782 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleTimeZone, s_localeTimeZoneChangedCallback);
1783 if (ret != SystemSettingsError.None)
1785 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1791 private static readonly Interop.Settings.SystemSettingsChangedCallback s_timeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1794 int time = SystemSettings.Time;
1795 TimeChangedEventArgs eventArgs = new TimeChangedEventArgs(time);
1796 s_timeChanged?.Invoke(null, eventArgs);
1798 private static event EventHandler<TimeChangedEventArgs> s_timeChanged;
1800 /// The TimeChanged event is triggered when the system time is changed.
1802 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1803 /// <privlevel>platform</privlevel>
1804 /// <feature>http://tizen.org/feature/systemsetting</feature>
1805 /// <exception cref="ArgumentException">Invalid Argument</exception>
1806 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1807 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1808 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1809 /// <since_tizen> 3 </since_tizen>
1810 public static event EventHandler<TimeChangedEventArgs> TimeChanged
1814 if (s_timeChanged == null)
1816 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Time, s_timeChangedCallback, IntPtr.Zero);
1817 if (ret != SystemSettingsError.None)
1819 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1822 s_timeChanged += value;
1827 if (s_timeChanged == null) {
1828 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1831 s_timeChanged -= value;
1832 if (s_timeChanged == null)
1834 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Time, s_timeChangedCallback);
1835 if (ret != SystemSettingsError.None)
1837 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1843 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundLockChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1845 bool soundLock = SystemSettings.SoundLockEnabled;
1846 SoundLockSettingChangedEventArgs eventArgs = new SoundLockSettingChangedEventArgs(soundLock);
1847 s_soundLockChanged?.Invoke(null, eventArgs);
1849 private static event EventHandler<SoundLockSettingChangedEventArgs> s_soundLockChanged;
1851 /// The SoundLockChanged event is triggered when the screen lock sound enabled status is changed.
1853 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1854 /// <privlevel>platform</privlevel>
1855 /// <feature>http://tizen.org/feature/systemsetting</feature>
1856 /// <exception cref="ArgumentException">Invalid Argument</exception>
1857 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1858 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1859 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1860 /// <since_tizen> 3 </since_tizen>
1861 public static event EventHandler<SoundLockSettingChangedEventArgs> SoundLockSettingChanged
1865 if (s_soundLockChanged == null)
1867 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundLockEnabled, s_soundLockChangedCallback, IntPtr.Zero);
1868 if (ret != SystemSettingsError.None)
1870 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1873 s_soundLockChanged += value;
1878 if (s_soundLockChanged == null) {
1879 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1882 s_soundLockChanged -= value;
1883 if (s_soundLockChanged == null)
1885 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundLockEnabled, s_soundLockChangedCallback);
1886 if (ret != SystemSettingsError.None)
1888 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1894 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundSilentModeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1896 bool soundSilentMode = SystemSettings.SoundSilentModeEnabled;
1897 SoundSilentModeSettingChangedEventArgs eventArgs = new SoundSilentModeSettingChangedEventArgs(soundSilentMode);
1898 s_soundSilentModeChanged?.Invoke(null, eventArgs);
1900 private static event EventHandler<SoundSilentModeSettingChangedEventArgs> s_soundSilentModeChanged;
1902 /// The SoundSilentModeChanged event is triggered when the silent mode status is changed.
1904 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1905 /// <privlevel>platform</privlevel>
1906 /// <feature>http://tizen.org/feature/systemsetting</feature>
1907 /// <exception cref="ArgumentException">Invalid Argument</exception>
1908 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1909 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1910 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1911 /// <since_tizen> 3 </since_tizen>
1912 public static event EventHandler<SoundSilentModeSettingChangedEventArgs> SoundSilentModeSettingChanged
1916 if (s_soundSilentModeChanged == null)
1918 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundSilentModeEnabled, s_soundSilentModeChangedCallback, IntPtr.Zero);
1919 if (ret != SystemSettingsError.None)
1921 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1924 s_soundSilentModeChanged += value;
1929 if (s_soundSilentModeChanged == null) {
1930 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1933 s_soundSilentModeChanged -= value;
1934 if (s_soundSilentModeChanged == null)
1936 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundSilentModeEnabled, s_soundSilentModeChangedCallback);
1937 if (ret != SystemSettingsError.None)
1939 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1945 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundTouchChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1947 bool soundTouch = SystemSettings.SoundTouchEnabled;
1948 SoundTouchSettingChangedEventArgs eventArgs = new SoundTouchSettingChangedEventArgs(soundTouch);
1949 s_soundTouchChanged?.Invoke(null, eventArgs);
1951 private static event EventHandler<SoundTouchSettingChangedEventArgs> s_soundTouchChanged;
1953 /// THe SoundTouchChanged event is triggered when the screen touch sound enabled status is changed.
1955 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1956 /// <privlevel>platform</privlevel>
1957 /// <feature>http://tizen.org/feature/systemsetting</feature>
1958 /// <exception cref="ArgumentException">Invalid Argument</exception>
1959 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1960 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1961 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1962 /// <since_tizen> 3 </since_tizen>
1963 public static event EventHandler<SoundTouchSettingChangedEventArgs> SoundTouchSettingChanged
1967 if (s_soundTouchChanged == null)
1969 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundTouchEnabled, s_soundTouchChangedCallback, IntPtr.Zero);
1970 if (ret != SystemSettingsError.None)
1972 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1975 s_soundTouchChanged += value;
1980 if (s_soundTouchChanged == null) {
1981 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1984 s_soundTouchChanged -= value;
1985 if (s_soundTouchChanged == null)
1988 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundTouchEnabled, s_soundTouchChangedCallback);
1989 if (ret != SystemSettingsError.None)
1991 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1997 private static readonly Interop.Settings.SystemSettingsChangedCallback s_displayScreenRotationAutoChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1999 bool displayScreenRotationAuto = SystemSettings.DisplayScreenRotationAutoEnabled;
2000 DisplayScreenRotationAutoSettingChangedEventArgs eventArgs = new DisplayScreenRotationAutoSettingChangedEventArgs(displayScreenRotationAuto);
2001 s_displayScreenRotationAutoChanged?.Invoke(null, eventArgs);
2003 private static event EventHandler<DisplayScreenRotationAutoSettingChangedEventArgs> s_displayScreenRotationAutoChanged;
2005 /// The DisplayScreenRotationAutoChanged event is triggered when the automatic rotation control status is changed.
2007 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2008 /// <privlevel>platform</privlevel>
2009 /// <feature>http://tizen.org/feature/systemsetting</feature>
2010 /// <exception cref="ArgumentException">Invalid Argument</exception>
2011 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2012 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2013 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2014 /// <since_tizen> 3 </since_tizen>
2015 public static event EventHandler<DisplayScreenRotationAutoSettingChangedEventArgs> DisplayScreenRotationAutoSettingChanged
2019 if (s_displayScreenRotationAutoChanged == null)
2021 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, s_displayScreenRotationAutoChangedCallback, IntPtr.Zero);
2022 if (ret != SystemSettingsError.None)
2024 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2027 s_displayScreenRotationAutoChanged += value;
2032 if (s_displayScreenRotationAutoChanged == null) {
2033 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2036 s_displayScreenRotationAutoChanged -= value;
2037 if (s_displayScreenRotationAutoChanged == null)
2039 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, s_displayScreenRotationAutoChangedCallback);
2040 if (ret != SystemSettingsError.None)
2042 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2048 private static readonly Interop.Settings.SystemSettingsChangedCallback s_deviceNameChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2050 string deviceName = SystemSettings.DeviceName;
2051 DeviceNameChangedEventArgs eventArgs = new DeviceNameChangedEventArgs(deviceName);
2052 s_deviceNameChanged?.Invoke(null, eventArgs);
2054 private static event EventHandler<DeviceNameChangedEventArgs> s_deviceNameChanged;
2056 /// The DeviceNameChanged event is triggered when the device name is changed.
2058 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2059 /// <privlevel>platform</privlevel>
2060 /// <feature>http://tizen.org/feature/systemsetting</feature>
2061 /// <exception cref="ArgumentException">Invalid Argument</exception>
2062 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2063 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2064 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2065 /// <since_tizen> 3 </since_tizen>
2066 public static event EventHandler<DeviceNameChangedEventArgs> DeviceNameChanged
2070 if (s_deviceNameChanged == null)
2072 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DeviceName, s_deviceNameChangedCallback, IntPtr.Zero);
2073 if (ret != SystemSettingsError.None)
2075 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2078 s_deviceNameChanged += value;
2083 if (s_deviceNameChanged == null) {
2084 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2087 s_deviceNameChanged -= value;
2088 if (s_deviceNameChanged == null)
2090 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DeviceName, s_deviceNameChangedCallback);
2091 if (ret != SystemSettingsError.None)
2093 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2099 private static readonly Interop.Settings.SystemSettingsChangedCallback s_motionSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2101 bool motionEnabled = SystemSettings.MotionEnabled;
2102 MotionSettingChangedEventArgs eventArgs = new MotionSettingChangedEventArgs(motionEnabled);
2103 s_motionSettingChanged?.Invoke(null, eventArgs);
2105 private static event EventHandler<MotionSettingChangedEventArgs> s_motionSettingChanged;
2107 /// The MotionSettingChanged event is triggered when the motion feature enabled status is changed.
2109 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2110 /// <privlevel>platform</privlevel>
2111 /// <feature>http://tizen.org/feature/systemsetting</feature>
2112 /// <exception cref="ArgumentException">Invalid Argument</exception>
2113 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2114 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2115 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2116 /// <since_tizen> 3 </since_tizen>
2117 public static event EventHandler<MotionSettingChangedEventArgs> MotionSettingChanged
2121 if (s_motionSettingChanged == null)
2123 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.MotionEnabled, s_motionSettingChangedCallback, IntPtr.Zero);
2124 if (ret != SystemSettingsError.None)
2126 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2129 s_motionSettingChanged += value;
2134 if (s_motionSettingChanged == null) {
2135 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2138 s_motionSettingChanged -= value;
2139 if (s_motionSettingChanged == null)
2141 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.MotionEnabled, s_motionSettingChangedCallback);
2142 if (ret != SystemSettingsError.None)
2144 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2150 private static readonly Interop.Settings.SystemSettingsChangedCallback s_networkWifiNotificationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2152 bool networkWifiNotification = SystemSettings.NetworkWifiNotificationEnabled;
2153 NetworkWifiNotificationSettingChangedEventArgs eventArgs = new NetworkWifiNotificationSettingChangedEventArgs(networkWifiNotification);
2154 s_networkWifiNotificationChanged?.Invoke(null, eventArgs);
2156 private static event EventHandler<NetworkWifiNotificationSettingChangedEventArgs> s_networkWifiNotificationChanged;
2158 /// The NetworkWifiNotificationChanged event is triggered when the WiFi-related notifications enabled status is changed.
2160 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2161 /// <privlevel>platform</privlevel>
2162 /// <feature>http://tizen.org/feature/systemsetting</feature>
2163 /// <feature>http://tizen.org/feature/network.wifi</feature>
2164 /// <exception cref="ArgumentException">Invalid Argument</exception>
2165 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2166 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2167 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2168 /// <since_tizen> 3 </since_tizen>
2169 public static event EventHandler<NetworkWifiNotificationSettingChangedEventArgs> NetworkWifiNotificationSettingChanged
2173 if (s_networkWifiNotificationChanged == null)
2175 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.NetworkWifiNotificationEnabled, s_networkWifiNotificationChangedCallback, IntPtr.Zero);
2176 if (ret != SystemSettingsError.None)
2178 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2181 s_networkWifiNotificationChanged += value;
2186 if (s_networkWifiNotificationChanged == null) {
2187 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2190 s_networkWifiNotificationChanged -= value;
2191 if (s_networkWifiNotificationChanged == null)
2193 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.NetworkWifiNotificationEnabled, s_networkWifiNotificationChangedCallback);
2194 if (ret != SystemSettingsError.None)
2196 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2202 private static readonly Interop.Settings.SystemSettingsChangedCallback s_networkFlightModeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2204 bool networkFlightMode = SystemSettings.NetworkFlightModeEnabled;
2205 NetworkFlightModeSettingChangedEventArgs eventArgs = new NetworkFlightModeSettingChangedEventArgs(networkFlightMode);
2206 s_networkFlightModeChanged?.Invoke(null, eventArgs);
2208 private static event EventHandler<NetworkFlightModeSettingChangedEventArgs> s_networkFlightModeChanged;
2210 /// The NetworkFlightModeChanged event is triggered when the flight mode status is changed.
2212 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2213 /// <privlevel>platform</privlevel>
2214 /// <feature>http://tizen.org/feature/systemsetting</feature>
2215 /// <exception cref="ArgumentException">Invalid Argument</exception>
2216 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2217 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2218 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2219 /// <since_tizen> 3 </since_tizen>
2220 public static event EventHandler<NetworkFlightModeSettingChangedEventArgs> NetworkFlightModeSettingChanged
2224 if (s_networkFlightModeChanged == null)
2226 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.NetworkFlightModeEnabled, s_networkFlightModeChangedCallback, IntPtr.Zero);
2227 if (ret != SystemSettingsError.None)
2229 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2232 s_networkFlightModeChanged += value;
2237 if (s_networkFlightModeChanged == null) {
2238 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2241 s_networkFlightModeChanged -= value;
2242 if (s_networkFlightModeChanged == null)
2244 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.NetworkFlightModeEnabled, s_networkFlightModeChangedCallback);
2245 if (ret != SystemSettingsError.None)
2247 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2253 private static readonly Interop.Settings.SystemSettingsChangedCallback s_screenBacklightTimeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2255 int screenBacklightTime = SystemSettings.ScreenBacklightTime;
2256 ScreenBacklightTimeChangedEventArgs eventArgs = new ScreenBacklightTimeChangedEventArgs(screenBacklightTime);
2257 s_screenBacklightTimeChanged?.Invoke(null, eventArgs);
2259 private static event EventHandler<ScreenBacklightTimeChangedEventArgs> s_screenBacklightTimeChanged;
2261 /// THe ScreenBacklightTimeChanged event is triggered when the backlight time is changed.
2263 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2264 /// <privlevel>platform</privlevel>
2265 /// <feature>http://tizen.org/feature/systemsetting</feature>
2266 /// <exception cref="ArgumentException">Invalid Argument</exception>
2267 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2268 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2269 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2270 /// <since_tizen> 3 </since_tizen>
2271 public static event EventHandler<ScreenBacklightTimeChangedEventArgs> ScreenBacklightTimeChanged
2275 if (s_screenBacklightTimeChanged == null)
2277 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.ScreenBacklightTime, s_screenBacklightTimeChangedCallback, IntPtr.Zero);
2278 if (ret != SystemSettingsError.None)
2280 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2283 s_screenBacklightTimeChanged += value;
2288 if (s_screenBacklightTimeChanged == null) {
2289 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2292 s_screenBacklightTimeChanged -= value;
2293 if (s_screenBacklightTimeChanged == null)
2295 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.ScreenBacklightTime, s_screenBacklightTimeChangedCallback);
2296 if (ret != SystemSettingsError.None)
2298 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2304 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundNotificationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2306 string soundNotification = SystemSettings.SoundNotification;
2307 SoundNotificationChangedEventArgs eventArgs = new SoundNotificationChangedEventArgs(soundNotification);
2308 s_soundNotificationChanged?.Invoke(null, eventArgs);
2310 private static event EventHandler<SoundNotificationChangedEventArgs> s_soundNotificationChanged;
2312 /// The SoundNotificationChanged event is triggered when the file path of the current notification tone set by the user is changed.
2314 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2315 /// <privlevel>platform</privlevel>
2316 /// <feature>http://tizen.org/feature/systemsetting</feature>
2317 /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
2318 /// <exception cref="ArgumentException">Invalid Argument</exception>
2319 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2320 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2321 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2322 /// <since_tizen> 3 </since_tizen>
2323 public static event EventHandler<SoundNotificationChangedEventArgs> SoundNotificationChanged
2327 if (s_soundNotificationChanged == null)
2329 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundNotification, s_soundNotificationChangedCallback, IntPtr.Zero);
2330 if (ret != SystemSettingsError.None)
2332 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2335 s_soundNotificationChanged += value;
2340 if (s_soundNotificationChanged == null) {
2341 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2344 s_soundNotificationChanged -= value;
2345 if (s_soundNotificationChanged == null)
2347 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundNotification, s_soundNotificationChangedCallback);
2348 if (ret != SystemSettingsError.None)
2350 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2356 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundNotificationRepetitionPeriodChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2358 int soundNotificationRepetitionPeriod = SystemSettings.SoundNotificationRepetitionPeriod;
2359 SoundNotificationRepetitionPeriodChangedEventArgs eventArgs = new SoundNotificationRepetitionPeriodChangedEventArgs(soundNotificationRepetitionPeriod);
2360 s_soundNotificationRepetitionPeriodChanged?.Invoke(null, eventArgs);
2362 private static event EventHandler<SoundNotificationRepetitionPeriodChangedEventArgs> s_soundNotificationRepetitionPeriodChanged;
2364 /// The SoundNotificationRepetitionPeriodChanged event is triggered when the time period for notification repetitions is changed.
2366 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2367 /// <privlevel>platform</privlevel>
2368 /// <feature>http://tizen.org/feature/systemsetting</feature>
2369 /// <exception cref="ArgumentException">Invalid Argument</exception>
2370 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2371 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2372 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2373 /// <since_tizen> 3 </since_tizen>
2374 public static event EventHandler<SoundNotificationRepetitionPeriodChangedEventArgs> SoundNotificationRepetitionPeriodChanged
2378 if (s_soundNotificationRepetitionPeriodChanged == null)
2380 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundNotificationRepetitionPeriod, s_soundNotificationRepetitionPeriodChangedCallback, IntPtr.Zero);
2381 if (ret != SystemSettingsError.None)
2383 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2386 s_soundNotificationRepetitionPeriodChanged += value;
2391 if (s_soundNotificationRepetitionPeriodChanged == null) {
2392 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2395 s_soundNotificationRepetitionPeriodChanged -= value;
2396 if (s_soundNotificationRepetitionPeriodChanged == null)
2398 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundNotificationRepetitionPeriod, s_soundNotificationRepetitionPeriodChangedCallback);
2399 if (ret != SystemSettingsError.None)
2401 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2407 private static readonly Interop.Settings.SystemSettingsChangedCallback s_lockStateChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2409 SystemSettingsIdleLockState lockState = SystemSettings.LockState;
2410 LockStateChangedEventArgs eventArgs = new LockStateChangedEventArgs(lockState);
2411 s_lockStateChanged?.Invoke(null, eventArgs);
2413 private static event EventHandler<LockStateChangedEventArgs> s_lockStateChanged;
2415 /// The LockStateChanged event is triggered when the current lock state is changed.
2417 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2418 /// <privlevel>platform</privlevel>
2419 /// <feature>http://tizen.org/feature/systemsetting</feature>
2420 /// <exception cref="ArgumentException">Invalid Argument</exception>
2421 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2422 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2423 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2424 /// <since_tizen> 3 </since_tizen>
2425 public static event EventHandler<LockStateChangedEventArgs> LockStateChanged
2429 if (s_lockStateChanged == null)
2431 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LockState, s_lockStateChangedCallback, IntPtr.Zero);
2432 if (ret != SystemSettingsError.None)
2434 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2437 s_lockStateChanged += value;
2442 if (s_lockStateChanged == null) {
2443 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2446 s_lockStateChanged -= value;
2447 if (s_lockStateChanged == null)
2449 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LockState, s_lockStateChangedCallback);
2450 if (ret != SystemSettingsError.None)
2452 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2458 private static readonly Interop.Settings.SystemSettingsChangedCallback s_adsIdChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2460 string adsId = SystemSettings.AdsId;
2461 AdsIdChangedEventArgs eventArgs = new AdsIdChangedEventArgs(adsId);
2462 s_adsIdChanged?.Invoke(null, eventArgs);
2464 private static event EventHandler<AdsIdChangedEventArgs> s_adsIdChanged;
2466 /// The AdsIdChanged event is triggered when the current ADS ID state is changed.
2468 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2469 /// <privlevel>platform</privlevel>
2470 /// <feature>http://tizen.org/feature/systemsetting</feature>
2471 /// <exception cref="ArgumentException">Invalid Argument</exception>
2472 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2473 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2474 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2475 /// <since_tizen> 3 </since_tizen>
2476 public static event EventHandler<AdsIdChangedEventArgs> AdsIdChanged
2480 if (s_adsIdChanged == null)
2482 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AdsId, s_adsIdChangedCallback, IntPtr.Zero);
2483 if (ret != SystemSettingsError.None)
2485 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2488 s_adsIdChanged += value;
2493 if (s_adsIdChanged == null) {
2494 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2497 s_adsIdChanged -= value;
2498 if (s_adsIdChanged == null)
2500 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AdsId, s_adsIdChangedCallback);
2501 if (ret != SystemSettingsError.None)
2503 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2509 private static readonly Interop.Settings.SystemSettingsChangedCallback s_ultraDataSaveChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2511 SystemSettingsUdsState ultraDataSave = SystemSettings.UltraDataSave;
2512 UltraDataSaveChangedEventArgs eventArgs = new UltraDataSaveChangedEventArgs(ultraDataSave);
2513 s_ultraDataSaveChanged?.Invoke(null, eventArgs);
2515 private static event EventHandler<UltraDataSaveChangedEventArgs> s_ultraDataSaveChanged;
2517 /// The UltraDataSaveChanged event is triggered when the current Ultra Data Save state is changed.
2519 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2520 /// <privlevel>platform</privlevel>
2521 /// <feature>http://tizen.org/feature/systemsetting</feature>
2522 /// <feature>http://tizen.org/feature/network.telephony</feature>
2523 /// <exception cref="ArgumentException">Invalid Argument</exception>
2524 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2525 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2526 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2527 /// <since_tizen> 3 </since_tizen>
2528 public static event EventHandler<UltraDataSaveChangedEventArgs> UltraDataSaveChanged
2532 if (s_ultraDataSaveChanged == null)
2534 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UltraDataSave, s_ultraDataSaveChangedCallback, IntPtr.Zero);
2535 if (ret != SystemSettingsError.None)
2537 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2540 s_ultraDataSaveChanged += value;
2545 if (s_ultraDataSaveChanged == null) {
2546 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2549 s_ultraDataSaveChanged -= value;
2550 if (s_ultraDataSaveChanged == null)
2552 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UltraDataSave, s_ultraDataSaveChangedCallback);
2553 if (ret != SystemSettingsError.None)
2555 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2561 private static readonly Interop.Settings.SystemSettingsChangedCallback s_ultraDataSavePackageListChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2563 string ultraDataSavePackageList = "None";
2564 UltraDataSavePackageListChangedEventArgs eventArgs = new UltraDataSavePackageListChangedEventArgs(ultraDataSavePackageList);
2565 s_ultraDataSavePackageListChanged?.Invoke(null, eventArgs);
2567 private static event EventHandler<UltraDataSavePackageListChangedEventArgs> s_ultraDataSavePackageListChanged;
2569 /// The UltraDataSavePackageListChanged event is triggered when the current ADS ID state is changed.
2571 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2572 /// <privlevel>platform</privlevel>
2573 /// <feature>http://tizen.org/feature/systemsetting</feature>
2574 /// <feature>http://tizen.org/feature/network.telephony</feature>
2575 /// <exception cref="ArgumentException">Invalid Argument</exception>
2576 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2577 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2578 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2579 /// <since_tizen> 3 </since_tizen>
2580 public static event EventHandler<UltraDataSavePackageListChangedEventArgs> UltraDataSavePackageListChanged
2584 if (s_ultraDataSavePackageListChanged == null)
2586 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UltraDataSavePackageList, s_ultraDataSavePackageListChangedCallback, IntPtr.Zero);
2587 if (ret != SystemSettingsError.None)
2589 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2592 s_ultraDataSavePackageListChanged += value;
2597 if (s_ultraDataSavePackageListChanged == null) {
2598 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2601 s_ultraDataSavePackageListChanged -= value;
2602 if (s_ultraDataSavePackageListChanged == null)
2604 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UltraDataSavePackageList, s_ultraDataSavePackageListChangedCallback);
2605 if (ret != SystemSettingsError.None)
2607 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2613 private static readonly Interop.Settings.SystemSettingsChangedCallback s_accessibilityTtsChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2615 bool accessibilityTts = SystemSettings.AccessibilityTtsEnabled;
2616 AccessibilityTtsSettingChangedEventArgs eventArgs = new AccessibilityTtsSettingChangedEventArgs(accessibilityTts);
2617 s_accessibilityTtsChanged?.Invoke(null, eventArgs);
2619 private static event EventHandler<AccessibilityTtsSettingChangedEventArgs> s_accessibilityTtsChanged;
2621 /// THe AccessibilityTtsChanged event is triggered when the screen touch sound enabled status is changed.
2623 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2624 /// <privlevel>platform</privlevel>
2625 /// <feature>http://tizen.org/feature/systemsetting</feature>
2626 /// <exception cref="ArgumentException">Invalid Argument</exception>
2627 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2628 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2629 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2630 /// <since_tizen> 4 </since_tizen>
2631 public static event EventHandler<AccessibilityTtsSettingChangedEventArgs> AccessibilityTtsSettingChanged
2635 if (s_accessibilityTtsChanged == null)
2637 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AccessibilityTtsEnabled, s_accessibilityTtsChangedCallback, IntPtr.Zero);
2638 if (ret != SystemSettingsError.None)
2640 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2643 s_accessibilityTtsChanged += value;
2648 if (s_accessibilityTtsChanged == null) {
2649 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2652 s_accessibilityTtsChanged -= value;
2653 if (s_accessibilityTtsChanged == null)
2656 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AccessibilityTtsEnabled, s_accessibilityTtsChangedCallback);
2657 if (ret != SystemSettingsError.None)
2659 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2665 private static readonly Interop.Settings.SystemSettingsChangedCallback s_vibrationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2667 bool vibration = SystemSettings.Vibration;
2668 VibrationChangedEventArgs eventArgs = new VibrationChangedEventArgs(vibration);
2669 s_vibrationChanged?.Invoke(null, eventArgs);
2671 private static event EventHandler<VibrationChangedEventArgs> s_vibrationChanged;
2673 /// The VibrationChanged event is triggered when the vibration value is changed.
2675 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2676 /// <privlevel>platform</privlevel>
2677 /// <feature>http://tizen.org/feature/systemsetting</feature>
2678 /// <exception cref="ArgumentException">Invalid Argument</exception>
2679 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2680 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2681 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2682 /// <since_tizen> 5 </since_tizen>
2683 public static event EventHandler<VibrationChangedEventArgs> VibrationChanged
2687 if (s_vibrationChanged == null)
2689 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Vibration, s_vibrationChangedCallback, IntPtr.Zero);
2690 if (ret != SystemSettingsError.None)
2692 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2695 s_vibrationChanged += value;
2700 s_vibrationChanged -= value;
2701 if (s_vibrationChanged == null)
2703 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Vibration, s_vibrationChangedCallback);
2704 if (ret != SystemSettingsError.None)
2706 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2712 private static readonly Interop.Settings.SystemSettingsChangedCallback s_automaticTimeUpdateChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2714 bool automaticTimeUpdate = SystemSettings.AutomaticTimeUpdate;
2715 AutomaticTimeUpdateChangedEventArgs eventArgs = new AutomaticTimeUpdateChangedEventArgs(automaticTimeUpdate);
2716 s_automaticTimeUpdateChanged?.Invoke(null, eventArgs);
2718 private static event EventHandler<AutomaticTimeUpdateChangedEventArgs> s_automaticTimeUpdateChanged;
2720 /// The AutomaticTimeUpdateChanged event is triggered when the automaticTimeUpdate value is changed.
2722 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2723 /// <privlevel>platform</privlevel>
2724 /// <feature>http://tizen.org/feature/systemsetting</feature>
2725 /// <exception cref="ArgumentException">Invalid Argument</exception>
2726 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2727 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2728 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2729 /// <since_tizen> 5 </since_tizen>
2730 public static event EventHandler<AutomaticTimeUpdateChangedEventArgs> AutomaticTimeUpdateChanged
2734 if (s_automaticTimeUpdateChanged == null)
2736 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AutomaticTimeUpdate, s_automaticTimeUpdateChangedCallback, IntPtr.Zero);
2737 if (ret != SystemSettingsError.None)
2739 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2742 s_automaticTimeUpdateChanged += value;
2747 s_automaticTimeUpdateChanged -= value;
2748 if (s_automaticTimeUpdateChanged == null)
2750 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AutomaticTimeUpdate, s_automaticTimeUpdateChangedCallback);
2751 if (ret != SystemSettingsError.None)
2753 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2759 private static readonly Interop.Settings.SystemSettingsChangedCallback s_developerOptionStateChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2761 bool developerOptionState = SystemSettings.DeveloperOptionState;
2762 DeveloperOptionStateChangedEventArgs eventArgs = new DeveloperOptionStateChangedEventArgs(developerOptionState);
2763 s_developerOptionStateChanged?.Invoke(null, eventArgs);
2765 private static event EventHandler<DeveloperOptionStateChangedEventArgs> s_developerOptionStateChanged;
2767 /// The DeveloperOptionStateChanged event is triggered when the developerOptionState value is changed.
2769 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2770 /// <privlevel>platform</privlevel>
2771 /// <feature>http://tizen.org/feature/systemsetting</feature>
2772 /// <exception cref="ArgumentException">Invalid Argument</exception>
2773 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2774 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2775 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2776 /// <since_tizen> 5 </since_tizen>
2777 public static event EventHandler<DeveloperOptionStateChangedEventArgs> DeveloperOptionStateChanged
2781 if (s_developerOptionStateChanged == null)
2783 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DeveloperOptionState, s_developerOptionStateChangedCallback, IntPtr.Zero);
2784 if (ret != SystemSettingsError.None)
2786 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2789 s_developerOptionStateChanged += value;
2794 s_developerOptionStateChanged -= value;
2795 if (s_developerOptionStateChanged == null)
2797 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DeveloperOptionState, s_developerOptionStateChangedCallback);
2798 if (ret != SystemSettingsError.None)
2800 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");