/// <summary>
/// Indicates whether the motion service is activated
/// </summary>
- public static bool MotionActivation
+ public static bool MotionActivationEnabled
{
get
{
bool isMotionServiceActivated;
- SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.MotionActivation, out isMotionServiceActivated);
+ SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.MotionActivationEnabled, out isMotionServiceActivated);
if (res != SystemSettingsError.None)
{
Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get MotionActivation system setting value.");
}
set
{
- SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.MotionActivation, value);
+ SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.MotionActivationEnabled, value);
if (res != SystemSettingsError.None)
{
throw SystemSettingsExceptionFactory.CreateException(res, "unable to set MotionActivation system setting.");
/// Indicates whether the 24-hour clock is used.
/// If the value is false, the 12-hour clock is used.
/// </summary>
- public static bool LocaleTimeformat24Hour
+ public static bool LocaleTimeFormat24HourEnabled
{
get
{
bool is24HrFormat;
- SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.LocaleTimeformat24Hour, out is24HrFormat);
+ SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, out is24HrFormat);
if (res != SystemSettingsError.None)
{
- Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get LocaleTimeformat24Hour system setting value.");
+ Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get LocaleTimeFormat24Hour system setting value.");
}
return is24HrFormat;
}
set
{
- SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.LocaleTimeformat24Hour, value);
+ SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueBool(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, value);
if (res != SystemSettingsError.None)
{
- throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleTimeformat24Hour system setting.");
+ throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleTimeFormat24Hour system setting.");
}
}
}
/// <summary>
/// Indicates the current time zone.
/// </summary>
- public static string LocaleTimezone
+ public static string LocaleTimeZone
{
get
{
string timeZone;
- SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LocaleTimezone, out timeZone);
+ SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueString(SystemSettingsKeys.LocaleTimeZone, out timeZone);
if (res != SystemSettingsError.None)
{
- Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get LocaleTimezone system setting value.");
+ Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get LocaleTimeZone system setting value.");
}
return timeZone;
}
set
{
- SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.LocaleTimezone, value);
+ SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsSetValueString(SystemSettingsKeys.LocaleTimeZone, value);
if (res != SystemSettingsError.None)
{
- throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleTimezone system setting.");
+ throw SystemSettingsExceptionFactory.CreateException(res, "unable to set LocaleTimeZone system setting.");
}
}
}
/// <summary>
/// Indicates whether the screen lock sound is enabled on the device. ex) LCD on/off sound
/// </summary>
- public static bool SoundLock
+ public static bool SoundLockEnabled
{
get
{
bool isSoundLockEnabled;
- SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundLock, out isSoundLockEnabled);
+ SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundLockEnabled, out isSoundLockEnabled);
if (res != SystemSettingsError.None)
{
Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get SoundLock system setting value.");
/// <summary>
/// Indicates whether the device is in the silent mode.
/// </summary>
- public static bool SoundSilentMode
+ public static bool SoundSilentModeEnabled
{
get
{
bool isSilent;
- SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundSilentMode, out isSilent);
+ SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundSilentModeEnabled, out isSilent);
if (res != SystemSettingsError.None)
{
Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get SoundSilentMode system setting value.");
/// <summary>
/// Indicates whether the screen touch sound is enabled on the device.
/// </summary>
- public static bool SoundTouch
+ public static bool SoundTouchEnabled
{
get
{
bool isTouchSoundEnabled;
- SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundTouch, out isTouchSoundEnabled);
+ SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.SoundTouchEnabled, out isTouchSoundEnabled);
if (res != SystemSettingsError.None)
{
Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get SoundTouch system setting value.");
/// <summary>
/// Indicates whether rotation control is automatic.
/// </summary>
- public static bool DisplayScreenRotationAuto
+ public static bool DisplayScreenRotationAutoEnabled
{
get
{
bool isRotationAutomatic;
- SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.DisplayScreenRotationAuto, out isRotationAutomatic);
+ SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, out isRotationAutomatic);
if (res != SystemSettingsError.None)
{
Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get DisplayScreenRotationAuto system setting value.");
/// <summary>
/// Indicates whether Wi-Fi-related notifications are enabled on the device.
/// </summary>
- public static bool NetworkWifiNotification
+ public static bool NetworkWifiNotificationEnabled
{
get
{
bool isWifiNotificationEnabled;
- SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.NetworkWifiNotification, out isWifiNotificationEnabled);
+ SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.NetworkWifiNotificationEnabled, out isWifiNotificationEnabled);
if (res != SystemSettingsError.None)
{
Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get NetworkWifiNotification system setting value.");
/// <summary>
/// Indicates whether the device is in the flight mode.
/// </summary>
- public static bool NetworkFlightMode
+ public static bool NetworkFlightModeEnabled
{
get
{
bool isFlightModeEnabled;
- SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.NetworkFlightMode, out isFlightModeEnabled);
+ SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueBool(SystemSettingsKeys.NetworkFlightModeEnabled, out isFlightModeEnabled);
if (res != SystemSettingsError.None)
{
Log.Warn(SystemSettingsExceptionFactory.LogTag, "unable to get NetworkFlightMode system setting value.");
private static readonly Interop.Settings.SystemSettingsChangedCallback s_motionActivationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
{
- bool motionActivation = SystemSettings.MotionActivation;
- MotionActivationChangedEventArgs eventArgs = new MotionActivationChangedEventArgs(motionActivation);
+ bool motionActivation = SystemSettings.MotionActivationEnabled;
+ MotionActivationSettingChangedEventArgs eventArgs = new MotionActivationSettingChangedEventArgs(motionActivation);
s_motionActivationChanged?.Invoke(null, eventArgs);
};
- private static event EventHandler<MotionActivationChangedEventArgs> s_motionActivationChanged;
+ private static event EventHandler<MotionActivationSettingChangedEventArgs> s_motionActivationChanged;
/// <summary>
/// MotionActivationChanged event is triggered when the motion service status is changed
/// </summary>
/// <param name="sender"></param>
/// <param name="e">A MotionActivationChangedEventArgs object that contains the key & changed value</param>
- public static event EventHandler<MotionActivationChangedEventArgs> MotionActivationChanged
+ public static event EventHandler<MotionActivationSettingChangedEventArgs> MotionActivationSettingChanged
{
add
{
if (s_motionActivationChanged == null)
{
- SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.MotionActivation, s_motionActivationChangedCallback, IntPtr.Zero);
+ SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.MotionActivationEnabled, s_motionActivationChangedCallback, IntPtr.Zero);
if (ret != SystemSettingsError.None)
{
throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
s_motionActivationChanged -= value;
if (s_motionActivationChanged == null)
{
- SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.MotionActivation);
+ SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.MotionActivationEnabled);
if (ret != SystemSettingsError.None)
{
throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
}
}
- private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeTimeformat24HourChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
+ private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeTimeFormat24HourChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
{
- bool localeTimeFormat24Hour = SystemSettings.LocaleTimeformat24Hour;
- LocaleTimeformat24HourChangedEventArgs eventArgs = new LocaleTimeformat24HourChangedEventArgs(localeTimeFormat24Hour);
- s_localeTimeformat24HourChanged?.Invoke(null, eventArgs);
+ bool localeTimeFormat24Hour = SystemSettings.LocaleTimeFormat24HourEnabled;
+ LocaleTimeFormat24HourSettingChangedEventArgs eventArgs = new LocaleTimeFormat24HourSettingChangedEventArgs(localeTimeFormat24Hour);
+ s_localeTimeFormat24HourChanged?.Invoke(null, eventArgs);
};
- private static event EventHandler<LocaleTimeformat24HourChangedEventArgs> s_localeTimeformat24HourChanged;
+ private static event EventHandler<LocaleTimeFormat24HourSettingChangedEventArgs> s_localeTimeFormat24HourChanged;
/// <summary>
- /// LocaleTimeformat24HourChanged event is triggered when the time format is changed
+ /// LocaleTimeFormat24HourChanged event is triggered when the time format is changed
/// </summary>
/// <param name="sender"></param>
- /// <param name="e">A LocaleTimeformat24HourChangedEventArgs object that contains the key & changed value</param>
- public static event EventHandler<LocaleTimeformat24HourChangedEventArgs> LocaleTimeformat24HourChanged
+ /// <param name="e">A LocaleTimeFormat24HourChangedEventArgs object that contains the key & changed value</param>
+ public static event EventHandler<LocaleTimeFormat24HourSettingChangedEventArgs> LocaleTimeFormat24HourSettingChanged
{
add
{
- if (s_localeTimeformat24HourChanged == null)
+ if (s_localeTimeFormat24HourChanged == null)
{
- SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleTimeformat24Hour, s_localeTimeformat24HourChangedCallback, IntPtr.Zero);
+ SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleTimeFormat24HourEnabled, s_localeTimeFormat24HourChangedCallback, IntPtr.Zero);
if (ret != SystemSettingsError.None)
{
throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
}
}
- s_localeTimeformat24HourChanged += value;
+ s_localeTimeFormat24HourChanged += value;
}
remove
{
- s_localeTimeformat24HourChanged -= value;
- if (s_localeTimeformat24HourChanged == null)
+ s_localeTimeFormat24HourChanged -= value;
+ if (s_localeTimeFormat24HourChanged == null)
{
- SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleTimeformat24Hour);
+ SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleTimeFormat24HourEnabled);
if (ret != SystemSettingsError.None)
{
throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
}
}
- private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeTimezoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
+ private static readonly Interop.Settings.SystemSettingsChangedCallback s_localeTimeZoneChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
{
- string localeTimezone = SystemSettings.LocaleTimezone;
- LocaleTimezoneChangedEventArgs eventArgs = new LocaleTimezoneChangedEventArgs(localeTimezone);
- s_localeTimezoneChanged?.Invoke(null, eventArgs);
+ string localeTimeZone = SystemSettings.LocaleTimeZone;
+ LocaleTimeZoneChangedEventArgs eventArgs = new LocaleTimeZoneChangedEventArgs(localeTimeZone);
+ s_localeTimeZoneChanged?.Invoke(null, eventArgs);
};
- private static event EventHandler<LocaleTimezoneChangedEventArgs> s_localeTimezoneChanged;
+ private static event EventHandler<LocaleTimeZoneChangedEventArgs> s_localeTimeZoneChanged;
/// <summary>
- /// LocaleTimezoneChanged event is triggered when the current time zone is changed
+ /// LocaleTimeZoneChanged event is triggered when the current time zone is changed
/// </summary>
/// <param name="sender"></param>
- /// <param name="e">A LocaleTimezoneChangedEventArgs object that contains the key & changed value</param>
- public static event EventHandler<LocaleTimezoneChangedEventArgs> LocaleTimezoneChanged
+ /// <param name="e">A LocaleTimeZoneChangedEventArgs object that contains the key & changed value</param>
+ public static event EventHandler<LocaleTimeZoneChangedEventArgs> LocaleTimeZoneChanged
{
add
{
- if (s_localeTimezoneChanged == null)
+ if (s_localeTimeZoneChanged == null)
{
- SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleTimezone, s_localeTimezoneChangedCallback, IntPtr.Zero);
+ SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.LocaleTimeZone, s_localeTimeZoneChangedCallback, IntPtr.Zero);
if (ret != SystemSettingsError.None)
{
throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
}
}
- s_localeTimezoneChanged += value;
+ s_localeTimeZoneChanged += value;
}
remove
{
- s_localeTimezoneChanged -= value;
- if (s_localeTimezoneChanged == null)
+ s_localeTimeZoneChanged -= value;
+ if (s_localeTimeZoneChanged == null)
{
- SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleTimezone);
+ SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.LocaleTimeZone);
if (ret != SystemSettingsError.None)
{
throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundLockChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
{
- bool soundLock = SystemSettings.SoundLock;
- SoundLockChangedEventArgs eventArgs = new SoundLockChangedEventArgs(soundLock);
+ bool soundLock = SystemSettings.SoundLockEnabled;
+ SoundLockSettingChangedEventArgs eventArgs = new SoundLockSettingChangedEventArgs(soundLock);
s_soundLockChanged?.Invoke(null, eventArgs);
};
- private static event EventHandler<SoundLockChangedEventArgs> s_soundLockChanged;
+ private static event EventHandler<SoundLockSettingChangedEventArgs> s_soundLockChanged;
/// <summary>
/// SoundLockChanged event is triggered when the screen lock sound enabled status is changed
/// </summary>
/// <param name="sender"></param>
/// <param name="e">A SoundLockChangedEventArgs object that contains the key & changed value</param>
- public static event EventHandler<SoundLockChangedEventArgs> SoundLockChanged
+ public static event EventHandler<SoundLockSettingChangedEventArgs> SoundLockSettingChanged
{
add
{
if (s_soundLockChanged == null)
{
- SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundLock, s_soundLockChangedCallback, IntPtr.Zero);
+ SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundLockEnabled, s_soundLockChangedCallback, IntPtr.Zero);
if (ret != SystemSettingsError.None)
{
throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
s_soundLockChanged -= value;
if (s_soundLockChanged == null)
{
- SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundLock);
+ SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundLockEnabled);
if (ret != SystemSettingsError.None)
{
throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundSilentModeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
{
- bool soundSilentMode = SystemSettings.SoundSilentMode;
- SoundSilentModeChangedEventArgs eventArgs = new SoundSilentModeChangedEventArgs(soundSilentMode);
+ bool soundSilentMode = SystemSettings.SoundSilentModeEnabled;
+ SoundSilentModeSettingChangedEventArgs eventArgs = new SoundSilentModeSettingChangedEventArgs(soundSilentMode);
s_soundSilentModeChanged?.Invoke(null, eventArgs);
};
- private static event EventHandler<SoundSilentModeChangedEventArgs> s_soundSilentModeChanged;
+ private static event EventHandler<SoundSilentModeSettingChangedEventArgs> s_soundSilentModeChanged;
/// <summary>
/// SoundSilentModeChanged event is triggered when the silent mode status is changed
/// </summary>
/// <param name="sender"></param>
/// <param name="e">A SoundSilentModeChangedEventArgs object that contains the key & changed value</param>
- public static event EventHandler<SoundSilentModeChangedEventArgs> SoundSilentModeChanged
+ public static event EventHandler<SoundSilentModeSettingChangedEventArgs> SoundSilentModeSettingChanged
{
add
{
if (s_soundSilentModeChanged == null)
{
- SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundSilentMode, s_soundSilentModeChangedCallback, IntPtr.Zero);
+ SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundSilentModeEnabled, s_soundSilentModeChangedCallback, IntPtr.Zero);
if (ret != SystemSettingsError.None)
{
throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
s_soundSilentModeChanged -= value;
if (s_soundSilentModeChanged == null)
{
- SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundSilentMode);
+ SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundSilentModeEnabled);
if (ret != SystemSettingsError.None)
{
throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
private static readonly Interop.Settings.SystemSettingsChangedCallback s_soundTouchChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
{
- bool soundTouch = SystemSettings.SoundTouch;
- SoundTouchChangedEventArgs eventArgs = new SoundTouchChangedEventArgs(soundTouch);
+ bool soundTouch = SystemSettings.SoundTouchEnabled;
+ SoundTouchSettingChangedEventArgs eventArgs = new SoundTouchSettingChangedEventArgs(soundTouch);
s_soundTouchChanged?.Invoke(null, eventArgs);
};
- private static event EventHandler<SoundTouchChangedEventArgs> s_soundTouchChanged;
+ private static event EventHandler<SoundTouchSettingChangedEventArgs> s_soundTouchChanged;
/// <summary>
/// SoundTouchChanged event is triggered when the screen touch sound enabled status is changed
/// </summary>
/// <param name="sender"></param>
/// <param name="e">A SoundTouchChangedEventArgs object that contains the key & changed value</param>
- public static event EventHandler<SoundTouchChangedEventArgs> SoundTouchChanged
+ public static event EventHandler<SoundTouchSettingChangedEventArgs> SoundTouchSettingChanged
{
add
{
if (s_soundTouchChanged == null)
{
- SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundTouch, s_soundTouchChangedCallback, IntPtr.Zero);
+ SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.SoundTouchEnabled, s_soundTouchChangedCallback, IntPtr.Zero);
if (ret != SystemSettingsError.None)
{
throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
s_soundTouchChanged -= value;
if (s_soundTouchChanged == null)
{
- SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundTouch);
+ SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.SoundTouchEnabled);
if (ret != SystemSettingsError.None)
{
throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
private static readonly Interop.Settings.SystemSettingsChangedCallback s_displayScreenRotationAutoChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
{
- bool displayScreenRotationAuto = SystemSettings.DisplayScreenRotationAuto;
- DisplayScreenRotationAutoChangedEventArgs eventArgs = new DisplayScreenRotationAutoChangedEventArgs(displayScreenRotationAuto);
+ bool displayScreenRotationAuto = SystemSettings.DisplayScreenRotationAutoEnabled;
+ DisplayScreenRotationAutoSettingChangedEventArgs eventArgs = new DisplayScreenRotationAutoSettingChangedEventArgs(displayScreenRotationAuto);
s_displayScreenRotationAutoChanged?.Invoke(null, eventArgs);
};
- private static event EventHandler<DisplayScreenRotationAutoChangedEventArgs> s_displayScreenRotationAutoChanged;
+ private static event EventHandler<DisplayScreenRotationAutoSettingChangedEventArgs> s_displayScreenRotationAutoChanged;
/// <summary>
/// DisplayScreenRotationAutoChanged event is triggered when the automatic rotation control status is changed
/// </summary>
/// <param name="sender"></param>
/// <param name="e">A DisplayScreenRotationAutoChangedEventArgs object that contains the key & changed value</param>
- public static event EventHandler<DisplayScreenRotationAutoChangedEventArgs> DisplayScreenRotationAutoChanged
+ public static event EventHandler<DisplayScreenRotationAutoSettingChangedEventArgs> DisplayScreenRotationAutoSettingChanged
{
add
{
if (s_displayScreenRotationAutoChanged == null)
{
- SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DisplayScreenRotationAuto, s_displayScreenRotationAutoChangedCallback, IntPtr.Zero);
+ SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.DisplayScreenRotationAutoEnabled, s_displayScreenRotationAutoChangedCallback, IntPtr.Zero);
if (ret != SystemSettingsError.None)
{
throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
s_displayScreenRotationAutoChanged -= value;
if (s_displayScreenRotationAutoChanged == null)
{
- SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DisplayScreenRotationAuto);
+ SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.DisplayScreenRotationAutoEnabled);
if (ret != SystemSettingsError.None)
{
throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
private static readonly Interop.Settings.SystemSettingsChangedCallback s_networkWifiNotificationChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
{
- bool networkWifiNotification = SystemSettings.NetworkWifiNotification;
- NetworkWifiNotificationChangedEventArgs eventArgs = new NetworkWifiNotificationChangedEventArgs(networkWifiNotification);
+ bool networkWifiNotification = SystemSettings.NetworkWifiNotificationEnabled;
+ NetworkWifiNotificationSettingChangedEventArgs eventArgs = new NetworkWifiNotificationSettingChangedEventArgs(networkWifiNotification);
s_networkWifiNotificationChanged?.Invoke(null, eventArgs);
};
- private static event EventHandler<NetworkWifiNotificationChangedEventArgs> s_networkWifiNotificationChanged;
+ private static event EventHandler<NetworkWifiNotificationSettingChangedEventArgs> s_networkWifiNotificationChanged;
/// <summary>
/// NetworkWifiNotificationChanged event is triggered when the Wi-Fi-related notifications enabled status is changed
/// </summary>
/// <param name="sender"></param>
/// <param name="e">A NetworkWifiNotificationChangedEventArgs object that contains the key & changed value</param>
- public static event EventHandler<NetworkWifiNotificationChangedEventArgs> NetworkWifiNotificationChanged
+ public static event EventHandler<NetworkWifiNotificationSettingChangedEventArgs> NetworkWifiNotificationSettingChanged
{
add
{
if (s_networkWifiNotificationChanged == null)
{
- SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.NetworkWifiNotification, s_networkWifiNotificationChangedCallback, IntPtr.Zero);
+ SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.NetworkWifiNotificationEnabled, s_networkWifiNotificationChangedCallback, IntPtr.Zero);
if (ret != SystemSettingsError.None)
{
throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
s_networkWifiNotificationChanged -= value;
if (s_networkWifiNotificationChanged == null)
{
- SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.NetworkWifiNotification);
+ SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.NetworkWifiNotificationEnabled);
if (ret != SystemSettingsError.None)
{
throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
private static readonly Interop.Settings.SystemSettingsChangedCallback s_networkFlightModeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
{
- bool networkFlightMode = SystemSettings.NetworkFlightMode;
- NetworkFlightModeChangedEventArgs eventArgs = new NetworkFlightModeChangedEventArgs(networkFlightMode);
+ bool networkFlightMode = SystemSettings.NetworkFlightModeEnabled;
+ NetworkFlightModeSettingChangedEventArgs eventArgs = new NetworkFlightModeSettingChangedEventArgs(networkFlightMode);
s_networkFlightModeChanged?.Invoke(null, eventArgs);
};
- private static event EventHandler<NetworkFlightModeChangedEventArgs> s_networkFlightModeChanged;
+ private static event EventHandler<NetworkFlightModeSettingChangedEventArgs> s_networkFlightModeChanged;
/// <summary>
/// NetworkFlightModeChanged event is triggered when the flight mode status is changed
/// </summary>
/// <param name="sender"></param>
/// <param name="e">A NetworkFlightModeChangedEventArgs object that contains the key & changed value</param>
- public static event EventHandler<NetworkFlightModeChangedEventArgs> NetworkFlightModeChanged
+ public static event EventHandler<NetworkFlightModeSettingChangedEventArgs> NetworkFlightModeSettingChanged
{
add
{
if (s_networkFlightModeChanged == null)
{
- SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.NetworkFlightMode, s_networkFlightModeChangedCallback, IntPtr.Zero);
+ SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsSetCallback(SystemSettingsKeys.NetworkFlightModeEnabled, s_networkFlightModeChangedCallback, IntPtr.Zero);
if (ret != SystemSettingsError.None)
{
throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
s_networkFlightModeChanged -= value;
if (s_networkFlightModeChanged == null)
{
- SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.NetworkFlightMode);
+ SystemSettingsError ret = (SystemSettingsError)Interop.Settings.SystemSettingsRemoveCallback(SystemSettingsKeys.NetworkFlightModeEnabled);
if (ret != SystemSettingsError.None)
{
throw SystemSettingsExceptionFactory.CreateException(ret, "Error in callback handling");
/// <summary>
/// (bool) Indicates whether the motion service is activated
/// </summary>
- MotionActivation,
+ MotionActivationEnabled,
/// <summary>
/// (string) The file path of the current email alert ringtone
/// </summary>
/// (bool) Indicates whether the 24-hour clock is used.
/// If the value is false, the 12-hour clock is used.
/// </summary>
- LocaleTimeformat24Hour,
+ LocaleTimeFormat24HourEnabled,
/// <summary>
/// (string) Indicates the current time zone.
/// </summary>
- LocaleTimezone,
+ LocaleTimeZone,
/// <summary>
/// (int) Once System changes time, this event occurs to notify time change.
/// </summary>
/// <summary>
/// GET (bool) Indicates whether the screen lock sound is enabled on the device. ex) LCD on/off sound
/// </summary>
- SoundLock,
+ SoundLockEnabled,
/// <summary>
/// GET (bool) Indicates whether the device is in the silent mode.
/// </summary>
- SoundSilentMode,
+ SoundSilentModeEnabled,
/// <summary>
/// GET (bool) Indicates whether the screen touch sound is enabled on the device.
/// </summary>
- SoundTouch,
+ SoundTouchEnabled,
/// <summary>
/// GET (bool) Indicates whether rotation control is automatic.
/// </summary>
- DisplayScreenRotationAuto,
+ DisplayScreenRotationAutoEnabled,
/// <summary>
/// GET (string) Indicates device name.
/// </summary>
/// <summary>
/// GET (bool) Indicates whether Wi-Fi-related notifications are enabled on the device.
/// </summary>
- NetworkWifiNotification,
+ NetworkWifiNotificationEnabled,
/// <summary>
/// GET (bool) Indicates whether the device is in the flight mode.
/// </summary>
- NetworkFlightMode,
+ NetworkFlightModeEnabled,
/// <summary>
/// (int) Indicates the backlight time (in seconds). The following values can be used: 15, 30, 60, 120, 300, and 600.
/// </summary>
/// <summary>
/// EventArgs type for the event MotionActivationChanged
/// </summary>
- public class MotionActivationChangedEventArgs : EventArgs
+ public class MotionActivationSettingChangedEventArgs : EventArgs
{
private readonly bool _motionActivation;
/// <summary>
{
get
{
- return SystemSettingsKeys.MotionActivation;
+ return SystemSettingsKeys.MotionActivationEnabled;
}
}
- internal MotionActivationChangedEventArgs(bool val)
+ internal MotionActivationSettingChangedEventArgs(bool val)
{
_motionActivation = val;
}
}
/// <summary>
- /// EventArgs type for the event LocaleTimeformat24HourChanged
+ /// EventArgs type for the event LocaleTimeFormat24HourChanged
/// </summary>
- public class LocaleTimeformat24HourChangedEventArgs : EventArgs
+ public class LocaleTimeFormat24HourSettingChangedEventArgs : EventArgs
{
- private readonly bool _localeTimeformat24Hour;
+ private readonly bool _localeTimeFormat24Hour;
/// <summary>
- /// The enum for LocaleTimeformat24Hour system setting key
+ /// The enum for LocaleTimeFormat24Hour system setting key
/// </summary>
public SystemSettingsKeys Key
{
get
{
- return SystemSettingsKeys.LocaleTimeformat24Hour;
+ return SystemSettingsKeys.LocaleTimeFormat24HourEnabled;
}
}
- internal LocaleTimeformat24HourChangedEventArgs(bool val)
+ internal LocaleTimeFormat24HourSettingChangedEventArgs(bool val)
{
- _localeTimeformat24Hour = val;
+ _localeTimeFormat24Hour = val;
}
/// <summary>
{
get
{
- return _localeTimeformat24Hour;
+ return _localeTimeFormat24Hour;
}
}
}
/// <summary>
- /// EventArgs type for the event LocaleTimezoneChanged
+ /// EventArgs type for the event LocaleTimeZoneChanged
/// </summary>
- public class LocaleTimezoneChangedEventArgs : EventArgs
+ public class LocaleTimeZoneChangedEventArgs : EventArgs
{
- private readonly string _localeTimezone = null;
+ private readonly string _localeTimeZone = null;
/// <summary>
- /// The enum for LocaleTimezone system setting key
+ /// The enum for LocaleTimeZone system setting key
/// </summary>
public SystemSettingsKeys Key
{
get
{
- return SystemSettingsKeys.LocaleTimezone;
+ return SystemSettingsKeys.LocaleTimeZone;
}
}
- internal LocaleTimezoneChangedEventArgs(string val)
+ internal LocaleTimeZoneChangedEventArgs(string val)
{
- _localeTimezone = val;
+ _localeTimeZone = val;
}
/// <summary>
{
get
{
- return _localeTimezone;
+ return _localeTimeZone;
}
}
}
/// <summary>
/// EventArgs type for the event SoundLockChanged
/// </summary>
- public class SoundLockChangedEventArgs : EventArgs
+ public class SoundLockSettingChangedEventArgs : EventArgs
{
private readonly bool _soundLock;
/// <summary>
{
get
{
- return SystemSettingsKeys.SoundLock;
+ return SystemSettingsKeys.SoundLockEnabled;
}
}
- internal SoundLockChangedEventArgs(bool val)
+ internal SoundLockSettingChangedEventArgs(bool val)
{
_soundLock = val;
}
/// <summary>
/// EventArgs type for the event SoundSilentModeChanged
/// </summary>
- public class SoundSilentModeChangedEventArgs : EventArgs
+ public class SoundSilentModeSettingChangedEventArgs : EventArgs
{
private readonly bool _soundSilentMode;
/// <summary>
{
get
{
- return SystemSettingsKeys.SoundSilentMode;
+ return SystemSettingsKeys.SoundSilentModeEnabled;
}
}
- internal SoundSilentModeChangedEventArgs(bool val)
+ internal SoundSilentModeSettingChangedEventArgs(bool val)
{
_soundSilentMode = val;
}
/// <summary>
/// EventArgs type for the event SoundTouchChanged
/// </summary>
- public class SoundTouchChangedEventArgs : EventArgs
+ public class SoundTouchSettingChangedEventArgs : EventArgs
{
private readonly bool _soundTouch;
/// <summary>
{
get
{
- return SystemSettingsKeys.SoundTouch;
+ return SystemSettingsKeys.SoundTouchEnabled;
}
}
- internal SoundTouchChangedEventArgs(bool val)
+ internal SoundTouchSettingChangedEventArgs(bool val)
{
_soundTouch = val;
}
/// <summary>
/// EventArgs type for the event DisplayScreenRotationAutoChanged
/// </summary>
- public class DisplayScreenRotationAutoChangedEventArgs : EventArgs
+ public class DisplayScreenRotationAutoSettingChangedEventArgs : EventArgs
{
private readonly bool _displayScreenRotationAuto;
/// <summary>
{
get
{
- return SystemSettingsKeys.DisplayScreenRotationAuto;
+ return SystemSettingsKeys.DisplayScreenRotationAutoEnabled;
}
}
- internal DisplayScreenRotationAutoChangedEventArgs(bool val)
+ internal DisplayScreenRotationAutoSettingChangedEventArgs(bool val)
{
_displayScreenRotationAuto = val;
}
/// <summary>
/// EventArgs type for the event NetworkWifiNotificationChanged
/// </summary>
- public class NetworkWifiNotificationChangedEventArgs : EventArgs
+ public class NetworkWifiNotificationSettingChangedEventArgs : EventArgs
{
private readonly bool _networkWifiNotification;
/// <summary>
{
get
{
- return SystemSettingsKeys.NetworkWifiNotification;
+ return SystemSettingsKeys.NetworkWifiNotificationEnabled;
}
}
- internal NetworkWifiNotificationChangedEventArgs(bool val)
+ internal NetworkWifiNotificationSettingChangedEventArgs(bool val)
{
_networkWifiNotification = val;
}
/// <summary>
/// EventArgs type for the event NetworkFlightModeChanged
/// </summary>
- public class NetworkFlightModeChangedEventArgs : EventArgs
+ public class NetworkFlightModeSettingChangedEventArgs : EventArgs
{
private readonly bool _networkFlightMode;
/// <summary>
{
get
{
- return SystemSettingsKeys.NetworkFlightMode;
+ return SystemSettingsKeys.NetworkFlightModeEnabled;
}
}
- internal NetworkFlightModeChangedEventArgs(bool val)
+ internal NetworkFlightModeSettingChangedEventArgs(bool val)
{
_networkFlightMode = val;
}
</ItemGroup>
<ItemGroup>
<Compile Include="SystemSettingsEventArgs.cs" />
- <Compile Include="Interop\Interop.Settings.cs" />
+ <Compile Include="Interop\Interop.SystemSettings.cs" />
<Compile Include="SystemSettings.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SystemSettingsEnums.cs" />
<Compile Include="SystemSettingsExceptionFactory.cs" />
</ItemGroup>
<ItemGroup>
- <None Include="packaging\csapi-tizen.system.manifest" />
- <None Include="packaging\csapi-tizen.system.pc.in" />
- <None Include="packaging\csapi-tizen.system.spec" />
<None Include="Tizen.System.SystemSettings.snk" />
</ItemGroup>
<ItemGroup />
[SetUp]
public static void Init()
{
+ //LogUtils.write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST");
}
[TearDown]
public static void Destroy()
{
+ //LogUtils.write(LogUtils.DEBUG, LogUtils.TAG, "Postconditions for each TEST");
}
// IncomingCallRingtone
await Task.Delay(5000);
Assert.IsTrue(s_incomingCallRingtoneCallbackCalled);
s_incomingCallRingtoneCallbackCalled = false;
+ Tizen.System.SystemSettings.SystemSettings.IncomingCallRingtoneChanged -= OnIncomingCallRingtoneChanged;
+ Tizen.System.SystemSettings.SystemSettings.IncomingCallRingtone = s_incomingCallRingtoneValue;
+ await Task.Delay(5000);
+ Assert.IsFalse(s_incomingCallRingtoneCallbackCalled);
}
private static void OnIncomingCallRingtoneChanged(object sender, Tizen.System.SystemSettings.IncomingCallRingtoneChangedEventArgs e)
{
await Task.Delay(5000);
Assert.IsTrue(s_wallpaperHomeScreenCallbackCalled);
s_wallpaperHomeScreenCallbackCalled = false;
+ Tizen.System.SystemSettings.SystemSettings.WallpaperHomeScreenChanged -= OnWallpaperHomeScreenChanged;
+ Tizen.System.SystemSettings.SystemSettings.WallpaperHomeScreen = s_wallpaperHomeScreenValue;
+ await Task.Delay(5000);
+ Assert.IsFalse(s_wallpaperHomeScreenCallbackCalled);
}
private static void OnWallpaperHomeScreenChanged(object sender, Tizen.System.SystemSettings.WallpaperHomeScreenChangedEventArgs e)
{
await Task.Delay(5000);
Assert.IsTrue(s_wallpaperLockScreenCallbackCalled);
s_wallpaperLockScreenCallbackCalled = false;
+ Tizen.System.SystemSettings.SystemSettings.WallpaperLockScreenChanged -= OnWallpaperLockScreenChanged;
+ Tizen.System.SystemSettings.SystemSettings.WallpaperLockScreen = s_wallpaperLockScreenValue;
+ await Task.Delay(5000);
+ Assert.IsFalse(s_wallpaperLockScreenCallbackCalled);
}
private static void OnWallpaperLockScreenChanged(object sender, Tizen.System.SystemSettings.WallpaperLockScreenChangedEventArgs e)
{
Tizen.System.SystemSettings.SystemSettings.FontSizeChanged -= OnFontSizeChangedSmall;
Assert.IsTrue(s_fontSizeSmallCallbackCalled);
s_fontSizeSmallCallbackCalled = false;
+ Tizen.System.SystemSettings.SystemSettings.FontSize = Tizen.System.SystemSettings.SystemSettingsFontSize.Small;
+ await Task.Delay(5000);
+ Assert.IsFalse(s_fontSizeSmallCallbackCalled);
}
private static void OnFontSizeChangedSmall(object sender, Tizen.System.SystemSettings.FontSizeChangedEventArgs e)
{
Tizen.System.SystemSettings.SystemSettings.FontSizeChanged -= OnFontSizeChangedNormal;
Assert.IsTrue(s_fontSizeNormalCallbackCalled);
s_fontSizeNormalCallbackCalled = false;
+ Tizen.System.SystemSettings.SystemSettings.FontSize = Tizen.System.SystemSettings.SystemSettingsFontSize.Normal;
+ await Task.Delay(5000);
+ Assert.IsFalse(s_fontSizeNormalCallbackCalled);
}
private static void OnFontSizeChangedNormal(object sender, Tizen.System.SystemSettings.FontSizeChangedEventArgs e)
{
Tizen.System.SystemSettings.SystemSettings.FontSizeChanged -= OnFontSizeChangedLarge;
Assert.IsTrue(s_fontSizeLargeCallbackCalled);
s_fontSizeLargeCallbackCalled = false;
+ Tizen.System.SystemSettings.SystemSettings.FontSize = Tizen.System.SystemSettings.SystemSettingsFontSize.Large;
+ await Task.Delay(5000);
+ Assert.IsFalse(s_fontSizeLargeCallbackCalled);
}
private static void OnFontSizeChangedLarge(object sender, Tizen.System.SystemSettings.FontSizeChangedEventArgs e)
{
Tizen.System.SystemSettings.SystemSettings.FontSizeChanged -= OnFontSizeChangedHuge;
Assert.IsTrue(s_fontSizeHugeCallbackCalled);
s_fontSizeHugeCallbackCalled = false;
+ Tizen.System.SystemSettings.SystemSettings.FontSize = Tizen.System.SystemSettings.SystemSettingsFontSize.Huge;
+ await Task.Delay(5000);
+ Assert.IsFalse(s_fontSizeHugeCallbackCalled);
}
private static void OnFontSizeChangedHuge(object sender, Tizen.System.SystemSettings.FontSizeChangedEventArgs e)
{
Tizen.System.SystemSettings.SystemSettings.FontSizeChanged -= OnFontSizeChangedGiant;
Assert.IsTrue(s_fontSizeGiantCallbackCalled);
s_fontSizeGiantCallbackCalled = false;
+ Tizen.System.SystemSettings.SystemSettings.FontSize = Tizen.System.SystemSettings.SystemSettingsFontSize.Giant;
+ await Task.Delay(5000);
+ Assert.IsFalse(s_fontSizeGiantCallbackCalled);
}
private static void OnFontSizeChangedGiant(object sender, Tizen.System.SystemSettings.FontSizeChangedEventArgs e)
{
await Task.Delay(5000);
Assert.IsTrue(s_fontTypeCallbackCalled);
s_fontTypeCallbackCalled = false;
+ Tizen.System.SystemSettings.SystemSettings.FontTypeChanged -= OnFontTypeChanged;
+ Tizen.System.SystemSettings.SystemSettings.FontType = s_fontTypeValue;
+ await Task.Delay(5000);
+ Assert.IsFalse(s_fontTypeCallbackCalled);
}
private static void OnFontTypeChanged(object sender, Tizen.System.SystemSettings.FontTypeChangedEventArgs e)
{
public static void MotionActivation_READ_WRITE()
{
/* TEST CODE */
- Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.SystemSettings.MotionActivation);
- Tizen.System.SystemSettings.SystemSettings.MotionActivation = true;
- Assert.IsTrue(Tizen.System.SystemSettings.SystemSettings.MotionActivation, "MotionActivation_READ_WRITE: Set value and get value of the property should be same.");
- Tizen.System.SystemSettings.SystemSettings.MotionActivation = false;
- Assert.IsFalse(Tizen.System.SystemSettings.SystemSettings.MotionActivation, "MotionActivation_READ_WRITE: Set value and get value of the property should be same.");
+ Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.SystemSettings.MotionActivationEnabled);
+ Tizen.System.SystemSettings.SystemSettings.MotionActivationEnabled = true;
+ Assert.IsTrue(Tizen.System.SystemSettings.SystemSettings.MotionActivationEnabled, "MotionActivation_READ_WRITE: Set value and get value of the property should be same.");
+ Tizen.System.SystemSettings.SystemSettings.MotionActivationEnabled = false;
+ Assert.IsFalse(Tizen.System.SystemSettings.SystemSettings.MotionActivationEnabled, "MotionActivation_READ_WRITE: Set value and get value of the property should be same.");
}
private static bool s_motionActivationCallbackCalled = false;
- private static bool s_motionActivationValue = !Tizen.System.SystemSettings.SystemSettings.MotionActivation;
+ private static bool s_motionActivationValue = !Tizen.System.SystemSettings.SystemSettings.MotionActivationEnabled;
[Test]
[Category("P1")]
[Description("Check if callback to SystemSettings:MotionActivationChanged event is called")]
[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
public static async Task MotionActivationChanged_CHECK_EVENT()
{
- Tizen.System.SystemSettings.SystemSettings.MotionActivationChanged += OnMotionActivationChanged;
- Tizen.System.SystemSettings.SystemSettings.MotionActivation = s_motionActivationValue;
+ Tizen.System.SystemSettings.SystemSettings.MotionActivationSettingChanged += OnMotionActivationChanged;
+ Tizen.System.SystemSettings.SystemSettings.MotionActivationEnabled = s_motionActivationValue;
await Task.Delay(5000);
Assert.IsTrue(s_motionActivationCallbackCalled);
-
s_motionActivationCallbackCalled = false;
s_motionActivationValue = !s_motionActivationValue;
- Tizen.System.SystemSettings.SystemSettings.MotionActivation = s_motionActivationValue;
+ Tizen.System.SystemSettings.SystemSettings.MotionActivationEnabled = s_motionActivationValue;
await Task.Delay(5000);
Assert.IsTrue(s_motionActivationCallbackCalled);
s_motionActivationCallbackCalled = false;
+
+ Tizen.System.SystemSettings.SystemSettings.MotionActivationSettingChanged -= OnMotionActivationChanged;
+ Tizen.System.SystemSettings.SystemSettings.MotionActivationEnabled = s_motionActivationValue;
+ await Task.Delay(5000);
+ Assert.IsFalse(s_motionActivationCallbackCalled);
}
- private static void OnMotionActivationChanged(object sender, Tizen.System.SystemSettings.MotionActivationChangedEventArgs e)
+ private static void OnMotionActivationChanged(object sender, Tizen.System.SystemSettings.MotionActivationSettingChangedEventArgs e)
{
s_motionActivationCallbackCalled = true;
Assert.IsInstanceOf<bool>(e.Value);
await Task.Delay(5000);
Assert.IsTrue(s_emailAlertRingtoneCallbackCalled);
s_emailAlertRingtoneCallbackCalled = false;
+ Tizen.System.SystemSettings.SystemSettings.EmailAlertRingtoneChanged -= OnEmailAlertRingtoneChanged;
+ Tizen.System.SystemSettings.SystemSettings.EmailAlertRingtone = s_emailAlertRingtoneValue;
+ await Task.Delay(5000);
+ Assert.IsFalse(s_emailAlertRingtoneCallbackCalled);
}
private static void OnEmailAlertRingtoneChanged(object sender, Tizen.System.SystemSettings.EmailAlertRingtoneChangedEventArgs e)
{
await Task.Delay(5000);
Assert.IsTrue(s_usbDebuggingCallbackCalled);
s_usbDebuggingCallbackCalled = false;
+
+ Tizen.System.SystemSettings.SystemSettings.UsbDebuggingSettingChanged -= OnUsbDebuggingSettingChanged;
+ Tizen.System.SystemSettings.SystemSettings.UsbDebuggingEnabled = s_usbDebuggingSettingValue;
+ await Task.Delay(5000);
+ Assert.IsFalse(s_usbDebuggingCallbackCalled);
}
private static void OnUsbDebuggingSettingChanged(object sender, Tizen.System.SystemSettings.UsbDebuggingSettingChangedEventArgs e)
{
await Task.Delay(5000);
Assert.IsTrue(s_data3GNetworkCallbackCalled);
s_data3GNetworkCallbackCalled = false;
+
+ Tizen.System.SystemSettings.SystemSettings.Data3GNetworkSettingChanged -= OnData3GNetworkSettingChanged;
+ Tizen.System.SystemSettings.SystemSettings.Data3GNetworkEnabled = s_data3GNetworkSettingValue;
+ await Task.Delay(5000);
+ Assert.IsFalse(s_data3GNetworkCallbackCalled);
}
private static void OnData3GNetworkSettingChanged(object sender, Tizen.System.SystemSettings.Data3GNetworkSettingChangedEventArgs e)
{
await Task.Delay(5000);
Assert.IsTrue(s_lockScreenAppCallbackCalled);
s_lockScreenAppCallbackCalled = false;
+ Tizen.System.SystemSettings.SystemSettings.LockscreenAppChanged -= OnLockscreenAppChanged;
+ Tizen.System.SystemSettings.SystemSettings.LockscreenApp = s_lockscreenAppValue;
+ await Task.Delay(5000);
+ Assert.IsFalse(s_lockScreenAppCallbackCalled);
}
private static void OnLockscreenAppChanged(object sender, Tizen.System.SystemSettings.LockscreenAppChangedEventArgs e)
{
await Task.Delay(5000);
Assert.IsTrue(s_localeCountryCallbackCalled);
s_localeCountryCallbackCalled = false;
+ Tizen.System.SystemSettings.SystemSettings.LocaleCountryChanged -= OnLocaleCountryChanged;
+ Tizen.System.SystemSettings.SystemSettings.LocaleCountry = s_localeCountryValue;
+ await Task.Delay(5000);
+ Assert.IsFalse(s_localeCountryCallbackCalled);
}
private static void OnLocaleCountryChanged(object sender, Tizen.System.SystemSettings.LocaleCountryChangedEventArgs e)
{
await Task.Delay(5000);
Assert.IsTrue(s_localeLanguageCallbackCalled);
s_localeLanguageCallbackCalled = false;
+ Tizen.System.SystemSettings.SystemSettings.LocaleLanguageChanged -= OnLocaleLanguageChanged;
+ Tizen.System.SystemSettings.SystemSettings.LocaleLanguage = s_localeLanguageValue;
+ await Task.Delay(5000);
+ Assert.IsFalse(s_localeLanguageCallbackCalled);
}
private static void OnLocaleLanguageChanged(object sender, Tizen.System.SystemSettings.LocaleLanguageChangedEventArgs e)
{
public static void LocaleTimeformat24Hour_READ_WRITE()
{
/* TEST CODE */
- Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.SystemSettings.LocaleTimeformat24Hour);
- Tizen.System.SystemSettings.SystemSettings.LocaleTimeformat24Hour = true;
- Assert.IsTrue(Tizen.System.SystemSettings.SystemSettings.LocaleTimeformat24Hour, "LocaleTimeformat24Hour_READ_WRITE: Set value and get value of the property should be same.");
- Tizen.System.SystemSettings.SystemSettings.LocaleTimeformat24Hour = false;
- Assert.IsFalse(Tizen.System.SystemSettings.SystemSettings.LocaleTimeformat24Hour, "LocaleTimeformat24Hour_READ_WRITE: Set value and get value of the property should be same.");
+ Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.SystemSettings.LocaleTimeFormat24HourEnabled);
+ Tizen.System.SystemSettings.SystemSettings.LocaleTimeFormat24HourEnabled = true;
+ Assert.IsTrue(Tizen.System.SystemSettings.SystemSettings.LocaleTimeFormat24HourEnabled, "LocaleTimeformat24Hour_READ_WRITE: Set value and get value of the property should be same.");
+ Tizen.System.SystemSettings.SystemSettings.LocaleTimeFormat24HourEnabled = false;
+ Assert.IsFalse(Tizen.System.SystemSettings.SystemSettings.LocaleTimeFormat24HourEnabled, "LocaleTimeformat24Hour_READ_WRITE: Set value and get value of the property should be same.");
}
private static bool s_timeFormatCallbackCalled = false;
- private static bool s_localeTimeformat24HourValue = !Tizen.System.SystemSettings.SystemSettings.LocaleTimeformat24Hour;
+ private static bool s_localeTimeformat24HourValue = !Tizen.System.SystemSettings.SystemSettings.LocaleTimeFormat24HourEnabled;
[Test]
[Category("P1")]
[Description("Check if callback to SystemSettings:LocaleTimeformat24HourChanged event is called")]
[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
public static async Task LocaleTimeformat24HourChanged_CHECK_EVENT()
{
- Tizen.System.SystemSettings.SystemSettings.LocaleTimeformat24HourChanged += OnLocaleTimeformat24HourChanged;
- Tizen.System.SystemSettings.SystemSettings.LocaleTimeformat24Hour = s_localeTimeformat24HourValue;
+ Tizen.System.SystemSettings.SystemSettings.LocaleTimeFormat24HourSettingChanged += OnLocaleTimeformat24HourChanged;
+ Tizen.System.SystemSettings.SystemSettings.LocaleTimeFormat24HourEnabled = s_localeTimeformat24HourValue;
await Task.Delay(5000);
Assert.IsTrue(s_timeFormatCallbackCalled);
s_timeFormatCallbackCalled = false;
s_localeTimeformat24HourValue = !s_localeTimeformat24HourValue;
- Tizen.System.SystemSettings.SystemSettings.LocaleTimeformat24Hour = s_localeTimeformat24HourValue;
+ Tizen.System.SystemSettings.SystemSettings.LocaleTimeFormat24HourEnabled = s_localeTimeformat24HourValue;
await Task.Delay(5000);
Assert.IsTrue(s_timeFormatCallbackCalled);
s_timeFormatCallbackCalled = false;
+
+ Tizen.System.SystemSettings.SystemSettings.LocaleTimeFormat24HourSettingChanged -= OnLocaleTimeformat24HourChanged;
+ Tizen.System.SystemSettings.SystemSettings.LocaleTimeFormat24HourEnabled = s_localeTimeformat24HourValue;
+ await Task.Delay(5000);
+ Assert.IsFalse(s_timeFormatCallbackCalled);
}
- private static void OnLocaleTimeformat24HourChanged(object sender, Tizen.System.SystemSettings.LocaleTimeformat24HourChangedEventArgs e)
+ private static void OnLocaleTimeformat24HourChanged(object sender, Tizen.System.SystemSettings.LocaleTimeFormat24HourSettingChangedEventArgs e)
{
s_timeFormatCallbackCalled = true;
Assert.IsInstanceOf<bool>(e.Value);
public static void LocaleTimezone_READ_WRITE()
{
/* TEST CODE */
- Assert.IsInstanceOf<string>(Tizen.System.SystemSettings.SystemSettings.LocaleTimezone);
+ Assert.IsInstanceOf<string>(Tizen.System.SystemSettings.SystemSettings.LocaleTimeZone);
var setValue = "Pacific/Tahiti";
- Tizen.System.SystemSettings.SystemSettings.LocaleTimezone = setValue;
- var getValue = Tizen.System.SystemSettings.SystemSettings.LocaleTimezone;
+ Tizen.System.SystemSettings.SystemSettings.LocaleTimeZone = setValue;
+ var getValue = Tizen.System.SystemSettings.SystemSettings.LocaleTimeZone;
Assert.IsTrue(setValue.CompareTo(getValue) == 0, "LocaleTimezone_READ_WRITE: Set value and get value of the property should be same.");
}
[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
public static async Task LocaleTimezoneChanged_CHECK_EVENT()
{
- Tizen.System.SystemSettings.SystemSettings.LocaleTimezoneChanged += OnLocaleTimezoneChanged;
- Tizen.System.SystemSettings.SystemSettings.LocaleTimezone = s_localeTimezoneValue;
+ Tizen.System.SystemSettings.SystemSettings.LocaleTimeZoneChanged += OnLocaleTimezoneChanged;
+ Tizen.System.SystemSettings.SystemSettings.LocaleTimeZone = s_localeTimezoneValue;
await Task.Delay(5000);
Assert.IsTrue(s_localeTimeZoneCallbackCalled);
s_localeTimeZoneCallbackCalled = false;
+
+ Tizen.System.SystemSettings.SystemSettings.LocaleTimeZoneChanged -= OnLocaleTimezoneChanged;
+ Tizen.System.SystemSettings.SystemSettings.LocaleTimeZone = s_localeTimezoneValue;
+ await Task.Delay(5000);
+ Assert.IsFalse(s_localeTimeZoneCallbackCalled);
}
- private static void OnLocaleTimezoneChanged(object sender, Tizen.System.SystemSettings.LocaleTimezoneChangedEventArgs e)
+ private static void OnLocaleTimezoneChanged(object sender, Tizen.System.SystemSettings.LocaleTimeZoneChangedEventArgs e)
{
s_localeTimeZoneCallbackCalled = true;
Assert.IsInstanceOf<string>(e.Value);
public static void SoundLock_READ_ONLY()
{
/* TEST CODE */
- Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.SystemSettings.SoundLock);
+ Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.SystemSettings.SoundLockEnabled);
}
// SoundSilentMode
public static void SoundSilentMode_READ_ONLY()
{
/* TEST CODE */
- Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.SystemSettings.SoundSilentMode);
+ Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.SystemSettings.SoundSilentModeEnabled);
}
// SoundTouch
public static void SoundTouch_READ_ONLY()
{
/* TEST CODE */
- Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.SystemSettings.SoundTouch);
+ Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.SystemSettings.SoundTouchEnabled);
}
// DisplayScreenRotationAuto
public static void DisplayScreenRotationAuto_READ_ONLY()
{
/* TEST CODE */
- Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.SystemSettings.DisplayScreenRotationAuto);
+ Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.SystemSettings.DisplayScreenRotationAutoEnabled);
}
// DeviceName
public static void NetworkWifiNotification_READ_ONLY()
{
/* TEST CODE */
- Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.SystemSettings.NetworkWifiNotification);
+ Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.SystemSettings.NetworkWifiNotificationEnabled);
}
// NetworkFlightMode
public static void NetworkFlightMode_READ_ONLY()
{
/* TEST CODE */
- Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.SystemSettings.NetworkFlightMode);
+ Assert.IsInstanceOf<bool>(Tizen.System.SystemSettings.SystemSettings.NetworkFlightModeEnabled);
}
//// ScreenBacklightTime
//}
// SoundNotification
- [Test]
- [Category("P1")]
- [Description("Test if set/get for SystemSettings:SoundNotification is working properly")]
- [Property("SPEC", "Tizen.System.SystemSettings.SystemSettings.SoundNotification A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
- public static void SoundNotification_READ_WRITE()
- {
- /* TEST CODE */
- Assert.IsInstanceOf<string>(Tizen.System.SystemSettings.SystemSettings.SoundNotification);
- var setValue = "/opt/share/settings/Alerts/General notification_sdk.wav";
- Tizen.System.SystemSettings.SystemSettings.SoundNotification = setValue;
- var getValue = Tizen.System.SystemSettings.SystemSettings.SoundNotification;
- Assert.IsTrue(setValue.CompareTo(getValue) == 0, "SoundNotification_READ_WRITE: Set value and get value of the property should be same.");
- }
+ //[Test]
+ //[Category("P1")]
+ //[Description("Test if set/get for SystemSettings:SoundNotification is working properly")]
+ //[Property("SPEC", "Tizen.System.SystemSettings.SystemSettings.SoundNotification A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "PRW")]
+ //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
+ //public static void SoundNotification_READ_WRITE()
+ //{
+ // /* TEST CODE */
+ // Assert.IsInstanceOf<string>(Tizen.System.SystemSettings.SystemSettings.SoundNotification);
+ // var setValue = "/opt/share/settings/Alerts/General notification_sdk.wav";
+ // Tizen.System.SystemSettings.SystemSettings.SoundNotification = setValue;
+ // var getValue = Tizen.System.SystemSettings.SystemSettings.SoundNotification;
+ // Assert.IsTrue(setValue.CompareTo(getValue) == 0, "SoundNotification_READ_WRITE: Set value and get value of the property should be same.");
+ //}
- private static bool s_soundNotificationCallbackCalled = false;
- private static readonly string s_soundNotificationValue = "/opt/share/settings/Alerts/General notification_sdk.wav";
- [Test]
- [Category("P1")]
- [Description("Check if callback to SystemSettings:SoundNotificationChanged event is called")]
- [Property("SPEC", "Tizen.System.SystemSettings.SystemSettings.SoundNotificationChanged A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "EVL")]
- [Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
- public static async Task SoundNotificationChanged_CHECK_EVENT()
- {
- Tizen.System.SystemSettings.SystemSettings.SoundNotificationChanged += OnSoundNotificationChanged;
- Tizen.System.SystemSettings.SystemSettings.SoundNotification = s_soundNotificationValue;
- await Task.Delay(5000);
- Assert.IsTrue(s_soundNotificationCallbackCalled);
- s_soundNotificationCallbackCalled = false;
- }
- private static void OnSoundNotificationChanged(object sender, Tizen.System.SystemSettings.SoundNotificationChangedEventArgs e)
- {
- s_soundNotificationCallbackCalled = true;
- Assert.IsInstanceOf<string>(e.Value);
- Assert.IsTrue(s_soundNotificationValue.CompareTo(e.Value) == 0, "OnSoundNotificationChanged: The callback should receive the latest value for the property.");
- }
+ //private static bool s_soundNotificationCallbackCalled = false;
+ //private static readonly string s_soundNotificationValue = "/opt/share/settings/Alerts/General notification_sdk.wav";
+ //[Test]
+ //[Category("P1")]
+ //[Description("Check if callback to SystemSettings:SoundNotificationChanged event is called")]
+ //[Property("SPEC", "Tizen.System.SystemSettings.SystemSettings.SoundNotificationChanged A")]
+ //[Property("SPEC_URL", "-")]
+ //[Property("CRITERIA", "EVL")]
+ //[Property("AUTHOR", "Aditya Aswani, a.aswani@samsung.com")]
+ //public static async Task SoundNotificationChanged_CHECK_EVENT()
+ //{
+ // Tizen.System.SystemSettings.SystemSettings.SoundNotificationChanged += OnSoundNotificationChanged;
+ // Tizen.System.SystemSettings.SystemSettings.SoundNotification = s_soundNotificationValue;
+ // await Task.Delay(5000);
+ // Assert.IsTrue(s_soundNotificationCallbackCalled);
+
+ // s_soundNotificationCallbackCalled = false;
+ // Tizen.System.SystemSettings.SystemSettings.SoundNotificationChanged -= OnSoundNotificationChanged;
+ // Tizen.System.SystemSettings.SystemSettings.SoundNotification = s_soundNotificationValue;
+ // await Task.Delay(5000);
+ // Assert.IsFalse(s_soundNotificationCallbackCalled);
+ //}
+ //private static void OnSoundNotificationChanged(object sender, Tizen.System.SystemSettings.SoundNotificationChangedEventArgs e)
+ //{
+ // s_soundNotificationCallbackCalled = true;
+ // Assert.IsInstanceOf<string>(e.Value);
+ // Assert.IsTrue(s_soundNotificationValue.CompareTo(e.Value) == 0, "OnSoundNotificationChanged: The callback should receive the latest value for the property.");
+ //}
// SoundNotificationRepetitionPeriod
[Test]
await Task.Delay(5000);
Assert.IsTrue(s_soundNotificationRepetitionPeriodCallbackCalled);
s_soundNotificationRepetitionPeriodCallbackCalled = false;
+
+ Tizen.System.SystemSettings.SystemSettings.SoundNotificationRepetitionPeriodChanged -= OnSoundNotificationRepetitionPeriodChanged;
+ Tizen.System.SystemSettings.SystemSettings.SoundNotificationRepetitionPeriod = s_soundNotificationRepetitionPeriodValue;
+ await Task.Delay(5000);
+ Assert.IsFalse(s_soundNotificationRepetitionPeriodCallbackCalled);
}
private static void OnSoundNotificationRepetitionPeriodChanged(object sender, Tizen.System.SystemSettings.SoundNotificationRepetitionPeriodChangedEventArgs e)
{