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 public static class SystemSettings
31 /// The file path of the current ringtone.
33 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
34 /// <privlevel>platform</privlevel>
35 /// <feature>http://tizen.org/feature/systemsetting</feature>
36 /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
37 /// <exception cref="ArgumentException">Invalid Argument</exception>
38 /// <exception cref="NotSupportedException">Not Supported feature</exception>
39 /// <exception cref="InvalidOperationException">Invalid operation</exception>
40 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
41 public static string IncomingCallRingtone
46 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.IncomingCallRingtone, out filePath);
47 if (res != SystemSettingsError.None)
49 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get IncomingCallRingtone system setting.");
55 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.IncomingCallRingtone, value);
56 if (res != SystemSettingsError.None)
58 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set IncomingCallRingtone system setting.");
64 /// The file path of the current home-screen wallpaper.
66 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
67 /// <privlevel>platform</privlevel>
68 /// <feature>http://tizen.org/feature/systemsetting</feature>
69 /// <feature>http://tizen.org/feature/systemsetting.home_screen</feature>
70 /// <exception cref="ArgumentException">Invalid Argument</exception>
71 /// <exception cref="NotSupportedException">Not Supported feature</exception>
72 /// <exception cref="InvalidOperationException">Invalid operation</exception>
73 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
74 public static string WallpaperHomeScreen
79 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.WallpaperHomeScreen, out filePath);
80 if (res != SystemSettingsError.None)
82 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get WallpaperHomeScreen system setting.");
88 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.WallpaperHomeScreen, value);
89 if (res != SystemSettingsError.None)
91 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set WallpaperHomeScreen system setting.");
97 /// The file path of the current lock-screen wallpaper.
99 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
100 /// <privlevel>platform</privlevel>
101 /// <feature>http://tizen.org/feature/systemsetting</feature>
102 /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
103 /// <exception cref="ArgumentException">Invalid Argument</exception>
104 /// <exception cref="NotSupportedException">Not Supported feature</exception>
105 /// <exception cref="InvalidOperationException">Invalid operation</exception>
106 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
107 public static string WallpaperLockScreen
112 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.WallpaperLockScreen, out filePath);
113 if (res != SystemSettingsError.None)
115 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get WallpaperLockScreen system setting.");
121 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.WallpaperLockScreen, value);
122 if (res != SystemSettingsError.None)
124 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set WallpaperLockScreen system setting.");
130 /// The current system font size.
132 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
133 /// <privlevel>platform</privlevel>
134 /// <feature>http://tizen.org/feature/systemsetting</feature>
135 /// <exception cref="ArgumentException">Invalid Argument</exception>
136 /// <exception cref="NotSupportedException">Not Supported feature</exception>
137 /// <exception cref="InvalidOperationException">Invalid operation</exception>
138 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
139 public static SystemSettingsFontSize FontSize
144 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.FontSize, out fontSize);
145 if (res != SystemSettingsError.None)
147 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get FontSize system setting.");
149 return (SystemSettingsFontSize)fontSize;
153 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueInt(SystemSettingsKeys.FontSize, (int)value);
154 if (res != SystemSettingsError.None)
156 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set FontSize system setting.");
162 /// The current system font type.
164 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
165 /// <privlevel>platform</privlevel>
166 /// <feature>http://tizen.org/feature/systemsetting</feature>
167 /// <exception cref="ArgumentException">Invalid Argument</exception>
168 /// <exception cref="NotSupportedException">Not Supported feature</exception>
169 /// <exception cref="InvalidOperationException">Invalid operation</exception>
170 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
171 public static string FontType
176 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.FontType, out fontType);
177 if (res != SystemSettingsError.None)
179 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get FontType system setting.");
185 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.FontType, value);
186 if (res != SystemSettingsError.None)
188 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set FontType system setting.");
194 /// Indicates whether the motion service is activated.
196 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
197 /// <privlevel>platform</privlevel>
198 /// <feature>http://tizen.org/feature/systemsetting</feature>
199 /// <exception cref="ArgumentException">Invalid Argument</exception>
200 /// <exception cref="NotSupportedException">Not Supported feature</exception>
201 /// <exception cref="InvalidOperationException">Invalid operation</exception>
202 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
203 public static bool MotionActivationEnabled
207 bool isMotionServiceActivated;
208 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.MotionActivationEnabled, out isMotionServiceActivated);
209 if (res != SystemSettingsError.None)
211 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get MotionActivation system setting.");
213 return isMotionServiceActivated;
217 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.MotionActivationEnabled, value);
218 if (res != SystemSettingsError.None)
220 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set MotionActivation system setting.");
226 /// The file path of the current email alert ringtone.
228 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
229 /// <privlevel>platform</privlevel>
230 /// <feature>http://tizen.org/feature/systemsetting</feature>
231 /// <feature>http://tizen.org/feature/systemsetting.notification_email</feature>
232 /// <exception cref="ArgumentException">Invalid Argument</exception>
233 /// <exception cref="NotSupportedException">Not Supported feature</exception>
234 /// <exception cref="InvalidOperationException">Invalid operation</exception>
235 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
236 public static string EmailAlertRingtone
241 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.EmailAlertRingtone, out filePath);
242 if (res != SystemSettingsError.None)
244 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get EmailAlertRingtone system setting.");
250 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.EmailAlertRingtone, value);
251 if (res != SystemSettingsError.None)
253 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set EmailAlertRingtone system setting.");
258 /// Indicates whether the USB debugging is enabled.
260 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
261 /// <privlevel>platform</privlevel>
262 /// <feature>http://tizen.org/feature/systemsetting</feature>
263 /// <exception cref="ArgumentException">Invalid Argument</exception>
264 /// <exception cref="NotSupportedException">Not Supported feature</exception>
265 /// <exception cref="InvalidOperationException">Invalid operation</exception>
266 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
267 public static bool UsbDebuggingEnabled
271 bool isusbDebuggingEnabled;
272 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.UsbDebuggingEnabled, out isusbDebuggingEnabled);
273 if (res != SystemSettingsError.None)
275 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get UsbDebuggingEnabled system setting.");
277 return isusbDebuggingEnabled;
281 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.UsbDebuggingEnabled, value);
282 if (res != SystemSettingsError.None)
284 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set UsbDebuggingEnabled system setting.");
290 /// Indicates whether the 3G data network is enabled.
292 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
293 /// <privlevel>platform</privlevel>
294 /// <feature>http://tizen.org/feature/systemsetting</feature>
295 /// <exception cref="ArgumentException">Invalid Argument</exception>
296 /// <exception cref="NotSupportedException">Not Supported feature</exception>
297 /// <exception cref="InvalidOperationException">Invalid operation</exception>
298 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
299 public static bool Data3GNetworkEnabled
303 bool is3GDataEnabled;
304 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.Data3GNetworkEnabled, out is3GDataEnabled);
305 if (res != SystemSettingsError.None)
307 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get Data3GNetworkEnabled system setting.");
309 return is3GDataEnabled;
313 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.Data3GNetworkEnabled, value);
314 if (res != SystemSettingsError.None)
316 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set Data3GNetworkEnabled system setting.");
322 /// Indicates the lock-screen application package name.
324 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
325 /// <privlevel>platform</privlevel>
326 /// <feature>http://tizen.org/feature/systemsetting</feature>
327 /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
328 /// <exception cref="ArgumentException">Invalid Argument</exception>
329 /// <exception cref="NotSupportedException">Not Supported feature</exception>
330 /// <exception cref="InvalidOperationException">Invalid operation</exception>
331 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
332 public static string LockScreenApp
337 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LockScreenApp, out pkgName);
338 if (res != SystemSettingsError.None)
340 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LockScreenApp system setting.");
346 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.LockScreenApp, value);
347 if (res != SystemSettingsError.None)
349 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LockScreenApp system setting.");
355 /// The current system default font type (only supports Get).
357 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
358 /// <privlevel>platform</privlevel>
359 /// <feature>http://tizen.org/feature/systemsetting</feature>
360 /// <exception cref="ArgumentException">Invalid Argument</exception>
361 /// <exception cref="NotSupportedException">Not Supported feature</exception>
362 /// <exception cref="InvalidOperationException">Invalid operation</exception>
363 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
364 public static string DefaultFontType
368 string defaultFontType;
369 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.DefaultFontType, out defaultFontType);
370 if (res != SystemSettingsError.None)
372 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get DefaultFontType system setting value.");
374 return defaultFontType;
379 /// Indicates the current country setting in the <LANGUAGE>_<REGION> syntax.
380 /// The country setting is in the ISO 639-2 format,
381 /// and the region setting is in the ISO 3166-1 alpha-2 format.
383 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
384 /// <privlevel>platform</privlevel>
385 /// <feature>http://tizen.org/feature/systemsetting</feature>
386 /// <exception cref="ArgumentException">Invalid Argument</exception>
387 /// <exception cref="NotSupportedException">Not Supported feature</exception>
388 /// <exception cref="InvalidOperationException">Invalid operation</exception>
389 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
390 public static string LocaleCountry
394 string countrySetting;
395 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LocaleCountry, out countrySetting);
396 if (res != SystemSettingsError.None)
398 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleCountry system setting.");
400 return countrySetting;
404 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.LocaleCountry, value);
405 if (res != SystemSettingsError.None)
407 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleCountry system setting.");
413 /// Indicates the current language setting in the <LANGUAGE>_<REGION> syntax.
414 /// The language setting is in the ISO 639-2 format,
415 /// and the region setting is in the ISO 3166-1 alpha-2 format.
417 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
418 /// <privlevel>platform</privlevel>
419 /// <feature>http://tizen.org/feature/systemsetting</feature>
420 /// <exception cref="ArgumentException">Invalid Argument</exception>
421 /// <exception cref="NotSupportedException">Not Supported feature</exception>
422 /// <exception cref="InvalidOperationException">Invalid operation</exception>
423 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
424 public static string LocaleLanguage
428 string languageSetting;
429 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LocaleLanguage, out languageSetting);
430 if (res != SystemSettingsError.None)
432 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleLanguage system setting.");
434 return languageSetting;
438 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.LocaleLanguage, value);
439 if (res != SystemSettingsError.None)
441 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleLanguage system setting.");
447 /// Indicates whether the 24-hour clock is used.
448 /// If the value is false, the 12-hour clock is used.
450 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
451 /// <privlevel>platform</privlevel>
452 /// <feature>http://tizen.org/feature/systemsetting</feature>
453 /// <exception cref="ArgumentException">Invalid Argument</exception>
454 /// <exception cref="NotSupportedException">Not Supported feature</exception>
455 /// <exception cref="InvalidOperationException">Invalid operation</exception>
456 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
457 public static bool LocaleTimeFormat24HourEnabled
462 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, out is24HrFormat);
463 if (res != SystemSettingsError.None)
465 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleTimeFormat24Hour system setting.");
471 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, value);
472 if (res != SystemSettingsError.None)
474 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleTimeFormat24Hour system setting.");
480 /// Indicates the current time zone, for example, Pacific/Tahiti.
482 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
483 /// <privlevel>platform</privlevel>
484 /// <feature>http://tizen.org/feature/systemsetting</feature>
485 /// <exception cref="ArgumentException">Invalid Argument</exception>
486 /// <exception cref="NotSupportedException">Not Supported feature</exception>
487 /// <exception cref="InvalidOperationException">Invalid operation</exception>
488 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
489 public static string LocaleTimeZone
494 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LocaleTimeZone, out timeZone);
495 if (res != SystemSettingsError.None)
497 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LocaleTimeZone system setting.");
503 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.LocaleTimeZone, value);
504 if (res != SystemSettingsError.None)
506 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleTimeZone system setting.");
512 /// Once the system changes time, this event occurs to notify the time change.
514 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
515 /// <privlevel>platform</privlevel>
516 /// <feature>http://tizen.org/feature/systemsetting</feature>
517 /// <exception cref="ArgumentException">Invalid Argument</exception>
518 /// <exception cref="NotSupportedException">Not Supported feature</exception>
519 /// <exception cref="InvalidOperationException">Invalid operation</exception>
520 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
521 public static int Time
526 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.Time, out time);
527 if (res != SystemSettingsError.None)
529 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get Time system setting.");
535 /// Indicates whether the screen lock sound is enabled on the device, for example, the LCD on or off sound.
537 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
538 /// <privlevel>platform</privlevel>
539 /// <feature>http://tizen.org/feature/systemsetting</feature>
540 /// <exception cref="ArgumentException">Invalid Argument</exception>
541 /// <exception cref="NotSupportedException">Not Supported feature</exception>
542 /// <exception cref="InvalidOperationException">Invalid operation</exception>
543 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
544 public static bool SoundLockEnabled
548 bool isSoundLockEnabled;
549 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundLockEnabled, out isSoundLockEnabled);
550 if (res != SystemSettingsError.None)
552 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundLock system setting.");
554 return isSoundLockEnabled;
559 /// Indicates whether the device is in the silent mode.
561 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
562 /// <privlevel>platform</privlevel>
563 /// <feature>http://tizen.org/feature/systemsetting</feature>
564 /// <exception cref="ArgumentException">Invalid Argument</exception>
565 /// <exception cref="NotSupportedException">Not Supported feature</exception>
566 /// <exception cref="InvalidOperationException">Invalid operation</exception>
567 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
568 public static bool SoundSilentModeEnabled
573 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundSilentModeEnabled, out isSilent);
574 if (res != SystemSettingsError.None)
576 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundSilentMode system setting.");
583 /// Indicates whether the screen touch sound is enabled on the device.
585 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
586 /// <privlevel>platform</privlevel>
587 /// <feature>http://tizen.org/feature/systemsetting</feature>
588 /// <exception cref="ArgumentException">Invalid Argument</exception>
589 /// <exception cref="NotSupportedException">Not Supported feature</exception>
590 /// <exception cref="InvalidOperationException">Invalid operation</exception>
591 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
592 public static bool SoundTouchEnabled
596 bool isTouchSoundEnabled;
597 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundTouchEnabled, out isTouchSoundEnabled);
598 if (res != SystemSettingsError.None)
600 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundTouch system setting value.");
602 return isTouchSoundEnabled;
607 /// Indicates whether the rotation control is automatic.
609 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
610 /// <privlevel>platform</privlevel>
611 /// <feature>http://tizen.org/feature/systemsetting</feature>
612 /// <exception cref="ArgumentException">Invalid Argument</exception>
613 /// <exception cref="NotSupportedException">Not Supported feature</exception>
614 /// <exception cref="InvalidOperationException">Invalid operation</exception>
615 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
616 public static bool DisplayScreenRotationAutoEnabled
620 bool isRotationAutomatic;
621 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, out isRotationAutomatic);
622 if (res != SystemSettingsError.None)
624 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get DisplayScreenRotationAuto system setting.");
626 return isRotationAutomatic;
631 /// Indicates the device name.
633 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
634 /// <privlevel>platform</privlevel>
635 /// <feature>http://tizen.org/feature/systemsetting</feature>
636 /// <exception cref="ArgumentException">Invalid Argument</exception>
637 /// <exception cref="NotSupportedException">Not Supported feature</exception>
638 /// <exception cref="InvalidOperationException">Invalid operation</exception>
639 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
640 public static string DeviceName
645 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.DeviceName, out deviceName);
646 if (res != SystemSettingsError.None)
648 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get DeviceName system setting value.");
654 /// Indicates whether the device user has enabled the motion feature.
656 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
657 /// <privlevel>platform</privlevel>
658 /// <feature>http://tizen.org/feature/systemsetting</feature>
659 /// <exception cref="ArgumentException">Invalid Argument</exception>
660 /// <exception cref="NotSupportedException">Not Supported feature</exception>
661 /// <exception cref="InvalidOperationException">Invalid operation</exception>
662 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
663 public static bool MotionEnabled
667 bool isMotionEnabled;
668 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.MotionEnabled, out isMotionEnabled);
669 if (res != SystemSettingsError.None)
671 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get MotionEnabled system setting value.");
673 return isMotionEnabled;
678 /// Indicates whether Wi-Fi related notifications are enabled on the device.
680 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
681 /// <privlevel>platform</privlevel>
682 /// <feature>http://tizen.org/feature/systemsetting</feature>
683 /// <feature>http://tizen.org/feature/network.wifi</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 public static bool NetworkWifiNotificationEnabled
692 bool isWifiNotificationEnabled;
693 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.NetworkWifiNotificationEnabled, out isWifiNotificationEnabled);
694 if (res != SystemSettingsError.None)
696 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get NetworkWifiNotification system setting.");
698 return isWifiNotificationEnabled;
703 /// Indicates whether the device is in the flight mode.
705 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
706 /// <privlevel>platform</privlevel>
707 /// <feature>http://tizen.org/feature/systemsetting</feature>
708 /// <exception cref="ArgumentException">Invalid Argument</exception>
709 /// <exception cref="NotSupportedException">Not Supported feature</exception>
710 /// <exception cref="InvalidOperationException">Invalid operation</exception>
711 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
712 public static bool NetworkFlightModeEnabled
716 bool isFlightModeEnabled;
717 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.NetworkFlightModeEnabled, out isFlightModeEnabled);
718 if (res != SystemSettingsError.None)
720 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get NetworkFlightMode system setting.");
722 return isFlightModeEnabled;
727 /// Indicates the backlight time (in seconds). The following values can be used: 15, 30, 60, 120, 300, and 600.
729 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
730 /// <privlevel>platform</privlevel>
731 /// <feature>http://tizen.org/feature/systemsetting</feature>
732 /// <exception cref="ArgumentException">Invalid Argument</exception>
733 /// <exception cref="NotSupportedException">Not Supported feature</exception>
734 /// <exception cref="InvalidOperationException">Invalid operation</exception>
735 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
736 public static int ScreenBacklightTime
741 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.ScreenBacklightTime, out backlightTime);
742 if (res != SystemSettingsError.None)
744 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get ScreenBacklightTime system setting.");
746 return backlightTime;
750 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueInt(SystemSettingsKeys.ScreenBacklightTime, value);
751 if (res != SystemSettingsError.None)
753 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set ScreenBacklightTime system setting.");
759 /// Indicates the file path of the current notification tone set by the user.
761 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
762 /// <privlevel>platform</privlevel>
763 /// <feature>http://tizen.org/feature/systemsetting</feature>
764 /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
765 /// <exception cref="ArgumentException">Invalid Argument</exception>
766 /// <exception cref="NotSupportedException">Not Supported feature</exception>
767 /// <exception cref="InvalidOperationException">Invalid operation</exception>
768 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
769 public static string SoundNotification
774 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.SoundNotification, out filePath);
775 if (res != SystemSettingsError.None)
777 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundNotification system setting.");
783 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.SoundNotification, value);
784 if (res != SystemSettingsError.None)
786 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set SoundNotification system setting.");
792 /// Indicates the time period for notification repetitions.
794 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
795 /// <privlevel>platform</privlevel>
796 /// <feature>http://tizen.org/feature/systemsetting</feature>
797 /// <exception cref="ArgumentException">Invalid Argument</exception>
798 /// <exception cref="NotSupportedException">Not Supported feature</exception>
799 /// <exception cref="InvalidOperationException">Invalid operation</exception>
800 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
801 public static int SoundNotificationRepetitionPeriod
805 int notificationRepetitionPeriod;
806 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.SoundNotificationRepetitionPeriod, out notificationRepetitionPeriod);
807 if (res != SystemSettingsError.None)
809 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get SoundNotificationRepetitionPeriod system setting.");
811 return notificationRepetitionPeriod;
815 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueInt(SystemSettingsKeys.SoundNotificationRepetitionPeriod, value);
816 if (res != SystemSettingsError.None)
818 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set SoundNotificationRepetitionPeriod system setting.");
824 /// Indicates the current lock state.
826 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
827 /// <privlevel>platform</privlevel>
828 /// <feature>http://tizen.org/feature/systemsetting</feature>
829 /// <exception cref="ArgumentException">Invalid Argument</exception>
830 /// <exception cref="NotSupportedException">Not Supported feature</exception>
831 /// <exception cref="InvalidOperationException">Invalid operation</exception>
832 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
833 public static SystemSettingsIdleLockState LockState
838 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.LockState, out LockState);
839 if (res != SystemSettingsError.None)
841 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get LockState system setting.");
843 return (SystemSettingsIdleLockState)LockState;
847 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueInt(SystemSettingsKeys.LockState, (int)value);
848 if (res != SystemSettingsError.None)
850 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LockState system setting.");
856 /// The current system ADS ID.
858 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
859 /// <privlevel>platform</privlevel>
860 /// <feature>http://tizen.org/feature/systemsetting</feature>
861 /// <exception cref="ArgumentException">Invalid Argument</exception>
862 /// <exception cref="NotSupportedException">Not Supported feature</exception>
863 /// <exception cref="InvalidOperationException">Invalid operation</exception>
864 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
865 public static string AdsId
870 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.AdsId, out adsId);
871 if (res != SystemSettingsError.None)
873 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get AdsId system setting.");
879 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.AdsId, value);
880 if (res != SystemSettingsError.None)
882 throw SystemSettingsExceptionFactory.CreateException(res, "unable to set AdsId system setting.");
889 /// Indicates the time period for notification repetitions.
891 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
892 /// <privlevel>platform</privlevel>
893 /// <feature>http://tizen.org/feature/systemsetting</feature>
894 /// <feature>http://tizen.org/feature/network.telephony</feature>
895 /// <exception cref="ArgumentException">Invalid Argument</exception>
896 /// <exception cref="NotSupportedException">Not Supported feature</exception>
897 /// <exception cref="InvalidOperationException">Invalid operation</exception>
898 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
899 public static SystemSettingsUdsState UltraDataSave
904 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.UltraDataSave, out UltraDataSave);
905 if (res != SystemSettingsError.None)
907 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get UltraDataSave system setting.");
909 return (SystemSettingsUdsState)UltraDataSave;
914 /// Indicates whether the accessibility TTS is enabled on the device.
916 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
917 /// <privlevel>platform</privlevel>
918 /// <feature>http://tizen.org/feature/systemsetting</feature>
919 /// <exception cref="ArgumentException">Invalid Argument</exception>
920 /// <exception cref="NotSupportedException">Not Supported feature</exception>
921 /// <exception cref="InvalidOperationException">Invalid operation</exception>
922 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
923 public static bool AccessibilityTtsEnabled
927 bool isAccessibilityTTSEnabled;
928 SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.AccessibilityTtsEnabled, out isAccessibilityTTSEnabled);
929 if (res != SystemSettingsError.None)
931 throw SystemSettingsExceptionFactory.CreateException(res, "unable to get AccessibilityTTS system setting value.");
933 return isAccessibilityTTSEnabled;
938 private static readonly Interop.Settings.SystemSettingsChangedCallback s_incomingCallRingtoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
940 string path = SystemSettings.IncomingCallRingtone;
941 IncomingCallRingtoneChangedEventArgs eventArgs = new IncomingCallRingtoneChangedEventArgs(path);
942 s_incomingCallRingtoneChanged?.Invoke(null, eventArgs);
944 private static event EventHandler<IncomingCallRingtoneChangedEventArgs> s_incomingCallRingtoneChanged;
946 /// The IncomingCallRingtoneChanged event is triggered when the file path of the incoming ringtone is changed.
948 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
949 /// <privlevel>platform</privlevel>
950 /// <feature>http://tizen.org/feature/systemsetting</feature>
951 /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
952 /// <exception cref="ArgumentException">Invalid Argument</exception>
953 /// <exception cref="NotSupportedException">Not Supported feature</exception>
954 /// <exception cref="InvalidOperationException">Invalid operation</exception>
955 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
956 public static event EventHandler<IncomingCallRingtoneChangedEventArgs> IncomingCallRingtoneChanged
960 if (s_incomingCallRingtoneChanged == null)
962 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.IncomingCallRingtone, s_incomingCallRingtoneChangedCallback, IntPtr.Zero);
963 if (ret != SystemSettingsError.None)
965 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
968 s_incomingCallRingtoneChanged += value;
973 s_incomingCallRingtoneChanged -= value;
974 if (s_incomingCallRingtoneChanged == null)
976 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.IncomingCallRingtone);
977 if (ret != SystemSettingsError.None)
979 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
985 private static readonly Interop.Settings.SystemSettingsChangedCallback s_wallpaperHomeScreenChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
987 string path = SystemSettings.WallpaperHomeScreen;
988 WallpaperHomeScreenChangedEventArgs eventArgs = new WallpaperHomeScreenChangedEventArgs(path);
989 s_wallpaperHomeScreenChanged?.Invoke(null, eventArgs);
991 private static event EventHandler<WallpaperHomeScreenChangedEventArgs> s_wallpaperHomeScreenChanged;
993 /// THe WallpaperHomeScreenChanged event is triggered when the file path of the current home screen wallpaper is changed.
995 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
996 /// <privlevel>platform</privlevel>
997 /// <feature>http://tizen.org/feature/systemsetting</feature>
998 /// <feature>http://tizen.org/feature/systemsetting.home_screen</feature>
999 /// <exception cref="ArgumentException">Invalid Argument</exception>
1000 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1001 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1002 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1003 public static event EventHandler<WallpaperHomeScreenChangedEventArgs> WallpaperHomeScreenChanged
1007 if (s_wallpaperHomeScreenChanged == null)
1009 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.WallpaperHomeScreen, s_wallpaperHomeScreenChangedCallback, IntPtr.Zero);
1010 if (ret != SystemSettingsError.None)
1012 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1015 s_wallpaperHomeScreenChanged += value;
1020 s_wallpaperHomeScreenChanged -= value;
1021 if (s_wallpaperHomeScreenChanged == null)
1023 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.WallpaperHomeScreen);
1024 if (ret != SystemSettingsError.None)
1026 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1032 private static readonly Interop.Settings.SystemSettingsChangedCallback s_wallpaperLockScreenChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1034 string path = SystemSettings.WallpaperLockScreen;
1035 WallpaperLockScreenChangedEventArgs eventArgs = new WallpaperLockScreenChangedEventArgs(path);
1036 s_wallpaperLockScreenChanged?.Invoke(null, eventArgs);
1038 private static event EventHandler<WallpaperLockScreenChangedEventArgs> s_wallpaperLockScreenChanged;
1040 /// The WallpaperLockScreenChanged event is triggered when the file path of the current lock screen wallpaper is changed.
1042 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1043 /// <privlevel>platform</privlevel>
1044 /// <feature>http://tizen.org/feature/systemsetting</feature>
1045 /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
1046 /// <exception cref="ArgumentException">Invalid Argument</exception>
1047 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1048 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1049 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1050 public static event EventHandler<WallpaperLockScreenChangedEventArgs> WallpaperLockScreenChanged
1054 if (s_wallpaperLockScreenChanged == null)
1056 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.WallpaperLockScreen, s_wallpaperLockScreenChangedCallback, IntPtr.Zero);
1057 if (ret != SystemSettingsError.None)
1059 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1062 s_wallpaperLockScreenChanged += value;
1067 s_wallpaperLockScreenChanged -= value;
1068 if (s_wallpaperLockScreenChanged == null)
1070 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.WallpaperLockScreen);
1071 if (ret != SystemSettingsError.None)
1073 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1079 private static readonly Interop.Settings.SystemSettingsChangedCallback s_fontSizeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1081 SystemSettingsFontSize fontSize = SystemSettings.FontSize;
1082 FontSizeChangedEventArgs eventArgs = new FontSizeChangedEventArgs(fontSize);
1083 s_fontSizeChanged?.Invoke(null, eventArgs);
1085 private static event EventHandler<FontSizeChangedEventArgs> s_fontSizeChanged;
1087 /// The FontSizeChanged event is triggered when the current system font size is changed.
1089 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1090 /// <privlevel>platform</privlevel>
1091 /// <feature>http://tizen.org/feature/systemsetting</feature>
1092 /// <exception cref="ArgumentException">Invalid Argument</exception>
1093 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1094 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1095 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1096 public static event EventHandler<FontSizeChangedEventArgs> FontSizeChanged
1100 if (s_fontSizeChanged == null)
1102 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.FontSize, s_fontSizeChangedCallback, IntPtr.Zero);
1103 if (ret != SystemSettingsError.None)
1105 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1108 s_fontSizeChanged += value;
1113 s_fontSizeChanged -= value;
1114 if (s_fontSizeChanged == null)
1116 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.FontSize);
1117 if (ret != SystemSettingsError.None)
1119 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1125 private static readonly Interop.Settings.SystemSettingsChangedCallback s_fontTypeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1127 string fontType = SystemSettings.FontType;
1128 FontTypeChangedEventArgs eventArgs = new FontTypeChangedEventArgs(fontType);
1129 s_fontTypeChanged?.Invoke(null, eventArgs);
1131 private static event EventHandler<FontTypeChangedEventArgs> s_fontTypeChanged;
1133 /// The FontTypeChanged event is triggered when the current system font type is changed.
1135 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1136 /// <privlevel>platform</privlevel>
1137 /// <feature>http://tizen.org/feature/systemsetting</feature>
1138 /// <exception cref="ArgumentException">Invalid Argument</exception>
1139 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1140 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1141 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1142 public static event EventHandler<FontTypeChangedEventArgs> FontTypeChanged
1146 if (s_fontTypeChanged == null)
1148 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.FontType, s_fontTypeChangedCallback, IntPtr.Zero);
1149 if (ret != SystemSettingsError.None)
1151 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1154 s_fontTypeChanged += value;
1159 s_fontTypeChanged -= value;
1160 if (s_fontTypeChanged == null)
1162 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.FontType);
1163 if (ret != SystemSettingsError.None)
1165 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1171 private static readonly Interop.Settings.SystemSettingsChangedCallback s_motionActivationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1173 bool motionActivation = SystemSettings.MotionActivationEnabled;
1174 MotionActivationSettingChangedEventArgs eventArgs = new MotionActivationSettingChangedEventArgs(motionActivation);
1175 s_motionActivationChanged?.Invoke(null, eventArgs);
1177 private static event EventHandler<MotionActivationSettingChangedEventArgs> s_motionActivationChanged;
1179 /// The MotionActivationChanged event is triggered when the motion service status is changed.
1181 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1182 /// <privlevel>platform</privlevel>
1183 /// <feature>http://tizen.org/feature/systemsetting</feature>
1184 /// <exception cref="ArgumentException">Invalid Argument</exception>
1185 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1186 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1187 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1188 public static event EventHandler<MotionActivationSettingChangedEventArgs> MotionActivationSettingChanged
1192 if (s_motionActivationChanged == null)
1194 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.MotionActivationEnabled, s_motionActivationChangedCallback, IntPtr.Zero);
1195 if (ret != SystemSettingsError.None)
1197 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1200 s_motionActivationChanged += value;
1205 s_motionActivationChanged -= value;
1206 if (s_motionActivationChanged == null)
1208 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.MotionActivationEnabled);
1209 if (ret != SystemSettingsError.None)
1211 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1217 private static readonly Interop.Settings.SystemSettingsChangedCallback s_emailAlertRingtoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1219 string emailAlertRingtone = SystemSettings.EmailAlertRingtone;
1220 EmailAlertRingtoneChangedEventArgs eventArgs = new EmailAlertRingtoneChangedEventArgs(emailAlertRingtone);
1221 s_emailAlertRingtoneChanged?.Invoke(null, eventArgs);
1223 private static event EventHandler<EmailAlertRingtoneChangedEventArgs> s_emailAlertRingtoneChanged;
1225 /// The EmailAlertRingtoneChanged event is triggered when the file path of the current email alert ringtone is changed.
1227 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1228 /// <privlevel>platform</privlevel>
1229 /// <feature>http://tizen.org/feature/systemsetting</feature>
1230 /// <feature>http://tizen.org/feature/systemsetting.notification_email</feature>
1231 /// <exception cref="ArgumentException">Invalid Argument</exception>
1232 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1233 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1234 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1235 public static event EventHandler<EmailAlertRingtoneChangedEventArgs> EmailAlertRingtoneChanged
1239 if (s_emailAlertRingtoneChanged == null)
1241 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.EmailAlertRingtone, s_emailAlertRingtoneChangedCallback, IntPtr.Zero);
1242 if (ret != SystemSettingsError.None)
1244 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1247 s_emailAlertRingtoneChanged += value;
1252 s_emailAlertRingtoneChanged -= value;
1253 if (s_emailAlertRingtoneChanged == null)
1255 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.EmailAlertRingtone);
1256 if (ret != SystemSettingsError.None)
1258 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1264 private static readonly Interop.Settings.SystemSettingsChangedCallback s_usbDebuggingSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1266 bool usbDebuggingEnabled = SystemSettings.UsbDebuggingEnabled;
1267 UsbDebuggingSettingChangedEventArgs eventArgs = new UsbDebuggingSettingChangedEventArgs(usbDebuggingEnabled);
1268 s_usbDebuggingSettingChanged?.Invoke(null, eventArgs);
1270 private static event EventHandler<UsbDebuggingSettingChangedEventArgs> s_usbDebuggingSettingChanged;
1272 /// The UsbDebuggingSettingChangedEventArgs event is triggered when the USB debugging status is changed.
1274 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1275 /// <privlevel>platform</privlevel>
1276 /// <feature>http://tizen.org/feature/systemsetting</feature>
1277 /// <exception cref="ArgumentException">Invalid Argument</exception>
1278 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1279 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1280 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1281 public static event EventHandler<UsbDebuggingSettingChangedEventArgs> UsbDebuggingSettingChanged
1285 if (s_usbDebuggingSettingChanged == null)
1287 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UsbDebuggingEnabled, s_usbDebuggingSettingChangedCallback, IntPtr.Zero);
1288 if (ret != SystemSettingsError.None)
1290 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1293 s_usbDebuggingSettingChanged += value;
1298 s_usbDebuggingSettingChanged -= value;
1299 if (s_usbDebuggingSettingChanged == null)
1301 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UsbDebuggingEnabled);
1302 if (ret != SystemSettingsError.None)
1304 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1310 private static readonly Interop.Settings.SystemSettingsChangedCallback s_data3GNetworkSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1312 bool data3GEnabled = SystemSettings.Data3GNetworkEnabled;
1313 Data3GNetworkSettingChangedEventArgs eventArgs = new Data3GNetworkSettingChangedEventArgs(data3GEnabled);
1314 s_data3GNetworkSettingChanged?.Invoke(null, eventArgs);
1316 private static event EventHandler<Data3GNetworkSettingChangedEventArgs> s_data3GNetworkSettingChanged;
1318 /// The Data3GNetworkSettingChanged event is triggered when the 3G data network status is changed.
1320 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1321 /// <privlevel>platform</privlevel>
1322 /// <feature>http://tizen.org/feature/systemsetting</feature>
1323 /// <exception cref="ArgumentException">Invalid Argument</exception>
1324 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1325 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1326 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1327 public static event EventHandler<Data3GNetworkSettingChangedEventArgs> Data3GNetworkSettingChanged
1331 if (s_data3GNetworkSettingChanged == null)
1333 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Data3GNetworkEnabled, s_data3GNetworkSettingChangedCallback, IntPtr.Zero);
1334 if (ret != SystemSettingsError.None)
1336 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1339 s_data3GNetworkSettingChanged += value;
1344 s_data3GNetworkSettingChanged -= value;
1345 if (s_data3GNetworkSettingChanged == null)
1347 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Data3GNetworkEnabled);
1348 if (ret != SystemSettingsError.None)
1350 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1356 private static readonly Interop.Settings.SystemSettingsChangedCallback s_lockscreenAppChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1358 string lockScreenApp = SystemSettings.LockScreenApp;
1359 LockScreenAppChangedEventArgs eventArgs = new LockScreenAppChangedEventArgs(lockScreenApp);
1360 s_lockscreenAppChanged?.Invoke(null, eventArgs);
1362 private static event EventHandler<LockScreenAppChangedEventArgs> s_lockscreenAppChanged;
1364 /// The LockScreenAppChanged event is triggered when the lockscreen application package name is changed.
1366 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1367 /// <privlevel>platform</privlevel>
1368 /// <feature>http://tizen.org/feature/systemsetting</feature>
1369 /// <feature>http://tizen.org/feature/systemsetting.lock_screen</feature>
1370 /// <exception cref="ArgumentException">Invalid Argument</exception>
1371 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1372 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1373 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1374 public static event EventHandler<LockScreenAppChangedEventArgs> LockScreenAppChanged
1378 if (s_lockscreenAppChanged == null)
1380 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LockScreenApp, s_lockscreenAppChangedCallback, IntPtr.Zero);
1381 if (ret != SystemSettingsError.None)
1383 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1386 s_lockscreenAppChanged += value;
1391 s_lockscreenAppChanged -= value;
1392 if (s_lockscreenAppChanged == null)
1394 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LockScreenApp);
1395 if (ret != SystemSettingsError.None)
1397 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1403 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeCountryChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1405 string localeCountry = SystemSettings.LocaleCountry;
1406 LocaleCountryChangedEventArgs eventArgs = new LocaleCountryChangedEventArgs(localeCountry);
1407 s_localeCountryChanged?.Invoke(null, eventArgs);
1409 private static event EventHandler<LocaleCountryChangedEventArgs> s_localeCountryChanged;
1411 /// The LocaleCountryChanged event is triggered when the current country setting in the <LANGUAGE>_<REGION> syntax, is changed.
1413 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1414 /// <privlevel>platform</privlevel>
1415 /// <feature>http://tizen.org/feature/systemsetting</feature>
1416 /// <exception cref="ArgumentException">Invalid Argument</exception>
1417 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1418 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1419 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1420 public static event EventHandler<LocaleCountryChangedEventArgs> LocaleCountryChanged
1424 if (s_localeCountryChanged == null)
1426 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleCountry, s_localeCountryChangedCallback, IntPtr.Zero);
1427 if (ret != SystemSettingsError.None)
1429 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1432 s_localeCountryChanged += value;
1437 s_localeCountryChanged -= value;
1438 if (s_localeCountryChanged == null)
1440 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleCountry);
1441 if (ret != SystemSettingsError.None)
1443 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1449 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeLanguageChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1451 string localeLanguage = SystemSettings.LocaleLanguage;
1452 LocaleLanguageChangedEventArgs eventArgs = new LocaleLanguageChangedEventArgs(localeLanguage);
1453 s_localeLanguageChanged?.Invoke(null, eventArgs);
1455 private static event EventHandler<LocaleLanguageChangedEventArgs> s_localeLanguageChanged;
1457 /// The LocaleLanguageChanged event is triggered when the current language setting in the <LANGUAGE>_<REGION> syntax, is changed.
1459 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1460 /// <privlevel>platform</privlevel>
1461 /// <feature>http://tizen.org/feature/systemsetting</feature>
1462 /// <exception cref="ArgumentException">Invalid Argument</exception>
1463 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1464 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1465 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1466 public static event EventHandler<LocaleLanguageChangedEventArgs> LocaleLanguageChanged
1470 if (s_localeLanguageChanged == null)
1472 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleLanguage, s_localeLanguageChangedCallback, IntPtr.Zero);
1473 if (ret != SystemSettingsError.None)
1475 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1478 s_localeLanguageChanged += value;
1483 s_localeLanguageChanged -= value;
1484 if (s_localeLanguageChanged == null)
1486 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleLanguage);
1487 if (ret != SystemSettingsError.None)
1489 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1495 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeTimeFormat24HourChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1497 bool localeTimeFormat24Hour = SystemSettings.LocaleTimeFormat24HourEnabled;
1498 LocaleTimeFormat24HourSettingChangedEventArgs eventArgs = new LocaleTimeFormat24HourSettingChangedEventArgs(localeTimeFormat24Hour);
1499 s_localeTimeFormat24HourChanged?.Invoke(null, eventArgs);
1501 private static event EventHandler<LocaleTimeFormat24HourSettingChangedEventArgs> s_localeTimeFormat24HourChanged;
1503 /// The LocaleTimeFormat24HourChanged event is triggered when the time format is changed.
1505 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1506 /// <privlevel>platform</privlevel>
1507 /// <feature>http://tizen.org/feature/systemsetting</feature>
1508 /// <exception cref="ArgumentException">Invalid Argument</exception>
1509 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1510 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1511 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1512 public static event EventHandler<LocaleTimeFormat24HourSettingChangedEventArgs> LocaleTimeFormat24HourSettingChanged
1516 if (s_localeTimeFormat24HourChanged == null)
1518 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, s_localeTimeFormat24HourChangedCallback, IntPtr.Zero);
1519 if (ret != SystemSettingsError.None)
1521 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1524 s_localeTimeFormat24HourChanged += value;
1529 s_localeTimeFormat24HourChanged -= value;
1530 if (s_localeTimeFormat24HourChanged == null)
1532 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleTimeFormat24HourEnabled);
1533 if (ret != SystemSettingsError.None)
1535 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1541 private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeTimeZoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1543 string localeTimeZone = SystemSettings.LocaleTimeZone;
1544 LocaleTimeZoneChangedEventArgs eventArgs = new LocaleTimeZoneChangedEventArgs(localeTimeZone);
1545 s_localeTimeZoneChanged?.Invoke(null, eventArgs);
1547 private static event EventHandler<LocaleTimeZoneChangedEventArgs> s_localeTimeZoneChanged;
1549 /// The LocaleTimeZoneChanged event is triggered when the current time zone is changed.
1551 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1552 /// <privlevel>platform</privlevel>
1553 /// <feature>http://tizen.org/feature/systemsetting</feature>
1554 /// <exception cref="ArgumentException">Invalid Argument</exception>
1555 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1556 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1557 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1558 public static event EventHandler<LocaleTimeZoneChangedEventArgs> LocaleTimeZoneChanged
1562 if (s_localeTimeZoneChanged == null)
1564 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleTimeZone, s_localeTimeZoneChangedCallback, IntPtr.Zero);
1565 if (ret != SystemSettingsError.None)
1567 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1570 s_localeTimeZoneChanged += value;
1575 s_localeTimeZoneChanged -= value;
1576 if (s_localeTimeZoneChanged == null)
1578 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleTimeZone);
1579 if (ret != SystemSettingsError.None)
1581 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1587 private static readonly Interop.Settings.SystemSettingsChangedCallback s_timeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1590 int time = SystemSettings.Time;
1591 TimeChangedEventArgs eventArgs = new TimeChangedEventArgs(time);
1592 s_timeChanged?.Invoke(null, eventArgs);
1594 private static event EventHandler<TimeChangedEventArgs> s_timeChanged;
1596 /// The TimeChanged event is triggered when the system time is changed.
1598 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1599 /// <privlevel>platform</privlevel>
1600 /// <feature>http://tizen.org/feature/systemsetting</feature>
1601 /// <exception cref="ArgumentException">Invalid Argument</exception>
1602 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1603 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1604 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1605 public static event EventHandler<TimeChangedEventArgs> TimeChanged
1609 if (s_timeChanged == null)
1611 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.Time, s_timeChangedCallback, IntPtr.Zero);
1612 if (ret != SystemSettingsError.None)
1614 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1617 s_timeChanged += value;
1622 s_timeChanged -= value;
1623 if (s_timeChanged == null)
1625 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.Time);
1626 if (ret != SystemSettingsError.None)
1628 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1634 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundLockChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1636 bool soundLock = SystemSettings.SoundLockEnabled;
1637 SoundLockSettingChangedEventArgs eventArgs = new SoundLockSettingChangedEventArgs(soundLock);
1638 s_soundLockChanged?.Invoke(null, eventArgs);
1640 private static event EventHandler<SoundLockSettingChangedEventArgs> s_soundLockChanged;
1642 /// The SoundLockChanged event is triggered when the screen lock sound enabled status is changed.
1644 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1645 /// <privlevel>platform</privlevel>
1646 /// <feature>http://tizen.org/feature/systemsetting</feature>
1647 /// <exception cref="ArgumentException">Invalid Argument</exception>
1648 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1649 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1650 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1651 public static event EventHandler<SoundLockSettingChangedEventArgs> SoundLockSettingChanged
1655 if (s_soundLockChanged == null)
1657 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundLockEnabled, s_soundLockChangedCallback, IntPtr.Zero);
1658 if (ret != SystemSettingsError.None)
1660 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1663 s_soundLockChanged += value;
1668 s_soundLockChanged -= value;
1669 if (s_soundLockChanged == null)
1671 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundLockEnabled);
1672 if (ret != SystemSettingsError.None)
1674 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1680 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundSilentModeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1682 bool soundSilentMode = SystemSettings.SoundSilentModeEnabled;
1683 SoundSilentModeSettingChangedEventArgs eventArgs = new SoundSilentModeSettingChangedEventArgs(soundSilentMode);
1684 s_soundSilentModeChanged?.Invoke(null, eventArgs);
1686 private static event EventHandler<SoundSilentModeSettingChangedEventArgs> s_soundSilentModeChanged;
1688 /// The SoundSilentModeChanged event is triggered when the silent mode status is changed.
1690 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1691 /// <privlevel>platform</privlevel>
1692 /// <feature>http://tizen.org/feature/systemsetting</feature>
1693 /// <exception cref="ArgumentException">Invalid Argument</exception>
1694 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1695 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1696 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1697 public static event EventHandler<SoundSilentModeSettingChangedEventArgs> SoundSilentModeSettingChanged
1701 if (s_soundSilentModeChanged == null)
1703 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundSilentModeEnabled, s_soundSilentModeChangedCallback, IntPtr.Zero);
1704 if (ret != SystemSettingsError.None)
1706 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1709 s_soundSilentModeChanged += value;
1714 s_soundSilentModeChanged -= value;
1715 if (s_soundSilentModeChanged == null)
1717 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundSilentModeEnabled);
1718 if (ret != SystemSettingsError.None)
1720 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1726 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundTouchChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1728 bool soundTouch = SystemSettings.SoundTouchEnabled;
1729 SoundTouchSettingChangedEventArgs eventArgs = new SoundTouchSettingChangedEventArgs(soundTouch);
1730 s_soundTouchChanged?.Invoke(null, eventArgs);
1732 private static event EventHandler<SoundTouchSettingChangedEventArgs> s_soundTouchChanged;
1734 /// THe SoundTouchChanged event is triggered when the screen touch sound enabled status is changed.
1736 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1737 /// <privlevel>platform</privlevel>
1738 /// <feature>http://tizen.org/feature/systemsetting</feature>
1739 /// <exception cref="ArgumentException">Invalid Argument</exception>
1740 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1741 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1742 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1743 public static event EventHandler<SoundTouchSettingChangedEventArgs> SoundTouchSettingChanged
1747 if (s_soundTouchChanged == null)
1749 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundTouchEnabled, s_soundTouchChangedCallback, IntPtr.Zero);
1750 if (ret != SystemSettingsError.None)
1752 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1755 s_soundTouchChanged += value;
1760 s_soundTouchChanged -= value;
1761 if (s_soundTouchChanged == null)
1764 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundTouchEnabled);
1765 if (ret != SystemSettingsError.None)
1767 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1773 private static readonly Interop.Settings.SystemSettingsChangedCallback s_displayScreenRotationAutoChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1775 bool displayScreenRotationAuto = SystemSettings.DisplayScreenRotationAutoEnabled;
1776 DisplayScreenRotationAutoSettingChangedEventArgs eventArgs = new DisplayScreenRotationAutoSettingChangedEventArgs(displayScreenRotationAuto);
1777 s_displayScreenRotationAutoChanged?.Invoke(null, eventArgs);
1779 private static event EventHandler<DisplayScreenRotationAutoSettingChangedEventArgs> s_displayScreenRotationAutoChanged;
1781 /// The DisplayScreenRotationAutoChanged event is triggered when the automatic rotation control status is changed.
1783 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1784 /// <privlevel>platform</privlevel>
1785 /// <feature>http://tizen.org/feature/systemsetting</feature>
1786 /// <exception cref="ArgumentException">Invalid Argument</exception>
1787 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1788 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1789 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1790 public static event EventHandler<DisplayScreenRotationAutoSettingChangedEventArgs> DisplayScreenRotationAutoSettingChanged
1794 if (s_displayScreenRotationAutoChanged == null)
1796 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, s_displayScreenRotationAutoChangedCallback, IntPtr.Zero);
1797 if (ret != SystemSettingsError.None)
1799 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1802 s_displayScreenRotationAutoChanged += value;
1807 s_displayScreenRotationAutoChanged -= value;
1808 if (s_displayScreenRotationAutoChanged == null)
1810 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DisplayScreenRotationAutoEnabled);
1811 if (ret != SystemSettingsError.None)
1813 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1819 private static readonly Interop.Settings.SystemSettingsChangedCallback s_deviceNameChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1821 string deviceName = SystemSettings.DeviceName;
1822 DeviceNameChangedEventArgs eventArgs = new DeviceNameChangedEventArgs(deviceName);
1823 s_deviceNameChanged?.Invoke(null, eventArgs);
1825 private static event EventHandler<DeviceNameChangedEventArgs> s_deviceNameChanged;
1827 /// The DeviceNameChanged event is triggered when the device name is changed.
1829 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1830 /// <privlevel>platform</privlevel>
1831 /// <feature>http://tizen.org/feature/systemsetting</feature>
1832 /// <exception cref="ArgumentException">Invalid Argument</exception>
1833 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1834 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1835 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1836 public static event EventHandler<DeviceNameChangedEventArgs> DeviceNameChanged
1840 if (s_deviceNameChanged == null)
1842 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DeviceName, s_deviceNameChangedCallback, IntPtr.Zero);
1843 if (ret != SystemSettingsError.None)
1845 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1848 s_deviceNameChanged += value;
1853 s_deviceNameChanged -= value;
1854 if (s_deviceNameChanged == null)
1856 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DeviceName);
1857 if (ret != SystemSettingsError.None)
1859 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1865 private static readonly Interop.Settings.SystemSettingsChangedCallback s_motionSettingChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1867 bool motionEnabled = SystemSettings.MotionEnabled;
1868 MotionSettingChangedEventArgs eventArgs = new MotionSettingChangedEventArgs(motionEnabled);
1869 s_motionSettingChanged?.Invoke(null, eventArgs);
1871 private static event EventHandler<MotionSettingChangedEventArgs> s_motionSettingChanged;
1873 /// The MotionSettingChanged event is triggered when the motion feature enabled status is changed.
1875 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1876 /// <privlevel>platform</privlevel>
1877 /// <feature>http://tizen.org/feature/systemsetting</feature>
1878 /// <exception cref="ArgumentException">Invalid Argument</exception>
1879 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1880 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1881 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1882 public static event EventHandler<MotionSettingChangedEventArgs> MotionSettingChanged
1886 if (s_motionSettingChanged == null)
1888 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.MotionEnabled, s_motionSettingChangedCallback, IntPtr.Zero);
1889 if (ret != SystemSettingsError.None)
1891 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1894 s_motionSettingChanged += value;
1899 s_motionSettingChanged -= value;
1900 if (s_motionSettingChanged == null)
1902 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.MotionEnabled);
1903 if (ret != SystemSettingsError.None)
1905 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1911 private static readonly Interop.Settings.SystemSettingsChangedCallback s_networkWifiNotificationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1913 bool networkWifiNotification = SystemSettings.NetworkWifiNotificationEnabled;
1914 NetworkWifiNotificationSettingChangedEventArgs eventArgs = new NetworkWifiNotificationSettingChangedEventArgs(networkWifiNotification);
1915 s_networkWifiNotificationChanged?.Invoke(null, eventArgs);
1917 private static event EventHandler<NetworkWifiNotificationSettingChangedEventArgs> s_networkWifiNotificationChanged;
1919 /// The NetworkWifiNotificationChanged event is triggered when the WiFi-related notifications enabled status is changed.
1921 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1922 /// <privlevel>platform</privlevel>
1923 /// <feature>http://tizen.org/feature/systemsetting</feature>
1924 /// <feature>http://tizen.org/feature/network.wifi</feature>
1925 /// <exception cref="ArgumentException">Invalid Argument</exception>
1926 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1927 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1928 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1929 public static event EventHandler<NetworkWifiNotificationSettingChangedEventArgs> NetworkWifiNotificationSettingChanged
1933 if (s_networkWifiNotificationChanged == null)
1935 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.NetworkWifiNotificationEnabled, s_networkWifiNotificationChangedCallback, IntPtr.Zero);
1936 if (ret != SystemSettingsError.None)
1938 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1941 s_networkWifiNotificationChanged += value;
1946 s_networkWifiNotificationChanged -= value;
1947 if (s_networkWifiNotificationChanged == null)
1949 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.NetworkWifiNotificationEnabled);
1950 if (ret != SystemSettingsError.None)
1952 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1958 private static readonly Interop.Settings.SystemSettingsChangedCallback s_networkFlightModeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
1960 bool networkFlightMode = SystemSettings.NetworkFlightModeEnabled;
1961 NetworkFlightModeSettingChangedEventArgs eventArgs = new NetworkFlightModeSettingChangedEventArgs(networkFlightMode);
1962 s_networkFlightModeChanged?.Invoke(null, eventArgs);
1964 private static event EventHandler<NetworkFlightModeSettingChangedEventArgs> s_networkFlightModeChanged;
1966 /// The NetworkFlightModeChanged event is triggered when the flight mode status is changed.
1968 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
1969 /// <privlevel>platform</privlevel>
1970 /// <feature>http://tizen.org/feature/systemsetting</feature>
1971 /// <exception cref="ArgumentException">Invalid Argument</exception>
1972 /// <exception cref="NotSupportedException">Not Supported feature</exception>
1973 /// <exception cref="InvalidOperationException">Invalid operation</exception>
1974 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
1975 public static event EventHandler<NetworkFlightModeSettingChangedEventArgs> NetworkFlightModeSettingChanged
1979 if (s_networkFlightModeChanged == null)
1981 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.NetworkFlightModeEnabled, s_networkFlightModeChangedCallback, IntPtr.Zero);
1982 if (ret != SystemSettingsError.None)
1984 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
1987 s_networkFlightModeChanged += value;
1992 s_networkFlightModeChanged -= value;
1993 if (s_networkFlightModeChanged == null)
1995 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.NetworkFlightModeEnabled);
1996 if (ret != SystemSettingsError.None)
1998 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2004 private static readonly Interop.Settings.SystemSettingsChangedCallback s_screenBacklightTimeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2006 int screenBacklightTime = SystemSettings.ScreenBacklightTime;
2007 ScreenBacklightTimeChangedEventArgs eventArgs = new ScreenBacklightTimeChangedEventArgs(screenBacklightTime);
2008 s_screenBacklightTimeChanged?.Invoke(null, eventArgs);
2010 private static event EventHandler<ScreenBacklightTimeChangedEventArgs> s_screenBacklightTimeChanged;
2012 /// THe ScreenBacklightTimeChanged event is triggered when the backlight time is changed.
2014 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2015 /// <privlevel>platform</privlevel>
2016 /// <feature>http://tizen.org/feature/systemsetting</feature>
2017 /// <exception cref="ArgumentException">Invalid Argument</exception>
2018 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2019 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2020 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2021 public static event EventHandler<ScreenBacklightTimeChangedEventArgs> ScreenBacklightTimeChanged
2025 if (s_screenBacklightTimeChanged == null)
2027 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.ScreenBacklightTime, s_screenBacklightTimeChangedCallback, IntPtr.Zero);
2028 if (ret != SystemSettingsError.None)
2030 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2033 s_screenBacklightTimeChanged += value;
2038 s_screenBacklightTimeChanged -= value;
2039 if (s_screenBacklightTimeChanged == null)
2041 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.ScreenBacklightTime);
2042 if (ret != SystemSettingsError.None)
2044 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2050 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundNotificationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2052 string soundNotification = SystemSettings.SoundNotification;
2053 SoundNotificationChangedEventArgs eventArgs = new SoundNotificationChangedEventArgs(soundNotification);
2054 s_soundNotificationChanged?.Invoke(null, eventArgs);
2056 private static event EventHandler<SoundNotificationChangedEventArgs> s_soundNotificationChanged;
2058 /// The SoundNotificationChanged event is triggered when the file path of the current notification tone set by the user is changed.
2060 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2061 /// <privlevel>platform</privlevel>
2062 /// <feature>http://tizen.org/feature/systemsetting</feature>
2063 /// <feature>http://tizen.org/feature/systemsetting.incoming_call</feature>
2064 /// <exception cref="ArgumentException">Invalid Argument</exception>
2065 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2066 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2067 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2068 public static event EventHandler<SoundNotificationChangedEventArgs> SoundNotificationChanged
2072 if (s_soundNotificationChanged == null)
2074 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundNotification, s_soundNotificationChangedCallback, IntPtr.Zero);
2075 if (ret != SystemSettingsError.None)
2077 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2080 s_soundNotificationChanged += value;
2085 s_soundNotificationChanged -= value;
2086 if (s_soundNotificationChanged == null)
2088 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundNotification);
2089 if (ret != SystemSettingsError.None)
2091 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2097 private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundNotificationRepetitionPeriodChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2099 int soundNotificationRepetitionPeriod = SystemSettings.SoundNotificationRepetitionPeriod;
2100 SoundNotificationRepetitionPeriodChangedEventArgs eventArgs = new SoundNotificationRepetitionPeriodChangedEventArgs(soundNotificationRepetitionPeriod);
2101 s_soundNotificationRepetitionPeriodChanged?.Invoke(null, eventArgs);
2103 private static event EventHandler<SoundNotificationRepetitionPeriodChangedEventArgs> s_soundNotificationRepetitionPeriodChanged;
2105 /// The SoundNotificationRepetitionPeriodChanged event is triggered when the time period for notification repetitions is changed.
2107 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2108 /// <privlevel>platform</privlevel>
2109 /// <feature>http://tizen.org/feature/systemsetting</feature>
2110 /// <exception cref="ArgumentException">Invalid Argument</exception>
2111 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2112 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2113 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2114 public static event EventHandler<SoundNotificationRepetitionPeriodChangedEventArgs> SoundNotificationRepetitionPeriodChanged
2118 if (s_soundNotificationRepetitionPeriodChanged == null)
2120 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundNotificationRepetitionPeriod, s_soundNotificationRepetitionPeriodChangedCallback, IntPtr.Zero);
2121 if (ret != SystemSettingsError.None)
2123 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2126 s_soundNotificationRepetitionPeriodChanged += value;
2131 s_soundNotificationRepetitionPeriodChanged -= value;
2132 if (s_soundNotificationRepetitionPeriodChanged == null)
2134 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundNotificationRepetitionPeriod);
2135 if (ret != SystemSettingsError.None)
2137 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2143 private static readonly Interop.Settings.SystemSettingsChangedCallback s_lockStateChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2145 SystemSettingsIdleLockState lockState = SystemSettings.LockState;
2146 LockStateChangedEventArgs eventArgs = new LockStateChangedEventArgs(lockState);
2147 s_lockStateChanged?.Invoke(null, eventArgs);
2149 private static event EventHandler<LockStateChangedEventArgs> s_lockStateChanged;
2151 /// The LockStateChanged event is triggered when the current lock state is changed.
2153 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2154 /// <privlevel>platform</privlevel>
2155 /// <feature>http://tizen.org/feature/systemsetting</feature>
2156 /// <exception cref="ArgumentException">Invalid Argument</exception>
2157 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2158 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2159 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2160 public static event EventHandler<LockStateChangedEventArgs> LockStateChanged
2164 if (s_lockStateChanged == null)
2166 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LockState, s_lockStateChangedCallback, IntPtr.Zero);
2167 if (ret != SystemSettingsError.None)
2169 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2172 s_lockStateChanged += value;
2177 s_lockStateChanged -= value;
2178 if (s_lockStateChanged == null)
2180 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LockState);
2181 if (ret != SystemSettingsError.None)
2183 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2189 private static readonly Interop.Settings.SystemSettingsChangedCallback s_adsIdChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2191 string adsId = SystemSettings.AdsId;
2192 AdsIdChangedEventArgs eventArgs = new AdsIdChangedEventArgs(adsId);
2193 s_adsIdChanged?.Invoke(null, eventArgs);
2195 private static event EventHandler<AdsIdChangedEventArgs> s_adsIdChanged;
2197 /// The AdsIdChanged event is triggered when the current ADS ID state is changed.
2199 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2200 /// <privlevel>platform</privlevel>
2201 /// <feature>http://tizen.org/feature/systemsetting</feature>
2202 /// <exception cref="ArgumentException">Invalid Argument</exception>
2203 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2204 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2205 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2206 public static event EventHandler<AdsIdChangedEventArgs> AdsIdChanged
2210 if (s_adsIdChanged == null)
2212 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AdsId, s_adsIdChangedCallback, IntPtr.Zero);
2213 if (ret != SystemSettingsError.None)
2215 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2218 s_adsIdChanged += value;
2223 s_adsIdChanged -= value;
2224 if (s_adsIdChanged == null)
2226 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AdsId);
2227 if (ret != SystemSettingsError.None)
2229 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2235 private static readonly Interop.Settings.SystemSettingsChangedCallback s_ultraDataSaveChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2237 SystemSettingsUdsState ultraDataSave = SystemSettings.UltraDataSave;
2238 UltraDataSaveChangedEventArgs eventArgs = new UltraDataSaveChangedEventArgs(ultraDataSave);
2239 s_ultraDataSaveChanged?.Invoke(null, eventArgs);
2241 private static event EventHandler<UltraDataSaveChangedEventArgs> s_ultraDataSaveChanged;
2243 /// The UltraDataSaveChanged event is triggered when the current Ultra Data Save state is changed.
2245 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2246 /// <privlevel>platform</privlevel>
2247 /// <feature>http://tizen.org/feature/systemsetting</feature>
2248 /// <feature>http://tizen.org/feature/network.telephony</feature>
2249 /// <exception cref="ArgumentException">Invalid Argument</exception>
2250 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2251 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2252 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2253 public static event EventHandler<UltraDataSaveChangedEventArgs> UltraDataSaveChanged
2257 if (s_ultraDataSaveChanged == null)
2259 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UltraDataSave, s_ultraDataSaveChangedCallback, IntPtr.Zero);
2260 if (ret != SystemSettingsError.None)
2262 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2265 s_ultraDataSaveChanged += value;
2270 s_ultraDataSaveChanged -= value;
2271 if (s_ultraDataSaveChanged == null)
2273 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UltraDataSave);
2274 if (ret != SystemSettingsError.None)
2276 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2282 private static readonly Interop.Settings.SystemSettingsChangedCallback s_ultraDataSavePackageListChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2284 string ultraDataSavePackageList = "None";
2285 UltraDataSavePackageListChangedEventArgs eventArgs = new UltraDataSavePackageListChangedEventArgs(ultraDataSavePackageList);
2286 s_ultraDataSavePackageListChanged?.Invoke(null, eventArgs);
2288 private static event EventHandler<UltraDataSavePackageListChangedEventArgs> s_ultraDataSavePackageListChanged;
2290 /// The UltraDataSavePackageListChanged event is triggered when the current ADS ID state is changed.
2292 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2293 /// <privlevel>platform</privlevel>
2294 /// <feature>http://tizen.org/feature/systemsetting</feature>
2295 /// <feature>http://tizen.org/feature/network.telephony</feature>
2296 /// <exception cref="ArgumentException">Invalid Argument</exception>
2297 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2298 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2299 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2300 public static event EventHandler<UltraDataSavePackageListChangedEventArgs> UltraDataSavePackageListChanged
2304 if (s_ultraDataSavePackageListChanged == null)
2306 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.UltraDataSavePackageList, s_ultraDataSavePackageListChangedCallback, IntPtr.Zero);
2307 if (ret != SystemSettingsError.None)
2309 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2312 s_ultraDataSavePackageListChanged += value;
2317 s_ultraDataSavePackageListChanged -= value;
2318 if (s_ultraDataSavePackageListChanged == null)
2320 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.UltraDataSavePackageList);
2321 if (ret != SystemSettingsError.None)
2323 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2329 private static readonly Interop.Settings.SystemSettingsChangedCallback s_accessibilityTtsChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
2331 bool accessibilityTts = SystemSettings.AccessibilityTtsEnabled;
2332 AccessibilityTtsSettingChangedEventArgs eventArgs = new AccessibilityTtsSettingChangedEventArgs(accessibilityTts);
2333 s_accessibilityTtsChanged?.Invoke(null, eventArgs);
2335 private static event EventHandler<AccessibilityTtsSettingChangedEventArgs> s_accessibilityTtsChanged;
2337 /// THe AccessibilityTtsChanged event is triggered when the screen touch sound enabled status is changed.
2339 /// <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
2340 /// <privlevel>platform</privlevel>
2341 /// <feature>http://tizen.org/feature/systemsetting</feature>
2342 /// <exception cref="ArgumentException">Invalid Argument</exception>
2343 /// <exception cref="NotSupportedException">Not Supported feature</exception>
2344 /// <exception cref="InvalidOperationException">Invalid operation</exception>
2345 /// <exception cref="UnauthorizedAccessException">Thrown when application does not have privilege to access this method.</exception>
2346 public static event EventHandler<AccessibilityTtsSettingChangedEventArgs> AccessibilityTtsSettingChanged
2350 if (s_accessibilityTtsChanged == null)
2352 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.AccessibilityTtsEnabled, s_accessibilityTtsChangedCallback, IntPtr.Zero);
2353 if (ret != SystemSettingsError.None)
2355 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
2358 s_accessibilityTtsChanged += value;
2363 s_accessibilityTtsChanged -= value;
2364 if (s_accessibilityTtsChanged == null)
2367 SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.AccessibilityTtsEnabled);
2368 if (ret != SystemSettingsError.None)
2370 throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");