From: Pawel Kaczmarczyk
Date: Wed, 8 Aug 2018 12:32:16 +0000 (+0200)
Subject: [SystemInfo][Bluetooth][Push] Add misssing deprecation warnings since Tizen 3.0
X-Git-Tag: submit/tizen/20180816.094841^2^2~1
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d7bc239b135e68a98e9c960f09d020962e64bfb8;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git
[SystemInfo][Bluetooth][Push] Add misssing deprecation warnings since Tizen 3.0
[Verification]
Code compiles
tct-systeminfo-tizen-tests passrate 100%
Change-Id: I41db5325ac94ca042069551a41161e5b968e51d3
Signed-off-by: Pawel Kaczmarczyk
---
diff --git a/src/bluetooth/bluetooth_adapter.cc b/src/bluetooth/bluetooth_adapter.cc
index 9fbf87ed..0da34d52 100644
--- a/src/bluetooth/bluetooth_adapter.cc
+++ b/src/bluetooth/bluetooth_adapter.cc
@@ -641,6 +641,9 @@ void BluetoothAdapter::SetPowered(const picojson::value& data, picojson::object&
void BluetoothAdapter::SetVisible(const picojson::value& data, picojson::object& out) {
ScopeLogger();
+ LoggerW(
+ "DEPRECATION WARNING: setVisible() is deprecated and will be removed from next release. "
+ "Let the user change the Bluetooth visibility through the Settings application instead.");
CHECK_BACKWARD_COMPABILITY_PRIVILEGE_ACCESS(Privilege::kBluetooth, Privilege::kBluetoothManager,
&out);
diff --git a/src/bluetooth/bluetooth_api.js b/src/bluetooth/bluetooth_api.js
index 09979b31..9fb4266e 100755
--- a/src/bluetooth/bluetooth_api.js
+++ b/src/bluetooth/bluetooth_api.js
@@ -2078,6 +2078,9 @@ BluetoothAdapter.prototype.setPowered = function() {
// This method is deprecated since Tizen 2.3 and will be removed in Tizen 3.0.
BluetoothAdapter.prototype.setVisible = function() {
privUtils_.log('Entered BluetoothAdapter.setVisible()');
+ privUtils_.warn('DEPRECATION WARNING: setVisible() is deprecated and will be removed from next release. '
+ + 'Let the user change the Bluetooth visibility through the Settings application instead.');
+
var args = AV.validateMethod(arguments, [
{
name : 'visible',
diff --git a/src/push/push_instance.cc b/src/push/push_instance.cc
index f7b277d3..f05e04ba 100644
--- a/src/push/push_instance.cc
+++ b/src/push/push_instance.cc
@@ -64,6 +64,9 @@ PushInstance::PushInstance() {
void PushInstance::registerService(const picojson::value& args, picojson::object& out) {
ScopeLogger();
+ LoggerW(
+ "DEPRECATION WARNING: registerService() is deprecated and will be removed from next release. "
+ "Use register() instead.");
CHECK_PRIVILEGE_ACCESS(kPrivilegePush, &out);
common::PlatformResult result = impl->registerService(args.get("callbackId").get());
@@ -88,6 +91,9 @@ void PushInstance::registerApplication(const picojson::value& args, picojson::ob
void PushInstance::unregisterService(const picojson::value& args, picojson::object& out) {
ScopeLogger();
+ LoggerW(
+ "DEPRECATION WARNING: unregisterService() is deprecated and will be removed from next "
+ "release. Use unregister() instead.");
CHECK_PRIVILEGE_ACCESS(kPrivilegePush, &out);
@@ -114,6 +120,9 @@ void PushInstance::unregisterApplication(const picojson::value& args, picojson::
void PushInstance::connectService(const picojson::value& args, picojson::object& out) {
ScopeLogger();
+ LoggerW(
+ "DEPRECATION WARNING: connectService() is deprecated and will be removed from next release. "
+ "Use connect() instead.");
CHECK_PRIVILEGE_ACCESS(kPrivilegePush, &out);
@@ -140,6 +149,9 @@ void PushInstance::connect(const picojson::value& args, picojson::object& out) {
void PushInstance::disconnectService(const picojson::value& args, picojson::object& out) {
ScopeLogger();
+ LoggerW(
+ "DEPRECATION WARNING: disconnectService() is deprecated and will be removed from next "
+ "release. Use disconnect() instead.");
CHECK_PRIVILEGE_ACCESS(kPrivilegePush, &out);
diff --git a/src/systeminfo/systeminfo_api.js b/src/systeminfo/systeminfo_api.js
index 63b3e5ea..a14be236 100644
--- a/src/systeminfo/systeminfo_api.js
+++ b/src/systeminfo/systeminfo_api.js
@@ -441,6 +441,8 @@ function SystemInfoCpu(data) {
//class SystemInfoStorageUnit ////////////////////////////////////////////////////
function SystemInfoStorageUnit(data) {
+ var _isRemovable = data.isRemovable;
+
Object.defineProperties(this, {
type : {
value: data.type,
@@ -463,9 +465,13 @@ function SystemInfoStorageUnit(data) {
enumerable : true
},
isRemoveable : {
- value : data.isRemovable,
- writable : false,
- enumerable : true
+ enumerable : true,
+ get: function() {
+ privUtils_.warn('DEPRECATION WARNING: SystemInfoStorageUnit.isRemoveable is is deprecated and will be '
+ + 'removed from next release. Use SystemInfoStorageUnit.isRemovable instead.');
+ return _isRemovable;
+ },
+ set: function() {}
}
});
}