clean up and allign the mode file name
authorYoungjae Shin <yj99.shin@samsung.com>
Mon, 4 Nov 2019 00:05:10 +0000 (09:05 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Thu, 19 Mar 2020 04:30:37 +0000 (13:30 +0900)
app/AppActionLaunch.cpp
unittests/mdsp_test_app.cpp
unittests/mdsp_test_integration.cpp
unittests/mode/tizen_Power-Save_mode.xml [new file with mode: 0644]
unittests/mode/tizen_Quick-Panel_mode.xml [new file with mode: 0644]
unittests/mode/tizen_Water-Lock_mode.xml [new file with mode: 0644]
unittests/mode/tizen_powerSave_mode.xml [deleted file]
unittests/mode/tizen_quickpanel_mode.xml [deleted file]
unittests/mode/tizen_waterlock_mode.xml [deleted file]
unittests/mode/tizen_wifi-on_mode.xml [new file with mode: 0644]
unittests/mode/tizen_wifiOn_mode.xml [deleted file]

index 0993e1a711d6c2b7b3f37847db9fe3575a1d9155..a6ff7c23340f0c260fa7d9c10f2d2d8857b1540e 100644 (file)
@@ -114,7 +114,7 @@ int AppActionLaunch::undo()
                return MODES_ERROR_NONE;
        }
 
-       int ret = app_manager_unset_app_context_status_cb(AppActionLaunch::appContextStatusCallback, appID.c_str());
+       int ret = app_manager_unset_app_context_status_cb(appContextStatusCallback, appID.c_str());
        if (APP_MANAGER_ERROR_NONE != ret)
                ERR("app_manager_unset_app_context_status_cb() Fail(%s)", get_error_message(ret));
 
index 1c594022febc2b904f617c95d08858eff6caae2a..0afdd3733b0cdfbd671234bf39e3110b05707f49 100644 (file)
@@ -49,7 +49,7 @@ protected:
                result = plugin->set("launch", std::string("org.tizen.net-popup"), &action);
                EXPECT_EQ(MODES_ERROR_NONE, result);
 
-               app_context_h runAppContext;
+               app_context_h runAppContext = NULL;
                app_manager_get_app_context("org.tizen.net-popup", &runAppContext);
                app_manager_terminate_app(runAppContext);
                result = plugin->undo(action);
index f8a57cd3ca023424dd508484ccdd0f62ff7c9e9e..254ab58424a063fff82cb8c318e83330454b3c7d 100644 (file)
@@ -72,7 +72,7 @@ TEST_F(IntegrationTest, runMode_btOn)
 
 TEST_F(IntegrationTest, runMode_powerSave)
 {
-       g_idle_add(check_mode_idler, (gpointer)"powerSave");
+       g_idle_add(check_mode_idler, (gpointer)"Power-Save");
        g_main_loop_run(loop);
        EXPECT_EQ(MODES_ERROR_NONE, result);
 }
@@ -86,14 +86,14 @@ TEST_F(IntegrationTest, runMode_displayBlock)
 
 TEST_F(IntegrationTest, runMode_wifiOn)
 {
-       g_idle_add(check_mode_idler, (gpointer)"wifiOn");
+       g_idle_add(check_mode_idler, (gpointer)"wifi-on");
        g_main_loop_run(loop);
        EXPECT_EQ(MODES_ERROR_NONE, result);
 }
 
 TEST_F(IntegrationTest, runMode_waterlock)
 {
-       g_idle_add(check_mode_idler, (gpointer)"waterlock");
+       g_idle_add(check_mode_idler, (gpointer)"Water-Lock");
        g_main_loop_run(loop);
        EXPECT_EQ(MODES_ERROR_NONE, result);
 }
