From 8c5fc142009b06eb5c8b0a1455f0a1471339f5c7 Mon Sep 17 00:00:00 2001 From: Hyunwoo Kim Date: Mon, 6 May 2013 20:16:57 +0900 Subject: [PATCH] Filtering for preloaded app Change-Id: If7252c63520f731ce5ac08a6b408cdf51e352730 Signed-off-by: Hyunwoo Kim --- common/src/PrivacyDb.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/common/src/PrivacyDb.cpp b/common/src/PrivacyDb.cpp index 0d81d4c..8709203 100644 --- a/common/src/PrivacyDb.cpp +++ b/common/src/PrivacyDb.cpp @@ -288,8 +288,14 @@ PrivacyDb::getAppPackagesbyPrivacyId(std::string privacyId, std::list < std::pai const char* pPkgId = reinterpret_cast < const char* > (sqlite3_column_text(pStmt.get(), 0)); bool isEnabled = sqlite3_column_int(pStmt.get(), 1) > 0 ? true : false; - LOGD("result : %s - %d", pPkgId, isEnabled); - list.push_back( std::pair (std::string(pPkgId), isEnabled) ); + std::string pkgId = std::string(pPkgId); + if (isFilteredPackage(pkgId)) + { + LOGD("%s is Filtered", pPkgId); + continue; + } + + list.push_back( std::pair (pkgId, isEnabled) ); } LOGI("leave"); @@ -321,4 +327,4 @@ PrivacyDb::getInstance(void) LOGI("leave"); return m_pInstance; -} \ No newline at end of file +} -- 2.7.4