var applicationEventListener = new ListenerManager(native, APPLICATION_EVENT_LISTENER);
ApplicationManager.prototype.addAppInfoEventListener = function() {
+ console.warn('DEPRECATION WARNING: addAppInfoEventListener() is deprecated and will be removed from next release. '
+ + 'Use tizen.package.setPackageInfoEventListener() instead.');
+
var args = AV.validateMethod(arguments, [
{
name : 'eventCallback',
};
ApplicationManager.prototype.removeAppInfoEventListener = function() {
+ console.warn('DEPRECATION WARNING: removeAppInfoEventListener() is deprecated and will be removed from next release. '
+ + 'Use tizen.package.unsetPackageInfoEventListener() instead.');
+
var args = AV.validateMethod(arguments, [
{
name : 'watchId',
void ApplicationInstance::AddAppInfoEventListener(const picojson::value& args, picojson::object& out) {
LoggerD("Entered");
+ LoggerW("DEPRECATION WARNING: addAppInfoEventListener() is deprecated and will be removed from next release. "
+ "Use tizen.package.setPackageInfoEventListener() instead.");
manager_.StartAppInfoEventListener(&out);
}
void ApplicationInstance::RemoveAppInfoEventListener(const picojson::value& args, picojson::object& out) {
LoggerD("Entered");
+ LoggerW("DEPRECATION WARNING: removeAppInfoEventListener() is deprecated and will be removed from next release. "
+ "Use tizen.package.unsetPackageInfoEventListener() instead.");
manager_.StopAppInfoEventListener();
ReportSuccess(out);
void BluetoothAdapter::SetPowered(const picojson::value& data, picojson::object& out) {
LoggerD("Entered");
+ LoggerW("DEPRECATION WARNING: setPowered() is deprecated and will be removed from next release. "
+ "Let the user turn on/off Bluetooth through the Settings application instead.");
CHECK_BACKWARD_COMPABILITY_PRIVILEGE_ACCESS(Privilege::kBluetooth,
Privilege::kBluetoothAdmin, &out);
BluetoothAdapter.prototype.setPowered = function() {
console.log('Entered BluetoothAdapter.setPowered()');
+ console.warn('DEPRECATION WARNING: setPowered() is deprecated and will be removed from next release. '
+ + 'Let the user turn on/off Bluetooth through the Settings application instead.');
+
var args = AV.validateMethod(arguments, [
{
name : 'powered',
}
NFCAdapter.prototype.setPowered = function() {
+ console.warn('DEPRECATION WARNING: setPowered() is deprecated and will be removed from next release. Let the user turn NFC on/off '
+ + 'through the Settings application instead.');
+
var args = validator_.validateArgs(arguments, [
{
name: 'powered',
void NFCInstance::SetPowered(
const picojson::value& args, picojson::object& out) {
LoggerD("Entered");
+ LoggerW("DEPRECATION WARNING: setPowered() is deprecated and will be removed from next release. Let the user turn NFC on/off "
+ "through the Settings application instead.");
+
CHECK_PRIVILEGE_ACCESS(kPrivilegeNfcAdmin, &out);
PlatformResult result = NFCAdapter::GetInstance()->SetPowered(args);
* is desired to be.
*/
PowerManager.prototype.request = function(resource, state) {
- var args = validator_.validateArgs(arguments, [
+ var args = validator_.validateArgs(arguments, [
{'name' : 'resource', 'type': types_.ENUM, 'values' : ['SCREEN', 'CPU']},
{'name' : 'state', 'type': types_.ENUM, 'values' : ['SCREEN_OFF', 'SCREEN_DIM', 'SCREEN_NORMAL', 'SCREEN_BRIGHT', 'CPU_AWAKE']}
]);
+ if (args['state'] && args.state === PowerScreenState['SCREEN_BRIGHT']) {
+ console.warn('DEPRECATION WARNING: SCREEN_BRIGHT is deprecated and will be removed from next release.');
+ }
+
var nativeParam = {
};
* Turns on the screen.
*/
PowerManager.prototype.turnScreenOn = function() {
+ console.warn('DEPRECATION WARNING: turnScreenOn() is deprecated and will be removed from next release. Use request() instead.');
+
var nativeParam = {
};
* Turns off the screen.
*/
PowerManager.prototype.turnScreenOff = function() {
+ console.warn('DEPRECATION WARNING: turnScreenOff() is deprecated and will be removed from next release. Use release() instead.');
+
var nativeParam = {
};
void PowerInstance::PowerManagerTurnscreenon(const picojson::value& args, picojson::object& out) {
LoggerD("Enter");
+ LoggerW("DEPRECATION WARNING: turnScreenOn() is deprecated and will be removed from next release. Use request() instead.");
+
CHECK_PRIVILEGE_ACCESS(kPrivilegePower, &out);
PlatformResult result = PowerManager::GetInstance()->SetScreenState(true);
void PowerInstance::PowerManagerTurnscreenoff(const picojson::value& args, picojson::object& out) {
LoggerD("Enter");
+ LoggerW("DEPRECATION WARNING: turnScreenOff() is deprecated and will be removed from next release. Use release() instead.");
+
CHECK_PRIVILEGE_ACCESS(kPrivilegePower, &out);
PlatformResult result = PowerManager::GetInstance()->SetScreenState(false);
switch (state) {
case DISPLAY_STATE_NORMAL :
current = object->bright_state_enabled_ ? POWER_STATE_SCREEN_BRIGHT : POWER_STATE_SCREEN_NORMAL;
+
+ // TODO: Remove log along with removal of deprecation power state
+ if (POWER_STATE_SCREEN_BRIGHT == current) {
+ LoggerW("DEPRECATION WARNING: SCREEN_BRIGHT is deprecated and will be removed from next release.");
+ }
+
break;
case DISPLAY_STATE_SCREEN_DIM :
current = POWER_STATE_SCREEN_DIM;
}
case POWER_STATE_SCREEN_BRIGHT:
{
+ LoggerW("DEPRECATION WARNING: SCREEN_BRIGHT is deprecated and will be removed from next release.");
+
int max_brightness;
ret = device_display_get_max_brightness(0, &max_brightness);
if (DEVICE_ERROR_NONE != ret) {
ret = device_display_get_state(&platform_state);
if (DEVICE_ERROR_NONE != ret)
LoggerE("device_display_get_state failed (%d)", ret);
- if (platform_state == DISPLAY_STATE_NORMAL)
+ if (DISPLAY_STATE_NORMAL == platform_state) {
+ // TODO: Remove log along with removal of deprecation power state
+ LoggerW("DEPRECATION WARNING: SCREEN_BRIGHT is deprecated and will be removed from next release.");
BroadcastScreenState(POWER_STATE_SCREEN_BRIGHT);
+ }
break;
}
case POWER_STATE_SCREEN_OFF:
should_be_read_from_cache_ = true;
return PlatformResult(ErrorCode::NO_ERROR);
} else if (current_state_ == POWER_STATE_SCREEN_BRIGHT) {
+ LoggerW("DEPRECATION WARNING: SCREEN_BRIGHT is deprecated and will be removed from next release.");
+
current_brightness_ = brightness;
LoggerD("Current state is not normal state the value is saved in cache: %d", brightness);
should_be_read_from_cache_ = true;
values: tizen.ApplicationControl
}
]);
- console.warn('Method registerService() is deprecated, use register() instead.');
+ console.warn('DEPRECATION WARNING: registerService() is deprecated and will be removed from next release. Use register() instead.');
this.register.apply(this, Array.prototype.slice.call(arguments, 1));
};
};
PushManager.prototype.unregisterService = function() {
- console.warn('Method unregisterService() is deprecated, use unregister() instead.');
+ console.warn('DEPRECATION WARNING: unregisterService() is deprecated and will be removed from next release. Use unregister() instead.');
this.unregister.apply(this, arguments);
};
};
SystemInfo.prototype.getCapabilities = function() {
+ console.warn('DEPRECATION WARNING: getCapabilities() is deprecated and will be removed from next release. Use getCapability() instead.');
+
var result = native_.callSync('SystemInfo_getCapabilities', {});
if (native_.isFailure(result)) {
throw native_.getErrorObject(result);
void SysteminfoInstance::GetCapabilities(const picojson::value& args, picojson::object& out) {
LoggerD("Enter");
+ LoggerW("DEPRECATION WARNING: getCapabilities() is deprecated and will be removed from next release. Use getCapability() instead.");
+
manager_.GetCapabilities(args, &out);
}
tizen.TZDate.prototype.getTimezoneAbbreviation = function() {
console.log('Entered TZDate.getTimezoneAbbreviation');
+ console.warn('DEPRECATION WARNING: getTimezoneAbbreviation() is deprecated and will be removed from next release.');
+
var result = native_.callSync('TZDate_getTimezoneAbbreviation',
{timezone: String(this._timezoneName),
timestamp: String(this._utcTimestamp)});
void TimeInstance::TZDate_getTimezoneAbbreviation(const picojson::value& args,
picojson::object& out) {
LoggerD("Entered");
+ LoggerW("DEPRECATION WARNING: getTimezoneAbbreviation() is deprecated and will be removed from next release.");
+
if (!args.contains("timezone") || !args.contains("timestamp")) {
LogAndReportError(PlatformResult(ErrorCode::INVALID_VALUES_ERR, "Invalid parameter passed."), &out,
("Required parameters are missing: \"timezone\", \"timestamp\""));