[POC] Always set one of US flags to false, on accessibility settings closure. 82/166982/1
authorPawel Kurowski <p.kurowski2@samsung.com>
Sun, 14 Jan 2018 13:36:28 +0000 (14:36 +0100)
committerPawel Kurowski <p.kurowski2@samsung.com>
Sun, 14 Jan 2018 13:36:28 +0000 (14:36 +0100)
Requires:
https://review.tizen.org/gerrit/#/c/166981/

Change-Id: I51f601e9c67b82dd457e174d8b4739082eb6f794

setting-accessibility/src/setting-accessibility-universal-switch.c

index efd7806b060a2888de7481077a9324fc615b1bfb..02aa8c44f0095f44fc37b68948dde1857bcb2512 100644 (file)
@@ -106,23 +106,15 @@ static void __start_universal_switch(SettingAccessibility *ad)
 
 static void __stop_universal_switch(SettingAccessibility *ad)
 {
-       int state;
-
        setting_accessibility_universal_switch_dbus_config_shutdown(&ad->config);
 
        SETTING_TRACE_DEBUG("Stopping universal-switch");
-       if (vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_STATE, &state) != VCONF_OK) {
-               LOGE("Failed to set vconf key %s", VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_STATE);
-               return;
+       if (vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH, FALSE) != VCONF_OK) {
+               LOGE("Failed to set vconf key %s", VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH);
+       } else {
+               SETTING_TRACE_DEBUG("universal-switch stopped");
        }
 
-       if (!state) {
-               if (vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH, FALSE) != VCONF_OK) {
-                       LOGE("Failed to set vconf key %s", VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH);
-               } else {
-                       SETTING_TRACE_DEBUG("universal-switch stopped");
-               }
-       }
 }
 
 static Eina_Bool __naviframe_pop_cb(void *data, Elm_Object_Item *it)