Fixed a problem that NFC will not be turned on again if HAL test is 14/187314/2 accepted/tizen/unified/20180822.093911 accepted/tizen/unified/20180822.093926 submit/tizen/20180822.024801 submit/tizen/20180822.024818
authorsaerome.kim <saerome.kim@samsung.com>
Wed, 22 Aug 2018 02:36:36 +0000 (11:36 +0900)
committersaerome.kim <saerome.kim@samsung.com>
Wed, 22 Aug 2018 02:43:59 +0000 (11:43 +0900)
executed.

If we call set_active very quickly, there is a phenomenon that the deinit
 thread in the NFC pluin is stopped  at pthread_join().
To overcome this, we added sleep(1) before calling set_active(false);

Change-Id: Iafbcbdf6742f8dbfbfef1d4be31cd40a67462e7f
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
haltests/manager.cpp
haltests/nfcmgr.cpp

index e47806ad6b1ea6bcd94033a632524e97ee6eea5d..3c3be60012b308d4b6e9b70799d9d0cb558888f6 100644 (file)
@@ -38,7 +38,7 @@ error_e Manager::SetActivation(bool is_active)
        error_e error = ERROR_NONE;
        int result = 0;
 
-       message = InvokeMethod(NFC_MGR_SERVICE".Manager",
+       message = InvokeMethod(NFC_MGR_SERVICE,
                NFC_MGR_PATH,
                NFC_MANAGER_INTERFACE,
                NFC_MANAGER_SET_ACTIVE,
index f02b4733697d829f3bfbc8cc57094efce03c341f..fb24b8f65337b315ccb91ac428615dc6f43e92ad 100644 (file)
@@ -85,6 +85,7 @@ TEST(Hal_nfc, Set_Activation_false_p)
        Manager mgr;
 
        if (ERROR_NONE == CheckFeature()) {
+               sleep(1);
                ret = mgr.SetActivation(false);
        }
        EXPECT_EQ(ERROR_NONE, ret);