#include <boost/system/error_code.hpp>
#include <common/pkgmgr_registration.h>
+#include <common/recovery_file.h>
#include <common/request.h>
#include <common/utils/file_util.h>
-#include <manifest_handlers/application_manifest_constants.h>
-#include <manifest_handlers/tizen_application_handler.h>
-#include <manifest_handlers/widget_handler.h>
#include <manifest_parser/manifest_parser.h>
#include <manifest_parser/utils/logging.h>
+#include <wgt_manifest_handlers/application_manifest_constants.h>
+#include <wgt_manifest_handlers/tizen_application_handler.h>
+#include <wgt_manifest_handlers/widget_handler.h>
#include <memory>
#include <string>
return pkg_id;
}
+std::string ReadPkgidFromRecovery(const std::string& recovery_path) {
+ std::unique_ptr<ci::recovery::RecoveryFile> recovery_file =
+ ci::recovery::RecoveryFile::OpenRecoveryFileForPath(recovery_path);
+ recovery_file->Detach();
+ return recovery_file->pkgid();
+}
+
} // namespace
namespace wgt {
bool WgtAppQueryInterface::IsHybridApplication(int argc, char** argv) {
std::string arg = GetInstallationRequestInfo(argc, argv);
+ if (arg.find("apps_rw/recovery-") != std::string::npos)
+ arg = ReadPkgidFromRecovery(arg);
if (ci::IsPackageInstalled(arg, ci::GetRequestMode())) {
bf::path package_directory(ci::GetRootAppPath());
- if (bf::exists(package_directory / kTizenManifestLocation) &&
- bf::exists(package_directory / kHybridConfigLocation))
+ if (bf::exists(package_directory / arg / kTizenManifestLocation) &&
+ bf::exists(package_directory / arg / kHybridConfigLocation))
return true;
} else {
bool tizen_manifest_found = false;