[SystemInfo][Bluetooth][Push] Add misssing deprecation warnings since Tizen 3.0 86/186286/3
authorPawel Kaczmarczyk <p.kaczmarczy@samsung.com>
Wed, 8 Aug 2018 12:32:16 +0000 (14:32 +0200)
committerPawel Kaczmarczyk <p.kaczmarczy@samsung.com>
Thu, 9 Aug 2018 07:57:12 +0000 (09:57 +0200)
[Verification]
  Code compiles
  tct-systeminfo-tizen-tests passrate 100%

Change-Id: I41db5325ac94ca042069551a41161e5b968e51d3
Signed-off-by: Pawel Kaczmarczyk <p.kaczmarczy@samsung.com>
src/bluetooth/bluetooth_adapter.cc
src/bluetooth/bluetooth_api.js
src/push/push_instance.cc
src/systeminfo/systeminfo_api.js

index 9fbf87e..0da34d5 100644 (file)
@@ -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);
index 09979b3..9fb4266 100755 (executable)
@@ -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',
index f7b277d..f05e04b 100644 (file)
@@ -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<double>());
@@ -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);
 
index 63b3e5e..a14be23 100644 (file)
@@ -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() {}
         }
     });
 }