diff --git a/unittests/mode/tizen_Power-Save_mode.xml b/unittests/mode/tizen_Power-Save_mode.xml
new file mode 100644 (file)
index 0000000..5294c37
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<tizenModes xmlns="http://www.tizen.org" version="6.0">
+  <mode name="Power-Save" type="exclusive">
+    <action rule="wifi.power">off</action>
+    <action rule="bluetooth.power">off</action>
+    <action rule="pkg.startSupportMode">ULTRA_POWER_SAVING</action>
+    <action rule="display.brightness">30</action>
+    <action rule="vconf.db.setting.sound.sound_on">0</action>
+    <action rule="vconf.db.setting.sound.vibration_on">0</action>
+    <action rule="vconf.db.location.setting.Usemylocation">0</action>
+  </mode>
+</tizenModes>
diff --git a/unittests/mode/tizen_Quick-Panel_mode.xml b/unittests/mode/tizen_Quick-Panel_mode.xml
new file mode 100644 (file)
index 0000000..836d74e
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<tizenModes xmlns="http://www.tizen.org" version="6.0">
+  <mode name="Quick-Panel" type="normal">
+    <action rule="vconf.db.setting.sound.sound_on">1</action>
+    <action rule="vconf.db.setting.sound.vibration_on">1</action>
+    <action rule="vconf.db.location.setting.Usemylocation">1</action>
+    <action rule="vconf.db.setting.auto_rotate_screen">1</action>
+  </mode>
+</tizenModes>
diff --git a/unittests/mode/tizen_Water-Lock_mode.xml b/unittests/mode/tizen_Water-Lock_mode.xml
new file mode 100644 (file)
index 0000000..b2da07c
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<tizenModes xmlns="http://www.tizen.org" version="6.0">
+  <mode name="Water-Lock" type="exclusive">
+    <action rule="vconf.db.setting.sound.sound_on">false</action>
+    <action rule="vconf.db.setting.sound.vibration_on">true</action>
+    <undo rule="media.player">/opt/usr/data/settings/Alarms/Alarms_on_call.ogg</undo>
+  </mode>
+</tizenModes>
+
+
diff --git a/unittests/mode/tizen_powerSave_mode.xml b/unittests/mode/tizen_powerSave_mode.xml
deleted file mode 100644 (file)
index 5294c37..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<tizenModes xmlns="http://www.tizen.org" version="6.0">
-  <mode name="Power-Save" type="exclusive">
-    <action rule="wifi.power">off</action>
-    <action rule="bluetooth.power">off</action>
-    <action rule="pkg.startSupportMode">ULTRA_POWER_SAVING</action>
-    <action rule="display.brightness">30</action>
-    <action rule="vconf.db.setting.sound.sound_on">0</action>
-    <action rule="vconf.db.setting.sound.vibration_on">0</action>
-    <action rule="vconf.db.location.setting.Usemylocation">0</action>
-  </mode>
-</tizenModes>
diff --git a/unittests/mode/tizen_quickpanel_mode.xml b/unittests/mode/tizen_quickpanel_mode.xml
deleted file mode 100644 (file)
index 836d74e..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<tizenModes xmlns="http://www.tizen.org" version="6.0">
-  <mode name="Quick-Panel" type="normal">
-    <action rule="vconf.db.setting.sound.sound_on">1</action>
-    <action rule="vconf.db.setting.sound.vibration_on">1</action>
-    <action rule="vconf.db.location.setting.Usemylocation">1</action>
-    <action rule="vconf.db.setting.auto_rotate_screen">1</action>
-  </mode>
-</tizenModes>
diff --git a/unittests/mode/tizen_waterlock_mode.xml b/unittests/mode/tizen_waterlock_mode.xml
deleted file mode 100644 (file)
index b2da07c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<tizenModes xmlns="http://www.tizen.org" version="6.0">
-  <mode name="Water-Lock" type="exclusive">
-    <action rule="vconf.db.setting.sound.sound_on">false</action>
-    <action rule="vconf.db.setting.sound.vibration_on">true</action>
-    <undo rule="media.player">/opt/usr/data/settings/Alarms/Alarms_on_call.ogg</undo>
-  </mode>
-</tizenModes>
-
-
diff --git a/unittests/mode/tizen_wifi-on_mode.xml b/unittests/mode/tizen_wifi-on_mode.xml
new file mode 100644 (file)
index 0000000..d2aad8d
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<tizenModes xmlns="http://www.tizen.org" version="6.0">
+  <mode name="wifi-on" type="normal">
+    <action rule="wifi.power">on</action>
+  </mode>
+</tizenModes>
diff --git a/unittests/mode/tizen_wifiOn_mode.xml b/unittests/mode/tizen_wifiOn_mode.xml
deleted file mode 100644 (file)
index d2aad8d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<tizenModes xmlns="http://www.tizen.org" version="6.0">
-  <mode name="wifi-on" type="normal">
-    <action rule="wifi.power">on</action>
-  </mode>
-</tizenModes>