Change logic of security_manager_app_update() 61/283061/2
authorTomasz Swierczek <t.swierczek@samsung.com>
Mon, 17 Oct 2022 08:31:09 +0000 (10:31 +0200)
committerTomasz Swierczek <t.swierczek@samsung.com>
Tue, 18 Oct 2022 09:08:06 +0000 (11:08 +0200)
Now the function allows to update package & remove not-requested
appIds present before even if no hybrid status change has been done.

Change-Id: I3f13dddd726c57e6a1572ce3a608eaf16768ad55

src/common/service_impl.cpp

index 5a1da89..b39ab6a 100644 (file)
@@ -665,7 +665,7 @@ int ServiceImpl::appUpdate(const Credentials &creds, app_inst_req &req)
         ih.isUserPkgInstalled = m_privilegeDb.IsUserPkgInstalled(req.pkgName, req.uid);
         ih.isOldPkgHybrid = ih.isUserPkgInstalled ? m_privilegeDb.IsPackageHybrid(req.pkgName) : req.isHybrid;
 
-        if (ih.isUserPkgInstalled and ih.isOldPkgHybrid != req.isHybrid) {
+        if (ih.isUserPkgInstalled) {
             // search for installed apps in the request
             std::vector<std::string> requestedApps;
             for (auto &app : req.apps) {