fixed a defect that could not add preload applications installation information to... 69/78369/1 accepted/tizen/common/20160705.170628 accepted/tizen/mobile/20160705.101319 submit/tizen/20160705.082957
authorKyoungyong Lee <bluevox@naver.com>
Tue, 5 Jul 2016 08:24:15 +0000 (17:24 +0900)
committerKyoungyong Lee <bluevox@naver.com>
Tue, 5 Jul 2016 08:24:23 +0000 (17:24 +0900)
Change-Id: Ia787afef0c85b3ad87ce8fd019a1869e54e01648

client/src/PrivacyGuardClient.cpp

index af8837d..b6f3f38 100755 (executable)
@@ -191,25 +191,23 @@ PrivacyGuardClient::PgAddMonitorPolicy(const int userId, const std::string pkgId
        res = m_pSocketClient->connect();
        if(res != PRIV_GUARD_ERROR_SUCCESS) {
                isServerOperation = false;
+               PG_LOGE("connect : %d", res);
                PG_LOGD("Failed to connect. So change to the offline mode");
-       }
-       else {
+       } else {
                isServerOperation = true;
        }
-       TryReturn(res == PRIV_GUARD_ERROR_SUCCESS, res, , "connect : %d", res);
 
        if (isServerOperation == true) {
-       int result = PRIV_GUARD_ERROR_SUCCESS;
+               int result = PRIV_GUARD_ERROR_SUCCESS;
 
-       res = m_pSocketClient->call("PgAddMonitorPolicy", userId, pkgId, privacyList, monitorPolicy, &result);
-       TryReturn(res == PRIV_GUARD_ERROR_SUCCESS, res, m_pSocketClient->disconnect(), "call : %d", res);
+               res = m_pSocketClient->call("PgAddMonitorPolicy", userId, pkgId, privacyList, monitorPolicy, &result);
+               TryReturn(res == PRIV_GUARD_ERROR_SUCCESS, res, m_pSocketClient->disconnect(), "call : %d", res);
 
-       res = m_pSocketClient->disconnect();
-       TryReturn(res == PRIV_GUARD_ERROR_SUCCESS, res, , "disconnect : %d", res);
+               res = m_pSocketClient->disconnect();
+               TryReturn(res == PRIV_GUARD_ERROR_SUCCESS, res, , "disconnect : %d", res);
 
-       return result;
-}
-       else    {
+               return result;
+       } else  {
                return PgAddMonitorPolicyOffline(userId, pkgId, privacyList, monitorPolicy);
        }
 }