Restore WiFi state module to modprobe method
authorAndrey Zabolotnyi <a.zabolotnyi@samsung.com>
Wed, 23 Aug 2017 11:58:10 +0000 (14:58 +0300)
committerAndrey Zabolotnyi <a.zabolotnyi@samsung.com>
Wed, 23 Aug 2017 11:58:10 +0000 (14:58 +0300)
device-policy-manager/server/wifi.cpp

index e85bbb4..9d3716e 100755 (executable)
@@ -91,20 +91,20 @@ public:
        bool operator()(bool enable)
        {
                dpmlog("WifiStateEnforceModel(%i)\n", (int)enable);
-        try {
-            dbus::Connection &systemDBus = dbus::Connection::getSystem();
-            systemDBus.methodcall(NETCONFIG_INTERFACE,
-                                  "DevicePolicySetWifi",
-                                  -1,
-                                  "",
-                                  "(i)",
-                                  enable);
-        } catch (runtime::Exception& e) {
-            ERROR("Failed to chaneg Wi-Fi state");
-            return false;
-        }
-
-//             if (fake_set_wifi_state((int)enable)) return false;
+//        try {
+//            dbus::Connection &systemDBus = dbus::Connection::getSystem();
+//            systemDBus.methodcall(NETCONFIG_INTERFACE,
+//                                  "DevicePolicySetWifi",
+//                                  -1,
+//                                  "",
+//                                  "(i)",
+//                                  enable);
+//        } catch (runtime::Exception& e) {
+//            ERROR("Failed to chaneg Wi-Fi state");
+//            return false;
+//        }
+
+        if (fake_set_wifi_state((int)enable)) return false;
 
                notify(enable == 0 ? "disallowed" : "allowed");
                return true;