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;