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;
972 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.AccessibilityTtsEnabled, value);
973 if (res != SystemSettingsError.None)
975 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set AccessibilityTTS system setting.");
981 /// Indicates whether the vibration is enabled on the device or not.
983 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
984 /// <privlevel>platform</privlevel>
985 /// <feature>http://tizen.org/feature/systemsetting</feature>
986 /// <exception cref="ArgumentException">Invalid Argument</exception>
987 /// <exception cref="NotSupportedException">Not Supported feature</exception>
988 /// <exception cref="InvalidOperationException">Invalid operation</exception>
989 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
990 /// <since_tizen> 5 </since_tizen>
991 public static bool Vibration
996 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.Vibration, out isVibration);
997 if (res != SystemSettingsError.None)
999 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get isVibration system setting.");
1005 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.Vibration, value);
1006 if (res != SystemSettingsError.None)
1008 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set isVibration system setting.");
1014 /// Indicates whether the automatic time update is enabled on the device or not.
1016 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1017 /// <privlevel>platform</privlevel>
1018 /// <feature>http://tizen.org/feature/systemsetting</feature>
1019 /// <feature>http://tizen.org/feature/network.telephony</feature>
1020 /// <exception cref="ArgumentException">Invalid Argument</exception>
1021 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1022 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1023 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1024 /// <since_tizen> 5 </since_tizen>
1025 public static bool AutomaticTimeUpdate
1029 bool isAutomaticTimeUpdate;
1030 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.AutomaticTimeUpdate, out isAutomaticTimeUpdate);
1031 if (res != SystemSettingsError.None)
1033 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get isAutomaticTimeUpdate system setting.");
1035 return isAutomaticTimeUpdate;
1039 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.AutomaticTimeUpdate, value);
1040 if (res != SystemSettingsError.None)
1042 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set isAutomaticTimeUpdate system setting.");
1048 /// Indicates whether the developer option state is enabled on the device or not.
1050 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1051 /// <privlevel>platform</privlevel>
1052 /// <feature>http://tizen.org/feature/systemsetting</feature>
1053 /// <exception cref="ArgumentException">Invalid Argument</exception>
1054 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1055 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1056 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1057 /// <since_tizen> 5 </since_tizen>
1058 public static bool DeveloperOptionState
1062 bool isDeveloperOptionState;
1063 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.DeveloperOptionState, out isDeveloperOptionState);
1064 if (res != SystemSettingsError.None)
1066 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get isDeveloperOptionState system setting.");
1068 return isDeveloperOptionState;
1072 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.DeveloperOptionState, value);
1073 if (res != SystemSettingsError.None)
1075 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set isDeveloperOptionState system setting.");
1081 /// Indicates whether accessibility grayscale is enabled on the device or not.
1083 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1084 /// <privlevel>platform</privlevel>
1085 /// <feature>http://tizen.org/feature/systemsetting</feature>
1086 /// <feature>http://tizen.org/feature/accessibility.grayscale</feature>
1087 /// <exception cref="ArgumentException">Invalid Argument</exception>
1088 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1089 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1090 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1091 /// <since_tizen> 6 </since_tizen>
1092 public static bool AccessibilityGrayscale
1096 bool isAccessibilityGrayscale;
1097 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.AccessibilityGrayscale, out isAccessibilityGrayscale);
1098 if (res != SystemSettingsError.None)
1100 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get isAccessibilityGrayscale system setting.");
1102 return isAccessibilityGrayscale;
1106 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.AccessibilityGrayscale, value);
1107 if (res != SystemSettingsError.None)
1109 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set isAccessibilityGrayscale system setting.");
1115 /// Indicates whether accessibility negative color is enabled on the device or not.
1117 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1118 /// <privlevel>platform</privlevel>
1119 /// <feature>http://tizen.org/feature/systemsetting</feature>
1120 /// <feature>http://tizen.org/feature/accessibility.negative</feature>
1121 /// <exception cref="ArgumentException">Invalid Argument</exception>
1122 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1123 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1124 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1125 /// <since_tizen> 6 </since_tizen>
1126 public static bool AccessibilityNegativeColor
1130 bool isAccessibilityNegativeColor;
1131 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.AccessibilityNegativeColor, out isAccessibilityNegativeColor);
1132 if (res != SystemSettingsError.None)
1134 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get isAccessibilityNegativeColor system setting.");
1136 return isAccessibilityNegativeColor;
1140 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.AccessibilityNegativeColor, value);
1141 if (res != SystemSettingsError.None)
1143 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set isAccessibilityNegativeColor system setting.");
1149 /// Indicates whether rotary event is enabled on the device.
1151 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1152 /// <privlevel>platform</privlevel>
1153 /// <feature>http://tizen.org/feature/systemsetting</feature>
1154 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1155 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1157 /// http://tizen.org/privilege/systemsettings.admin is needed only for setting value. When getting the value, it isn't needed.
1159 /// <since_tizen> 6 </since_tizen>
1160 public static bool RotaryEventEnabled
1164 bool isRotaryEventEnabled;
1165 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.RotaryEventEnabled, out isRotaryEventEnabled);
1166 if (res != SystemSettingsError.None)
1168 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get isRotaryEventEnabled system setting.");
1170 return isRotaryEventEnabled;
1174 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.RotaryEventEnabled, value);
1175 if (res != SystemSettingsError.None)
1177 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set isRotaryEventEnabled system setting.");
1182 private static readonly Interop.Settings.SystemSettingsChangedCallback s_incomingCallRingtoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1184 string path = SystemSettings.IncomingCallRingtone;
1185 IncomingCallRingtoneChangedEventArgs eventArgs = new IncomingCallRingtoneChangedEventArgs(path);
1186 s_incomingCallRingtoneChanged?.Invoke(null, eventArgs);
1188 private static event EventHandler<IncomingCallRingtoneChangedEventArgs> s_incomingCallRingtoneChanged;
1190 /// The IncomingCallRingtoneChanged event is triggered when the file path of the incoming ringtone is changed.
1192 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1193 /// <privlevel>platform</privlevel>
1194 /// <feature>http://tizen.org/feature/systemsetting</feature>
1195 /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
1196 /// <exception cref="ArgumentException">Invalid Argument</exception>
1197 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1198 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1199 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1200 /// <since_tizen> 3 </since_tizen>
1201 public static event EventHandler<IncomingCallRingtoneChangedEventArgs> IncomingCallRingtoneChanged
1205 if (s_incomingCallRingtoneChanged == null)
1207 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.IncomingCallRingtone, s_incomingCallRingtoneChangedCallback, IntPtr.Zero);
1208 if (ret != SystemSettingsError.None)
1210 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1213 s_incomingCallRingtoneChanged += value;
1218 if (s_incomingCallRingtoneChanged == null) {
1219 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1222 s_incomingCallRingtoneChanged -= value;
1223 if (s_incomingCallRingtoneChanged == null)
1225 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.IncomingCallRingtone, s_incomingCallRingtoneChangedCallback);
1226 if (ret != SystemSettingsError.None)
1228 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1234 private static readonly Interop.Settings.SystemSettingsChangedCallback s_wallpaperHomeScreenChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1236 string path = SystemSettings.WallpaperHomeScreen;
1237 WallpaperHomeScreenChangedEventArgs eventArgs = new WallpaperHomeScreenChangedEventArgs(path);
1238 s_wallpaperHomeScreenChanged?.Invoke(null, eventArgs);
1240 private static event EventHandler<WallpaperHomeScreenChangedEventArgs> s_wallpaperHomeScreenChanged;
1242 /// THe WallpaperHomeScreenChanged event is triggered when the file path of the current home screen wallpaper is changed.
1244 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1245 /// <privlevel>platform</privlevel>
1246 /// <feature>http://tizen.org/feature/systemsetting</feature>
1247 /// <feature>http://tizen.org/feature/systemsetting.home_screen</feature>
1248 /// <exception cref="ArgumentException">Invalid Argument</exception>
1249 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1250 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1251 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1252 /// <since_tizen> 3 </since_tizen>
1253 public static event EventHandler<WallpaperHomeScreenChangedEventArgs> WallpaperHomeScreenChanged
1257 if (s_wallpaperHomeScreenChanged == null)
1259 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.WallpaperHomeScreen, s_wallpaperHomeScreenChangedCallback, IntPtr.Zero);
1260 if (ret != SystemSettingsError.None)
1262 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1265 s_wallpaperHomeScreenChanged += value;
1270 if (s_wallpaperHomeScreenChanged == null) {
1271 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1274 s_wallpaperHomeScreenChanged -= value;
1275 if (s_wallpaperHomeScreenChanged == null)
1277 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.WallpaperHomeScreen, s_wallpaperHomeScreenChangedCallback);
1278 if (ret != SystemSettingsError.None)
1280 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1286 private static readonly Interop.Settings.SystemSettingsChangedCallback s_wallpaperLockScreenChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1288 string path = SystemSettings.WallpaperLockScreen;
1289 WallpaperLockScreenChangedEventArgs eventArgs = new WallpaperLockScreenChangedEventArgs(path);
1290 s_wallpaperLockScreenChanged?.Invoke(null, eventArgs);
1292 private static event EventHandler<WallpaperLockScreenChangedEventArgs> s_wallpaperLockScreenChanged;
1294 /// The WallpaperLockScreenChanged event is triggered when the file path of the current lock screen wallpaper is changed.
1296 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1297 /// <privlevel>platform</privlevel>
1298 /// <feature>http://tizen.org/feature/systemsetting</feature>
1299 /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
1300 /// <exception cref="ArgumentException">Invalid Argument</exception>
1301 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1302 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1303 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1304 /// <since_tizen> 3 </since_tizen>
1305 public static event EventHandler<WallpaperLockScreenChangedEventArgs> WallpaperLockScreenChanged
1309 if (s_wallpaperLockScreenChanged == null)
1311 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.WallpaperLockScreen, s_wallpaperLockScreenChangedCallback, IntPtr.Zero);
1312 if (ret != SystemSettingsError.None)
1314 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1317 s_wallpaperLockScreenChanged += value;
1322 if (s_wallpaperLockScreenChanged == null) {
1323 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1326 s_wallpaperLockScreenChanged -= value;
1327 if (s_wallpaperLockScreenChanged == null)
1329 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.WallpaperLockScreen, s_wallpaperLockScreenChangedCallback);
1330 if (ret != SystemSettingsError.None)
1332 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1338 private static readonly Interop.Settings.SystemSettingsChangedCallback s_fontSizeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1340 SystemSettingsFontSize fontSize = SystemSettings.FontSize;
1341 FontSizeChangedEventArgs eventArgs = new FontSizeChangedEventArgs(fontSize);
1342 s_fontSizeChanged?.Invoke(null, eventArgs);
1344 private static event EventHandler<FontSizeChangedEventArgs> s_fontSizeChanged;
1346 /// The FontSizeChanged event is triggered when the current system font size is changed.
1348 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1349 /// <privlevel>platform</privlevel>
1350 /// <feature>http://tizen.org/feature/systemsetting</feature>
1351 /// <exception cref="ArgumentException">Invalid Argument</exception>
1352 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1353 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1354 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1355 /// <since_tizen> 3 </since_tizen>
1356 public static event EventHandler<FontSizeChangedEventArgs> FontSizeChanged
1360 if (s_fontSizeChanged == null)
1362 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.FontSize, s_fontSizeChangedCallback, IntPtr.Zero);
1363 if (ret != SystemSettingsError.None)
1365 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1368 s_fontSizeChanged += value;
1373 if (s_fontSizeChanged == null) {
1374 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1377 s_fontSizeChanged -= value;
1378 if (s_fontSizeChanged == null)
1380 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.FontSize, s_fontSizeChangedCallback);
1381 if (ret != SystemSettingsError.None)
1383 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1389 private static readonly Interop.Settings.SystemSettingsChangedCallback s_fontTypeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1391 string fontType = SystemSettings.FontType;
1392 FontTypeChangedEventArgs eventArgs = new FontTypeChangedEventArgs(fontType);
1393 s_fontTypeChanged?.Invoke(null, eventArgs);
1395 private static event EventHandler<FontTypeChangedEventArgs> s_fontTypeChanged;
1397 /// The FontTypeChanged event is triggered when the current system font type is changed.
1399 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1400 /// <privlevel>platform</privlevel>
1401 /// <feature>http://tizen.org/feature/systemsetting</feature>
1402 /// <exception cref="ArgumentException">Invalid Argument</exception>
1403 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1404 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1405 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1406 /// <since_tizen> 3 </since_tizen>
1407 public static event EventHandler<FontTypeChangedEventArgs> FontTypeChanged
1411 if (s_fontTypeChanged == null)
1413 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.FontType, s_fontTypeChangedCallback, IntPtr.Zero);
1414 if (ret != SystemSettingsError.None)
1416 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1419 s_fontTypeChanged += value;
1424 if (s_fontTypeChanged == null) {
1425 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1428 s_fontTypeChanged -= value;
1429 if (s_fontTypeChanged == null)
1431 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.FontType, s_fontTypeChangedCallback);
1432 if (ret != SystemSettingsError.None)
1434 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1440 private static readonly Interop.Settings.SystemSettingsChangedCallback s_motionActivationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1442 bool motionActivation = SystemSettings.MotionActivationEnabled;
1443 MotionActivationSettingChangedEventArgs eventArgs = new MotionActivationSettingChangedEventArgs(motionActivation);
1444 s_motionActivationChanged?.Invoke(null, eventArgs);
1446 private static event EventHandler<MotionActivationSettingChangedEventArgs> s_motionActivationChanged;
1448 /// The MotionActivationChanged event is triggered when the motion service status is changed.
1450 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1451 /// <privlevel>platform</privlevel>
1452 /// <feature>http://tizen.org/feature/systemsetting</feature>
1453 /// <exception cref="ArgumentException">Invalid Argument</exception>
1454 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1455 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1456 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1457 /// <since_tizen> 3 </since_tizen>
1458 public static event EventHandler<MotionActivationSettingChangedEventArgs> MotionActivationSettingChanged
1462 if (s_motionActivationChanged == null)
1464 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.MotionActivationEnabled, s_motionActivationChangedCallback, IntPtr.Zero);
1465 if (ret != SystemSettingsError.None)
1467 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1470 s_motionActivationChanged += value;
1475 if (s_motionActivationChanged == null) {
1476 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1479 s_motionActivationChanged -= value;
1480 if (s_motionActivationChanged == null)
1482 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.MotionActivationEnabled, s_motionActivationChangedCallback);
1483 if (ret != SystemSettingsError.None)
1485 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1491 private static readonly Interop.Settings.SystemSettingsChangedCallback s_emailAlertRingtoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1493 string emailAlertRingtone = SystemSettings.EmailAlertRingtone;
1494 EmailAlertRingtoneChangedEventArgs eventArgs = new EmailAlertRingtoneChangedEventArgs(emailAlertRingtone);
1495 s_emailAlertRingtoneChanged?.Invoke(null, eventArgs);
1497 private static event EventHandler<EmailAlertRingtoneChangedEventArgs> s_emailAlertRingtoneChanged;
1499 /// The EmailAlertRingtoneChanged event is triggered when the file path of the current email alert ringtone is changed.
1501 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1502 /// <privlevel>platform</privlevel>
1503 /// <feature>http://tizen.org/feature/systemsetting</feature>
1504 /// <feature>http://tizen.org/feature/systemsetting.notification_email</feature>
1505 /// <exception cref="ArgumentException">Invalid Argument</exception>
1506 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1507 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1508 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1509 /// <since_tizen> 3 </since_tizen>
1510 public static event EventHandler<EmailAlertRingtoneChangedEventArgs> EmailAlertRingtoneChanged
1514 if (s_emailAlertRingtoneChanged == null)
1516 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.EmailAlertRingtone, s_emailAlertRingtoneChangedCallback, IntPtr.Zero);
1517 if (ret != SystemSettingsError.None)
1519 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1522 s_emailAlertRingtoneChanged += value;
1527 if (s_emailAlertRingtoneChanged == null) {
1528 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1531 s_emailAlertRingtoneChanged -= value;
1532 if (s_emailAlertRingtoneChanged == null)
1534 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.EmailAlertRingtone, s_emailAlertRingtoneChangedCallback);
1535 if (ret != SystemSettingsError.None)
1537 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1543 private static readonly Interop.Settings.SystemSettingsChangedCallback s_usbDebuggingSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1545 bool usbDebuggingEnabled = SystemSettings.UsbDebuggingEnabled;
1546 UsbDebuggingSettingChangedEventArgs eventArgs = new UsbDebuggingSettingChangedEventArgs(usbDebuggingEnabled);
1547 s_usbDebuggingSettingChanged?.Invoke(null, eventArgs);
1549 private static event EventHandler<UsbDebuggingSettingChangedEventArgs> s_usbDebuggingSettingChanged;
1551 /// The UsbDebuggingSettingChangedEventArgs event is triggered when the USB debugging status is changed.
1553 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1554 /// <privlevel>platform</privlevel>
1555 /// <feature>http://tizen.org/feature/systemsetting</feature>
1556 /// <exception cref="ArgumentException">Invalid Argument</exception>
1557 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1558 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1559 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1560 /// <since_tizen> 3 </since_tizen>
1561 public static event EventHandler<UsbDebuggingSettingChangedEventArgs> UsbDebuggingSettingChanged
1565 if (s_usbDebuggingSettingChanged == null)
1567 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UsbDebuggingEnabled, s_usbDebuggingSettingChangedCallback, IntPtr.Zero);
1568 if (ret != SystemSettingsError.None)
1570 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1573 s_usbDebuggingSettingChanged += value;
1578 if (s_usbDebuggingSettingChanged == null) {
1579 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1582 s_usbDebuggingSettingChanged -= value;
1583 if (s_usbDebuggingSettingChanged == null)
1585 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UsbDebuggingEnabled, s_usbDebuggingSettingChangedCallback);
1586 if (ret != SystemSettingsError.None)
1588 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1594 private static readonly Interop.Settings.SystemSettingsChangedCallback s_data3GNetworkSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1596 bool data3GEnabled = SystemSettings.Data3GNetworkEnabled;
1597 Data3GNetworkSettingChangedEventArgs eventArgs = new Data3GNetworkSettingChangedEventArgs(data3GEnabled);
1598 s_data3GNetworkSettingChanged?.Invoke(null, eventArgs);
1600 private static event EventHandler<Data3GNetworkSettingChangedEventArgs> s_data3GNetworkSettingChanged;
1602 /// The Data3GNetworkSettingChanged event is triggered when the 3G data network status is changed.
1604 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1605 /// <privlevel>platform</privlevel>
1606 /// <feature>http://tizen.org/feature/systemsetting</feature>
1607 /// <exception cref="ArgumentException">Invalid Argument</exception>
1608 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1609 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1610 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1611 /// <since_tizen> 3 </since_tizen>
1612 public static event EventHandler<Data3GNetworkSettingChangedEventArgs> Data3GNetworkSettingChanged
1616 if (s_data3GNetworkSettingChanged == null)
1618 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Data3GNetworkEnabled, s_data3GNetworkSettingChangedCallback, IntPtr.Zero);
1619 if (ret != SystemSettingsError.None)
1621 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1624 s_data3GNetworkSettingChanged += value;
1629 if (s_data3GNetworkSettingChanged == null) {
1630 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1633 s_data3GNetworkSettingChanged -= value;
1634 if (s_data3GNetworkSettingChanged == null)
1636 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Data3GNetworkEnabled, s_data3GNetworkSettingChangedCallback);
1637 if (ret != SystemSettingsError.None)
1639 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1645 private static readonly Interop.Settings.SystemSettingsChangedCallback s_lockscreenAppChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1647 string lockScreenApp = SystemSettings.LockScreenApp;
1648 LockScreenAppChangedEventArgs eventArgs = new LockScreenAppChangedEventArgs(lockScreenApp);
1649 s_lockscreenAppChanged?.Invoke(null, eventArgs);
1651 private static event EventHandler<LockScreenAppChangedEventArgs> s_lockscreenAppChanged;
1653 /// The LockScreenAppChanged event is triggered when the lockscreen application package name is changed.
1655 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1656 /// <privlevel>platform</privlevel>
1657 /// <feature>http://tizen.org/feature/systemsetting</feature>
1658 /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
1659 /// <exception cref="ArgumentException">Invalid Argument</exception>
1660 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1661 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1662 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1663 /// <since_tizen> 4 </since_tizen>
1664 public static event EventHandler<LockScreenAppChangedEventArgs> LockScreenAppChanged
1668 if (s_lockscreenAppChanged == null)
1670 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LockScreenApp, s_lockscreenAppChangedCallback, IntPtr.Zero);
1671 if (ret != SystemSettingsError.None)
1673 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1676 s_lockscreenAppChanged += value;
1681 if (s_lockscreenAppChanged == null) {
1682 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1686 s_lockscreenAppChanged -= value;
1687 if (s_lockscreenAppChanged == null)
1689 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LockScreenApp, s_lockscreenAppChangedCallback);
1690 if (ret != SystemSettingsError.None)
1692 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1698 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeCountryChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1700 string localeCountry = SystemSettings.LocaleCountry;
1701 LocaleCountryChangedEventArgs eventArgs = new LocaleCountryChangedEventArgs(localeCountry);
1702 s_localeCountryChanged?.Invoke(null, eventArgs);
1704 private static event EventHandler<LocaleCountryChangedEventArgs> s_localeCountryChanged;
1706 /// The LocaleCountryChanged event is triggered when the current country setting in the <LANGUAGE>_<REGION> syntax, is changed.
1708 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1709 /// <privlevel>platform</privlevel>
1710 /// <feature>http://tizen.org/feature/systemsetting</feature>
1711 /// <exception cref="ArgumentException">Invalid Argument</exception>
1712 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1713 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1714 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1715 /// <since_tizen> 3 </since_tizen>
1716 public static event EventHandler<LocaleCountryChangedEventArgs> LocaleCountryChanged
1720 if (s_localeCountryChanged == null)
1722 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleCountry, s_localeCountryChangedCallback, IntPtr.Zero);
1723 if (ret != SystemSettingsError.None)
1725 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1728 s_localeCountryChanged += value;
1733 if (s_localeCountryChanged == null) {
1734 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1737 s_localeCountryChanged -= value;
1738 if (s_localeCountryChanged == null)
1740 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleCountry, s_localeCountryChangedCallback);
1741 if (ret != SystemSettingsError.None)
1743 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1749 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeLanguageChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1751 string localeLanguage = SystemSettings.LocaleLanguage;
1752 LocaleLanguageChangedEventArgs eventArgs = new LocaleLanguageChangedEventArgs(localeLanguage);
1753 s_localeLanguageChanged?.Invoke(null, eventArgs);
1755 private static event EventHandler<LocaleLanguageChangedEventArgs> s_localeLanguageChanged;
1757 /// The LocaleLanguageChanged event is triggered when the current language setting in the <LANGUAGE>_<REGION> syntax, is changed.
1759 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1760 /// <privlevel>platform</privlevel>
1761 /// <feature>http://tizen.org/feature/systemsetting</feature>
1762 /// <exception cref="ArgumentException">Invalid Argument</exception>
1763 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1764 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1765 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1766 /// <since_tizen> 3 </since_tizen>
1767 public static event EventHandler<LocaleLanguageChangedEventArgs> LocaleLanguageChanged
1771 if (s_localeLanguageChanged == null)
1773 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleLanguage, s_localeLanguageChangedCallback, IntPtr.Zero);
1774 if (ret != SystemSettingsError.None)
1776 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1779 s_localeLanguageChanged += value;
1784 if (s_localeLanguageChanged == null) {
1785 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1788 s_localeLanguageChanged -= value;
1789 if (s_localeLanguageChanged == null)
1791 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleLanguage, s_localeLanguageChangedCallback);
1792 if (ret != SystemSettingsError.None)
1794 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1800 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeTimeFormat24HourChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1802 bool localeTimeFormat24Hour = SystemSettings.LocaleTimeFormat24HourEnabled;
1803 LocaleTimeFormat24HourSettingChangedEventArgs eventArgs = new LocaleTimeFormat24HourSettingChangedEventArgs(localeTimeFormat24Hour);
1804 s_localeTimeFormat24HourChanged?.Invoke(null, eventArgs);
1806 private static event EventHandler<LocaleTimeFormat24HourSettingChangedEventArgs> s_localeTimeFormat24HourChanged;
1808 /// The LocaleTimeFormat24HourChanged event is triggered when the time format is changed.
1810 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1811 /// <privlevel>platform</privlevel>
1812 /// <feature>http://tizen.org/feature/systemsetting</feature>
1813 /// <exception cref="ArgumentException">Invalid Argument</exception>
1814 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1815 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1816 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1817 /// <since_tizen> 3 </since_tizen>
1818 public static event EventHandler<LocaleTimeFormat24HourSettingChangedEventArgs> LocaleTimeFormat24HourSettingChanged
1822 if (s_localeTimeFormat24HourChanged == null)
1824 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, s_localeTimeFormat24HourChangedCallback, IntPtr.Zero);
1825 if (ret != SystemSettingsError.None)
1827 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1830 s_localeTimeFormat24HourChanged += value;
1835 if (s_localeTimeFormat24HourChanged == null) {
1836 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1839 s_localeTimeFormat24HourChanged -= value;
1840 if (s_localeTimeFormat24HourChanged == null)
1842 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, s_localeTimeFormat24HourChangedCallback);
1843 if (ret != SystemSettingsError.None)
1845 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1851 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeTimeZoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1853 string localeTimeZone = SystemSettings.LocaleTimeZone;
1854 LocaleTimeZoneChangedEventArgs eventArgs = new LocaleTimeZoneChangedEventArgs(localeTimeZone);
1855 s_localeTimeZoneChanged?.Invoke(null, eventArgs);
1857 private static event EventHandler<LocaleTimeZoneChangedEventArgs> s_localeTimeZoneChanged;
1859 /// The LocaleTimeZoneChanged event is triggered when the current time zone is changed.
1861 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1862 /// <privlevel>platform</privlevel>
1863 /// <feature>http://tizen.org/feature/systemsetting</feature>
1864 /// <exception cref="ArgumentException">Invalid Argument</exception>
1865 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1866 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1867 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1868 /// <since_tizen> 3 </since_tizen>
1869 public static event EventHandler<LocaleTimeZoneChangedEventArgs> LocaleTimeZoneChanged
1873 if (s_localeTimeZoneChanged == null)
1875 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleTimeZone, s_localeTimeZoneChangedCallback, IntPtr.Zero);
1876 if (ret != SystemSettingsError.None)
1878 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1881 s_localeTimeZoneChanged += value;
1886 if (s_localeTimeZoneChanged == null) {
1887 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1890 s_localeTimeZoneChanged -= value;
1891 if (s_localeTimeZoneChanged == null)
1893 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleTimeZone, s_localeTimeZoneChangedCallback);
1894 if (ret != SystemSettingsError.None)
1896 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1902 private static readonly Interop.Settings.SystemSettingsChangedCallback s_timeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1905 int time = SystemSettings.Time;
1906 TimeChangedEventArgs eventArgs = new TimeChangedEventArgs(time);
1907 s_timeChanged?.Invoke(null, eventArgs);
1909 private static event EventHandler<TimeChangedEventArgs> s_timeChanged;
1911 /// The TimeChanged event is triggered when the system time is changed.
1913 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1914 /// <privlevel>platform</privlevel>
1915 /// <feature>http://tizen.org/feature/systemsetting</feature>
1916 /// <exception cref="ArgumentException">Invalid Argument</exception>
1917 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1918 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1919 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1920 /// <since_tizen> 3 </since_tizen>
1921 public static event EventHandler<TimeChangedEventArgs> TimeChanged
1925 if (s_timeChanged == null)
1927 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Time, s_timeChangedCallback, IntPtr.Zero);
1928 if (ret != SystemSettingsError.None)
1930 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1933 s_timeChanged += value;
1938 if (s_timeChanged == null) {
1939 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1942 s_timeChanged -= value;
1943 if (s_timeChanged == null)
1945 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Time, s_timeChangedCallback);
1946 if (ret != SystemSettingsError.None)
1948 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1954 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundLockChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1956 bool soundLock = SystemSettings.SoundLockEnabled;
1957 SoundLockSettingChangedEventArgs eventArgs = new SoundLockSettingChangedEventArgs(soundLock);
1958 s_soundLockChanged?.Invoke(null, eventArgs);
1960 private static event EventHandler<SoundLockSettingChangedEventArgs> s_soundLockChanged;
1962 /// The SoundLockChanged event is triggered when the screen lock sound enabled status is changed.
1964 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1965 /// <privlevel>platform</privlevel>
1966 /// <feature>http://tizen.org/feature/systemsetting</feature>
1967 /// <exception cref="ArgumentException">Invalid Argument</exception>
1968 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1969 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1970 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1971 /// <since_tizen> 3 </since_tizen>
1972 public static event EventHandler<SoundLockSettingChangedEventArgs> SoundLockSettingChanged
1976 if (s_soundLockChanged == null)
1978 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundLockEnabled, s_soundLockChangedCallback, IntPtr.Zero);
1979 if (ret != SystemSettingsError.None)
1981 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1984 s_soundLockChanged += value;
1989 if (s_soundLockChanged == null) {
1990 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
1993 s_soundLockChanged -= value;
1994 if (s_soundLockChanged == null)
1996 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundLockEnabled, s_soundLockChangedCallback);
1997 if (ret != SystemSettingsError.None)
1999 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2005 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundSilentModeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2007 bool soundSilentMode = SystemSettings.SoundSilentModeEnabled;
2008 SoundSilentModeSettingChangedEventArgs eventArgs = new SoundSilentModeSettingChangedEventArgs(soundSilentMode);
2009 s_soundSilentModeChanged?.Invoke(null, eventArgs);
2011 private static event EventHandler<SoundSilentModeSettingChangedEventArgs> s_soundSilentModeChanged;
2013 /// The SoundSilentModeChanged event is triggered when the silent mode status is changed.
2015 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2016 /// <privlevel>platform</privlevel>
2017 /// <feature>http://tizen.org/feature/systemsetting</feature>
2018 /// <exception cref="ArgumentException">Invalid Argument</exception>
2019 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2020 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2021 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2022 /// <since_tizen> 3 </since_tizen>
2023 public static event EventHandler<SoundSilentModeSettingChangedEventArgs> SoundSilentModeSettingChanged
2027 if (s_soundSilentModeChanged == null)
2029 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundSilentModeEnabled, s_soundSilentModeChangedCallback, IntPtr.Zero);
2030 if (ret != SystemSettingsError.None)
2032 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2035 s_soundSilentModeChanged += value;
2040 if (s_soundSilentModeChanged == null) {
2041 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2044 s_soundSilentModeChanged -= value;
2045 if (s_soundSilentModeChanged == null)
2047 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundSilentModeEnabled, s_soundSilentModeChangedCallback);
2048 if (ret != SystemSettingsError.None)
2050 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2056 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundTouchChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2058 bool soundTouch = SystemSettings.SoundTouchEnabled;
2059 SoundTouchSettingChangedEventArgs eventArgs = new SoundTouchSettingChangedEventArgs(soundTouch);
2060 s_soundTouchChanged?.Invoke(null, eventArgs);
2062 private static event EventHandler<SoundTouchSettingChangedEventArgs> s_soundTouchChanged;
2064 /// THe SoundTouchChanged event is triggered when the screen touch sound enabled status is changed.
2066 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2067 /// <privlevel>platform</privlevel>
2068 /// <feature>http://tizen.org/feature/systemsetting</feature>
2069 /// <exception cref="ArgumentException">Invalid Argument</exception>
2070 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2071 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2072 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2073 /// <since_tizen> 3 </since_tizen>
2074 public static event EventHandler<SoundTouchSettingChangedEventArgs> SoundTouchSettingChanged
2078 if (s_soundTouchChanged == null)
2080 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundTouchEnabled, s_soundTouchChangedCallback, IntPtr.Zero);
2081 if (ret != SystemSettingsError.None)
2083 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2086 s_soundTouchChanged += value;
2091 if (s_soundTouchChanged == null) {
2092 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2095 s_soundTouchChanged -= value;
2096 if (s_soundTouchChanged == null)
2099 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundTouchEnabled, s_soundTouchChangedCallback);
2100 if (ret != SystemSettingsError.None)
2102 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2108 private static readonly Interop.Settings.SystemSettingsChangedCallback s_displayScreenRotationAutoChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2110 bool displayScreenRotationAuto = SystemSettings.DisplayScreenRotationAutoEnabled;
2111 DisplayScreenRotationAutoSettingChangedEventArgs eventArgs = new DisplayScreenRotationAutoSettingChangedEventArgs(displayScreenRotationAuto);
2112 s_displayScreenRotationAutoChanged?.Invoke(null, eventArgs);
2114 private static event EventHandler<DisplayScreenRotationAutoSettingChangedEventArgs> s_displayScreenRotationAutoChanged;
2116 /// The DisplayScreenRotationAutoChanged event is triggered when the automatic rotation control status is changed.
2118 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2119 /// <privlevel>platform</privlevel>
2120 /// <feature>http://tizen.org/feature/systemsetting</feature>
2121 /// <exception cref="ArgumentException">Invalid Argument</exception>
2122 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2123 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2124 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2125 /// <since_tizen> 3 </since_tizen>
2126 public static event EventHandler<DisplayScreenRotationAutoSettingChangedEventArgs> DisplayScreenRotationAutoSettingChanged
2130 if (s_displayScreenRotationAutoChanged == null)
2132 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, s_displayScreenRotationAutoChangedCallback, IntPtr.Zero);
2133 if (ret != SystemSettingsError.None)
2135 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2138 s_displayScreenRotationAutoChanged += value;
2143 if (s_displayScreenRotationAutoChanged == null) {
2144 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2147 s_displayScreenRotationAutoChanged -= value;
2148 if (s_displayScreenRotationAutoChanged == null)
2150 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, s_displayScreenRotationAutoChangedCallback);
2151 if (ret != SystemSettingsError.None)
2153 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2159 private static readonly Interop.Settings.SystemSettingsChangedCallback s_deviceNameChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2161 string deviceName = SystemSettings.DeviceName;
2162 DeviceNameChangedEventArgs eventArgs = new DeviceNameChangedEventArgs(deviceName);
2163 s_deviceNameChanged?.Invoke(null, eventArgs);
2165 private static event EventHandler<DeviceNameChangedEventArgs> s_deviceNameChanged;
2167 /// The DeviceNameChanged event is triggered when the device name is changed.
2169 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2170 /// <privlevel>platform</privlevel>
2171 /// <feature>http://tizen.org/feature/systemsetting</feature>
2172 /// <exception cref="ArgumentException">Invalid Argument</exception>
2173 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2174 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2175 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2176 /// <since_tizen> 3 </since_tizen>
2177 public static event EventHandler<DeviceNameChangedEventArgs> DeviceNameChanged
2181 if (s_deviceNameChanged == null)
2183 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DeviceName, s_deviceNameChangedCallback, IntPtr.Zero);
2184 if (ret != SystemSettingsError.None)
2186 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2189 s_deviceNameChanged += value;
2194 if (s_deviceNameChanged == null) {
2195 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2198 s_deviceNameChanged -= value;
2199 if (s_deviceNameChanged == null)
2201 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DeviceName, s_deviceNameChangedCallback);
2202 if (ret != SystemSettingsError.None)
2204 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2210 private static readonly Interop.Settings.SystemSettingsChangedCallback s_motionSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2212 bool motionEnabled = SystemSettings.MotionEnabled;
2213 MotionSettingChangedEventArgs eventArgs = new MotionSettingChangedEventArgs(motionEnabled);
2214 s_motionSettingChanged?.Invoke(null, eventArgs);
2216 private static event EventHandler<MotionSettingChangedEventArgs> s_motionSettingChanged;
2218 /// The MotionSettingChanged event is triggered when the motion feature enabled status is changed.
2220 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2221 /// <privlevel>platform</privlevel>
2222 /// <feature>http://tizen.org/feature/systemsetting</feature>
2223 /// <exception cref="ArgumentException">Invalid Argument</exception>
2224 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2225 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2226 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2227 /// <since_tizen> 3 </since_tizen>
2228 public static event EventHandler<MotionSettingChangedEventArgs> MotionSettingChanged
2232 if (s_motionSettingChanged == null)
2234 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.MotionEnabled, s_motionSettingChangedCallback, IntPtr.Zero);
2235 if (ret != SystemSettingsError.None)
2237 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2240 s_motionSettingChanged += value;
2245 if (s_motionSettingChanged == null) {
2246 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2249 s_motionSettingChanged -= value;
2250 if (s_motionSettingChanged == null)
2252 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.MotionEnabled, s_motionSettingChangedCallback);
2253 if (ret != SystemSettingsError.None)
2255 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2261 private static readonly Interop.Settings.SystemSettingsChangedCallback s_networkWifiNotificationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2263 bool networkWifiNotification = SystemSettings.NetworkWifiNotificationEnabled;
2264 NetworkWifiNotificationSettingChangedEventArgs eventArgs = new NetworkWifiNotificationSettingChangedEventArgs(networkWifiNotification);
2265 s_networkWifiNotificationChanged?.Invoke(null, eventArgs);
2267 private static event EventHandler<NetworkWifiNotificationSettingChangedEventArgs> s_networkWifiNotificationChanged;
2269 /// The NetworkWifiNotificationChanged event is triggered when the WiFi-related notifications enabled status is changed.
2271 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2272 /// <privlevel>platform</privlevel>
2273 /// <feature>http://tizen.org/feature/systemsetting</feature>
2274 /// <feature>http://tizen.org/feature/network.wifi</feature>
2275 /// <exception cref="ArgumentException">Invalid Argument</exception>
2276 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2277 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2278 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2279 /// <since_tizen> 3 </since_tizen>
2280 public static event EventHandler<NetworkWifiNotificationSettingChangedEventArgs> NetworkWifiNotificationSettingChanged
2284 if (s_networkWifiNotificationChanged == null)
2286 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.NetworkWifiNotificationEnabled, s_networkWifiNotificationChangedCallback, IntPtr.Zero);
2287 if (ret != SystemSettingsError.None)
2289 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2292 s_networkWifiNotificationChanged += value;
2297 if (s_networkWifiNotificationChanged == null) {
2298 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2301 s_networkWifiNotificationChanged -= value;
2302 if (s_networkWifiNotificationChanged == null)
2304 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.NetworkWifiNotificationEnabled, s_networkWifiNotificationChangedCallback);
2305 if (ret != SystemSettingsError.None)
2307 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2313 private static readonly Interop.Settings.SystemSettingsChangedCallback s_networkFlightModeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2315 bool networkFlightMode = SystemSettings.NetworkFlightModeEnabled;
2316 NetworkFlightModeSettingChangedEventArgs eventArgs = new NetworkFlightModeSettingChangedEventArgs(networkFlightMode);
2317 s_networkFlightModeChanged?.Invoke(null, eventArgs);
2319 private static event EventHandler<NetworkFlightModeSettingChangedEventArgs> s_networkFlightModeChanged;
2321 /// The NetworkFlightModeChanged event is triggered when the flight mode status is changed.
2323 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2324 /// <privlevel>platform</privlevel>
2325 /// <feature>http://tizen.org/feature/systemsetting</feature>
2326 /// <exception cref="ArgumentException">Invalid Argument</exception>
2327 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2328 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2329 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2330 /// <since_tizen> 3 </since_tizen>
2331 public static event EventHandler<NetworkFlightModeSettingChangedEventArgs> NetworkFlightModeSettingChanged
2335 if (s_networkFlightModeChanged == null)
2337 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.NetworkFlightModeEnabled, s_networkFlightModeChangedCallback, IntPtr.Zero);
2338 if (ret != SystemSettingsError.None)
2340 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2343 s_networkFlightModeChanged += value;
2348 if (s_networkFlightModeChanged == null) {
2349 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2352 s_networkFlightModeChanged -= value;
2353 if (s_networkFlightModeChanged == null)
2355 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.NetworkFlightModeEnabled, s_networkFlightModeChangedCallback);
2356 if (ret != SystemSettingsError.None)
2358 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2364 private static readonly Interop.Settings.SystemSettingsChangedCallback s_screenBacklightTimeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2366 int screenBacklightTime = SystemSettings.ScreenBacklightTime;
2367 ScreenBacklightTimeChangedEventArgs eventArgs = new ScreenBacklightTimeChangedEventArgs(screenBacklightTime);
2368 s_screenBacklightTimeChanged?.Invoke(null, eventArgs);
2370 private static event EventHandler<ScreenBacklightTimeChangedEventArgs> s_screenBacklightTimeChanged;
2372 /// THe ScreenBacklightTimeChanged event is triggered when the backlight time is changed.
2374 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2375 /// <privlevel>platform</privlevel>
2376 /// <feature>http://tizen.org/feature/systemsetting</feature>
2377 /// <exception cref="ArgumentException">Invalid Argument</exception>
2378 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2379 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2380 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2381 /// <since_tizen> 3 </since_tizen>
2382 public static event EventHandler<ScreenBacklightTimeChangedEventArgs> ScreenBacklightTimeChanged
2386 if (s_screenBacklightTimeChanged == null)
2388 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.ScreenBacklightTime, s_screenBacklightTimeChangedCallback, IntPtr.Zero);
2389 if (ret != SystemSettingsError.None)
2391 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2394 s_screenBacklightTimeChanged += value;
2399 if (s_screenBacklightTimeChanged == null) {
2400 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2403 s_screenBacklightTimeChanged -= value;
2404 if (s_screenBacklightTimeChanged == null)
2406 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.ScreenBacklightTime, s_screenBacklightTimeChangedCallback);
2407 if (ret != SystemSettingsError.None)
2409 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2415 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundNotificationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2417 string soundNotification = SystemSettings.SoundNotification;
2418 SoundNotificationChangedEventArgs eventArgs = new SoundNotificationChangedEventArgs(soundNotification);
2419 s_soundNotificationChanged?.Invoke(null, eventArgs);
2421 private static event EventHandler<SoundNotificationChangedEventArgs> s_soundNotificationChanged;
2423 /// The SoundNotificationChanged event is triggered when the file path of the current notification tone set by the user is changed.
2425 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2426 /// <privlevel>platform</privlevel>
2427 /// <feature>http://tizen.org/feature/systemsetting</feature>
2428 /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
2429 /// <exception cref="ArgumentException">Invalid Argument</exception>
2430 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2431 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2432 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2433 /// <since_tizen> 3 </since_tizen>
2434 public static event EventHandler<SoundNotificationChangedEventArgs> SoundNotificationChanged
2438 if (s_soundNotificationChanged == null)
2440 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundNotification, s_soundNotificationChangedCallback, IntPtr.Zero);
2441 if (ret != SystemSettingsError.None)
2443 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2446 s_soundNotificationChanged += value;
2451 if (s_soundNotificationChanged == null) {
2452 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2455 s_soundNotificationChanged -= value;
2456 if (s_soundNotificationChanged == null)
2458 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundNotification, s_soundNotificationChangedCallback);
2459 if (ret != SystemSettingsError.None)
2461 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2467 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundNotificationRepetitionPeriodChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2469 int soundNotificationRepetitionPeriod = SystemSettings.SoundNotificationRepetitionPeriod;
2470 SoundNotificationRepetitionPeriodChangedEventArgs eventArgs = new SoundNotificationRepetitionPeriodChangedEventArgs(soundNotificationRepetitionPeriod);
2471 s_soundNotificationRepetitionPeriodChanged?.Invoke(null, eventArgs);
2473 private static event EventHandler<SoundNotificationRepetitionPeriodChangedEventArgs> s_soundNotificationRepetitionPeriodChanged;
2475 /// The SoundNotificationRepetitionPeriodChanged event is triggered when the time period for notification repetitions is changed.
2477 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2478 /// <privlevel>platform</privlevel>
2479 /// <feature>http://tizen.org/feature/systemsetting</feature>
2480 /// <exception cref="ArgumentException">Invalid Argument</exception>
2481 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2482 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2483 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2484 /// <since_tizen> 3 </since_tizen>
2485 public static event EventHandler<SoundNotificationRepetitionPeriodChangedEventArgs> SoundNotificationRepetitionPeriodChanged
2489 if (s_soundNotificationRepetitionPeriodChanged == null)
2491 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundNotificationRepetitionPeriod, s_soundNotificationRepetitionPeriodChangedCallback, IntPtr.Zero);
2492 if (ret != SystemSettingsError.None)
2494 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2497 s_soundNotificationRepetitionPeriodChanged += value;
2502 if (s_soundNotificationRepetitionPeriodChanged == null) {
2503 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2506 s_soundNotificationRepetitionPeriodChanged -= value;
2507 if (s_soundNotificationRepetitionPeriodChanged == null)
2509 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundNotificationRepetitionPeriod, s_soundNotificationRepetitionPeriodChangedCallback);
2510 if (ret != SystemSettingsError.None)
2512 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2518 private static readonly Interop.Settings.SystemSettingsChangedCallback s_lockStateChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2520 SystemSettingsIdleLockState lockState = SystemSettings.LockState;
2521 LockStateChangedEventArgs eventArgs = new LockStateChangedEventArgs(lockState);
2522 s_lockStateChanged?.Invoke(null, eventArgs);
2524 private static event EventHandler<LockStateChangedEventArgs> s_lockStateChanged;
2526 /// The LockStateChanged event is triggered when the current lock state is changed.
2528 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2529 /// <privlevel>platform</privlevel>
2530 /// <feature>http://tizen.org/feature/systemsetting</feature>
2531 /// <exception cref="ArgumentException">Invalid Argument</exception>
2532 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2533 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2534 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2535 /// <since_tizen> 3 </since_tizen>
2536 public static event EventHandler<LockStateChangedEventArgs> LockStateChanged
2540 if (s_lockStateChanged == null)
2542 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LockState, s_lockStateChangedCallback, IntPtr.Zero);
2543 if (ret != SystemSettingsError.None)
2545 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2548 s_lockStateChanged += value;
2553 if (s_lockStateChanged == null) {
2554 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2557 s_lockStateChanged -= value;
2558 if (s_lockStateChanged == null)
2560 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LockState, s_lockStateChangedCallback);
2561 if (ret != SystemSettingsError.None)
2563 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2569 private static readonly Interop.Settings.SystemSettingsChangedCallback s_adsIdChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2571 string adsId = SystemSettings.AdsId;
2572 AdsIdChangedEventArgs eventArgs = new AdsIdChangedEventArgs(adsId);
2573 s_adsIdChanged?.Invoke(null, eventArgs);
2575 private static event EventHandler<AdsIdChangedEventArgs> s_adsIdChanged;
2577 /// The AdsIdChanged event is triggered when the current ADS ID state is changed.
2579 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2580 /// <privlevel>platform</privlevel>
2581 /// <feature>http://tizen.org/feature/systemsetting</feature>
2582 /// <exception cref="ArgumentException">Invalid Argument</exception>
2583 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2584 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2585 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2586 /// <since_tizen> 3 </since_tizen>
2587 public static event EventHandler<AdsIdChangedEventArgs> AdsIdChanged
2591 if (s_adsIdChanged == null)
2593 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AdsId, s_adsIdChangedCallback, IntPtr.Zero);
2594 if (ret != SystemSettingsError.None)
2596 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2599 s_adsIdChanged += value;
2604 if (s_adsIdChanged == null) {
2605 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2608 s_adsIdChanged -= value;
2609 if (s_adsIdChanged == null)
2611 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AdsId, s_adsIdChangedCallback);
2612 if (ret != SystemSettingsError.None)
2614 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2620 private static readonly Interop.Settings.SystemSettingsChangedCallback s_ultraDataSaveChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2622 SystemSettingsUdsState ultraDataSave = SystemSettings.UltraDataSave;
2623 UltraDataSaveChangedEventArgs eventArgs = new UltraDataSaveChangedEventArgs(ultraDataSave);
2624 s_ultraDataSaveChanged?.Invoke(null, eventArgs);
2626 private static event EventHandler<UltraDataSaveChangedEventArgs> s_ultraDataSaveChanged;
2628 /// The UltraDataSaveChanged event is triggered when the current Ultra Data Save state is changed.
2630 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2631 /// <privlevel>platform</privlevel>
2632 /// <feature>http://tizen.org/feature/systemsetting</feature>
2633 /// <feature>http://tizen.org/feature/network.telephony</feature>
2634 /// <exception cref="ArgumentException">Invalid Argument</exception>
2635 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2636 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2637 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2638 /// <since_tizen> 3 </since_tizen>
2639 public static event EventHandler<UltraDataSaveChangedEventArgs> UltraDataSaveChanged
2643 if (s_ultraDataSaveChanged == null)
2645 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UltraDataSave, s_ultraDataSaveChangedCallback, IntPtr.Zero);
2646 if (ret != SystemSettingsError.None)
2648 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2651 s_ultraDataSaveChanged += value;
2656 if (s_ultraDataSaveChanged == null) {
2657 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2660 s_ultraDataSaveChanged -= value;
2661 if (s_ultraDataSaveChanged == null)
2663 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UltraDataSave, s_ultraDataSaveChangedCallback);
2664 if (ret != SystemSettingsError.None)
2666 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2672 private static readonly Interop.Settings.SystemSettingsChangedCallback s_ultraDataSavePackageListChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2674 string ultraDataSavePackageList = "None";
2675 UltraDataSavePackageListChangedEventArgs eventArgs = new UltraDataSavePackageListChangedEventArgs(ultraDataSavePackageList);
2676 s_ultraDataSavePackageListChanged?.Invoke(null, eventArgs);
2678 private static event EventHandler<UltraDataSavePackageListChangedEventArgs> s_ultraDataSavePackageListChanged;
2680 /// The UltraDataSavePackageListChanged event is triggered when the current ADS ID state is changed.
2682 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2683 /// <privlevel>platform</privlevel>
2684 /// <feature>http://tizen.org/feature/systemsetting</feature>
2685 /// <feature>http://tizen.org/feature/network.telephony</feature>
2686 /// <exception cref="ArgumentException">Invalid Argument</exception>
2687 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2688 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2689 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2690 /// <since_tizen> 3 </since_tizen>
2691 public static event EventHandler<UltraDataSavePackageListChangedEventArgs> UltraDataSavePackageListChanged
2695 if (s_ultraDataSavePackageListChanged == null)
2697 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UltraDataSavePackageList, s_ultraDataSavePackageListChangedCallback, IntPtr.Zero);
2698 if (ret != SystemSettingsError.None)
2700 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2703 s_ultraDataSavePackageListChanged += value;
2708 if (s_ultraDataSavePackageListChanged == null) {
2709 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2712 s_ultraDataSavePackageListChanged -= value;
2713 if (s_ultraDataSavePackageListChanged == null)
2715 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UltraDataSavePackageList, s_ultraDataSavePackageListChangedCallback);
2716 if (ret != SystemSettingsError.None)
2718 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2724 private static readonly Interop.Settings.SystemSettingsChangedCallback s_accessibilityTtsChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2726 bool accessibilityTts = SystemSettings.AccessibilityTtsEnabled;
2727 AccessibilityTtsSettingChangedEventArgs eventArgs = new AccessibilityTtsSettingChangedEventArgs(accessibilityTts);
2728 s_accessibilityTtsChanged?.Invoke(null, eventArgs);
2730 private static event EventHandler<AccessibilityTtsSettingChangedEventArgs> s_accessibilityTtsChanged;
2732 /// THe AccessibilityTtsChanged event is triggered when the screen touch sound enabled status is changed.
2734 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2735 /// <privlevel>platform</privlevel>
2736 /// <feature>http://tizen.org/feature/systemsetting</feature>
2737 /// <exception cref="ArgumentException">Invalid Argument</exception>
2738 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2739 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2740 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2741 /// <since_tizen> 4 </since_tizen>
2742 public static event EventHandler<AccessibilityTtsSettingChangedEventArgs> AccessibilityTtsSettingChanged
2746 if (s_accessibilityTtsChanged == null)
2748 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AccessibilityTtsEnabled, s_accessibilityTtsChangedCallback, IntPtr.Zero);
2749 if (ret != SystemSettingsError.None)
2751 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2754 s_accessibilityTtsChanged += value;
2759 if (s_accessibilityTtsChanged == null) {
2760 Tizen.Log.Info("Tizen.System.SystemSettings","There is no event handler");
2763 s_accessibilityTtsChanged -= value;
2764 if (s_accessibilityTtsChanged == null)
2767 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AccessibilityTtsEnabled, s_accessibilityTtsChangedCallback);
2768 if (ret != SystemSettingsError.None)
2770 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2776 private static readonly Interop.Settings.SystemSettingsChangedCallback s_vibrationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2778 bool vibration = SystemSettings.Vibration;
2779 VibrationChangedEventArgs eventArgs = new VibrationChangedEventArgs(vibration);
2780 s_vibrationChanged?.Invoke(null, eventArgs);
2782 private static event EventHandler<VibrationChangedEventArgs> s_vibrationChanged;
2784 /// The VibrationChanged event is triggered when the vibration value is changed.
2786 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2787 /// <privlevel>platform</privlevel>
2788 /// <feature>http://tizen.org/feature/systemsetting</feature>
2789 /// <exception cref="ArgumentException">Invalid Argument</exception>
2790 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2791 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2792 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2793 /// <since_tizen> 5 </since_tizen>
2794 public static event EventHandler<VibrationChangedEventArgs> VibrationChanged
2798 if (s_vibrationChanged == null)
2800 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Vibration, s_vibrationChangedCallback, IntPtr.Zero);
2801 if (ret != SystemSettingsError.None)
2803 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2806 s_vibrationChanged += value;
2811 s_vibrationChanged -= value;
2812 if (s_vibrationChanged == null)
2814 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Vibration, s_vibrationChangedCallback);
2815 if (ret != SystemSettingsError.None)
2817 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2823 private static readonly Interop.Settings.SystemSettingsChangedCallback s_automaticTimeUpdateChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2825 bool automaticTimeUpdate = SystemSettings.AutomaticTimeUpdate;
2826 AutomaticTimeUpdateChangedEventArgs eventArgs = new AutomaticTimeUpdateChangedEventArgs(automaticTimeUpdate);
2827 s_automaticTimeUpdateChanged?.Invoke(null, eventArgs);
2829 private static event EventHandler<AutomaticTimeUpdateChangedEventArgs> s_automaticTimeUpdateChanged;
2831 /// The AutomaticTimeUpdateChanged event is triggered when the AutomaticTimeUpdate value is changed.
2833 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2834 /// <privlevel>platform</privlevel>
2835 /// <feature>http://tizen.org/feature/systemsetting</feature>
2836 /// <exception cref="ArgumentException">Invalid Argument</exception>
2837 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2838 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2839 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2840 /// <since_tizen> 5 </since_tizen>
2841 public static event EventHandler<AutomaticTimeUpdateChangedEventArgs> AutomaticTimeUpdateChanged
2845 if (s_automaticTimeUpdateChanged == null)
2847 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AutomaticTimeUpdate, s_automaticTimeUpdateChangedCallback, IntPtr.Zero);
2848 if (ret != SystemSettingsError.None)
2850 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2853 s_automaticTimeUpdateChanged += value;
2858 s_automaticTimeUpdateChanged -= value;
2859 if (s_automaticTimeUpdateChanged == null)
2861 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AutomaticTimeUpdate, s_automaticTimeUpdateChangedCallback);
2862 if (ret != SystemSettingsError.None)
2864 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2870 private static readonly Interop.Settings.SystemSettingsChangedCallback s_developerOptionStateChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2872 bool developerOptionState = SystemSettings.DeveloperOptionState;
2873 DeveloperOptionStateChangedEventArgs eventArgs = new DeveloperOptionStateChangedEventArgs(developerOptionState);
2874 s_developerOptionStateChanged?.Invoke(null, eventArgs);
2876 private static event EventHandler<DeveloperOptionStateChangedEventArgs> s_developerOptionStateChanged;
2878 /// The DeveloperOptionStateChanged event is triggered when the DeveloperOptionState value is changed.
2880 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2881 /// <privlevel>platform</privlevel>
2882 /// <feature>http://tizen.org/feature/systemsetting</feature>
2883 /// <exception cref="ArgumentException">Invalid Argument</exception>
2884 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2885 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2886 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2887 /// <since_tizen> 5 </since_tizen>
2888 public static event EventHandler<DeveloperOptionStateChangedEventArgs> DeveloperOptionStateChanged
2892 if (s_developerOptionStateChanged == null)
2894 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DeveloperOptionState, s_developerOptionStateChangedCallback, IntPtr.Zero);
2895 if (ret != SystemSettingsError.None)
2897 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2900 s_developerOptionStateChanged += value;
2905 s_developerOptionStateChanged -= value;
2906 if (s_developerOptionStateChanged == null)
2908 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DeveloperOptionState, s_developerOptionStateChangedCallback);
2909 if (ret != SystemSettingsError.None)
2911 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2917 private static readonly Interop.Settings.SystemSettingsChangedCallback s_accessibilityGrayscaleChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2919 bool accessibilityGrayscale = SystemSettings.AccessibilityGrayscale;
2920 AccessibilityGrayscaleChangedEventArgs eventArgs = new AccessibilityGrayscaleChangedEventArgs(accessibilityGrayscale);
2921 s_accessibilityGrayscaleChanged?.Invoke(null, eventArgs);
2923 private static event EventHandler<AccessibilityGrayscaleChangedEventArgs> s_accessibilityGrayscaleChanged;
2925 /// The AccessibilityGrayscaleChanged event is triggered when the AccessibilityGrayscale value is changed.
2927 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2928 /// <privlevel>platform</privlevel>
2929 /// <feature>http://tizen.org/feature/systemsetting</feature>
2930 /// <feature>http://tizen.org/feature/accessibility.grayscale</feature>
2931 /// <exception cref="ArgumentException">Invalid Argument</exception>
2932 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2933 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2934 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2935 /// <since_tizen> 6 </since_tizen>
2936 public static event EventHandler<AccessibilityGrayscaleChangedEventArgs> AccessibilityGrayscaleChanged
2940 if (s_accessibilityGrayscaleChanged == null)
2942 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AccessibilityGrayscale, s_accessibilityGrayscaleChangedCallback, IntPtr.Zero);
2943 if (ret != SystemSettingsError.None)
2945 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2948 s_accessibilityGrayscaleChanged += value;
2953 s_accessibilityGrayscaleChanged -= value;
2954 if (s_accessibilityGrayscaleChanged == null)
2956 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AccessibilityGrayscale, s_accessibilityGrayscaleChangedCallback);
2957 if (ret != SystemSettingsError.None)
2959 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2965 private static readonly Interop.Settings.SystemSettingsChangedCallback s_accessibilityNegativeColorChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2967 bool accessibilityNegativeColor = SystemSettings.AccessibilityNegativeColor;
2968 AccessibilityNegativeColorChangedEventArgs eventArgs = new AccessibilityNegativeColorChangedEventArgs(accessibilityNegativeColor);
2969 s_accessibilityNegativeColorChanged?.Invoke(null, eventArgs);
2971 private static event EventHandler<AccessibilityNegativeColorChangedEventArgs> s_accessibilityNegativeColorChanged;
2973 /// The AccessibilityNegativeColorChanged event is triggered when the AccessibilityNegativeColor value is changed.
2975 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2976 /// <privlevel>platform</privlevel>
2977 /// <feature>http://tizen.org/feature/systemsetting</feature>
2978 /// <feature>http://tizen.org/feature/accessibility.negative</feature>
2979 /// <exception cref="ArgumentException">Invalid Argument</exception>
2980 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2981 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2982 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2983 /// <since_tizen> 6 </since_tizen>
2984 public static event EventHandler<AccessibilityNegativeColorChangedEventArgs> AccessibilityNegativeColorChanged
2988 if (s_accessibilityNegativeColorChanged == null)
2990 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AccessibilityNegativeColor, s_accessibilityNegativeColorChangedCallback, IntPtr.Zero);
2991 if (ret != SystemSettingsError.None)
2993 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2996 s_accessibilityNegativeColorChanged += value;
3001 s_accessibilityNegativeColorChanged -= value;
3002 if (s_accessibilityNegativeColorChanged == null)
3004 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AccessibilityNegativeColor, s_accessibilityNegativeColorChangedCallback);
3005 if (ret != SystemSettingsError.None)
3007 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
3013 private static readonly Interop.Settings.SystemSettingsChangedCallback s_rotaryEventEnabledChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
3015 bool rotaryEventEnabled = SystemSettings.RotaryEventEnabled;
3016 RotaryEventEnabledChangedEventArgs eventArgs = new RotaryEventEnabledChangedEventArgs(rotaryEventEnabled);
3017 s_rotaryEventEnabledChanged?.Invoke(null, eventArgs);
3019 private static event EventHandler<RotaryEventEnabledChangedEventArgs> s_rotaryEventEnabledChanged;
3021 /// The RotaryEventEnabledChanged event is triggered when the RotaryEventEnabled value is changed.
3023 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
3024 /// <privlevel>platform</privlevel>
3025 /// <feature>http://tizen.org/feature/systemsetting</feature>
3026 /// <exception cref="NotSupportedException">Not Supported feature</exception>
3027 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
3029 /// http://tizen.org/privilege/systemsettings.admin is needed only for setting value. When getting the value, it isn't needed.
3031 /// <since_tizen> 6 </since_tizen>
3032 public static event EventHandler<RotaryEventEnabledChangedEventArgs> RotaryEventEnabledChanged
3036 if (s_rotaryEventEnabledChanged == null)
3038 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.RotaryEventEnabled, s_rotaryEventEnabledChangedCallback, IntPtr.Zero);
3039 if (ret != SystemSettingsError.None)
3041 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
3044 s_rotaryEventEnabledChanged += value;
3049 s_rotaryEventEnabledChanged -= value;
3050 if (s_rotaryEventEnabledChanged == null)
3052 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.RotaryEventEnabled, s_rotaryEventEnabledChangedCallback);
3053 if (ret != SystemSettingsError.None)
3055 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");