Skip global user check 99/322299/1
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 7 Apr 2025 10:22:12 +0000 (19:22 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 7 Apr 2025 10:22:12 +0000 (19:22 +0900)
Even if the app information is not "global", it should be able to
disable/enable. This patch is to fix miswritten code implementations
in the existing refactoring process.

Change-Id: I8b2f2ac734b554c3441f332ad904bff7338eee00
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/lib/app_info/app_info_manager.cc

index e573546913e965b5c6a3d6d56c75eff0e1a314b9..2bbd58d7f6ce0c16ab8faaf63d77c3fe75a13d4b 100644 (file)
@@ -667,6 +667,8 @@ void AppInfoManager::OnPkgmgrEvent(std::shared_ptr<PkgmgrEventArgs> args) {
 
 void AppInfoManager::DisableAppInfo(uid_t target_uid,
     const std::string& appid, const std::string& global) {
+  _D("taget_uid(%u), appid(%s), global(%s)", target_uid, appid.c_str(),
+     global.c_str());
   if (target_uid < REGULAR_UID_MIN) {
     for (auto const& iter : app_info_chunk_) {
       uid_t uid = iter.first;
@@ -684,9 +686,6 @@ void AppInfoManager::DisableAppInfo(uid_t target_uid,
   if (info == nullptr)
     return;
 
-  if (info->GetGlobal() != global)
-    return;
-
   info->SetEnablement("0");
   _E("[PKGMGR] Terminate app(%s). uid(%u)", appid.c_str(), target_uid);
   AppStatusManager::GetInst().TerminateApps(appid, target_uid);
@@ -695,6 +694,8 @@ void AppInfoManager::DisableAppInfo(uid_t target_uid,
 
 void AppInfoManager::EnableAppInfo(uid_t target_uid,
     const std::string& appid, const std::string& global) {
+  _D("taget_uid(%u), appid(%s), global(%s)", target_uid, appid.c_str(),
+     global.c_str());
   if (target_uid < REGULAR_UID_MIN) {
     for (auto const& iter : app_info_chunk_) {
       uid_t uid = iter.first;
@@ -727,15 +728,14 @@ void AppInfoManager::EnableAppInfo(uid_t target_uid,
     return;
   }
 
-  if (info->GetGlobal() != global)
-    return;
-
   info->SetEnablement("1");
   helper::NotiSend(AMD_NOTI_MSG_APPINFO_APP_ENABLED_END, target_uid, appid);
 }
 
 void AppInfoManager::DisableAppInfoSplashScreenDisplay(uid_t target_uid,
     const std::string& appid, const std::string& global) {
+  _D("taget_uid(%u), appid(%s), global(%s)", target_uid, appid.c_str(),
+     global.c_str());
   if (target_uid < REGULAR_UID_MIN) {
     for (auto const& iter : app_info_chunk_) {
       uid_t uid = iter.first;
@@ -753,14 +753,13 @@ void AppInfoManager::DisableAppInfoSplashScreenDisplay(uid_t target_uid,
   if (info == nullptr)
     return;
 
-  if (info->GetGlobal() != global)
-    return;
-
   info->SetSplashScreenDisplay("0");
 }
 
 void AppInfoManager::EnableAppInfoSplashScreenDisplay(uid_t target_uid,
     const std::string& appid, const std::string& global) {
+  _D("taget_uid(%u), appid(%s), global(%s)", target_uid, appid.c_str(),
+     global.c_str());
   if (target_uid < REGULAR_UID_MIN) {
     for (auto const& iter : app_info_chunk_) {
       uid_t uid = iter.first;
@@ -778,9 +777,6 @@ void AppInfoManager::EnableAppInfoSplashScreenDisplay(uid_t target_uid,
   if (info == nullptr)
     return;
 
-  if (info->GetGlobal() != global)
-    return;
-
   info->SetSplashScreenDisplay("1");
 }