return PMINFO_R_ERROR;
}
- if (ptr->GetRequestResult() != PMINFO_R_OK) {
- LOG(ERROR) << "Request fail";
- return ptr->GetRequestResult();
+ int ret = return_parcel->GetRequestResult();
+ if (ret != PMINFO_R_OK) {
+ if (ret == PMINFO_R_ENOENT) {
+ LOG(DEBUG) << "No such application";
+ } else {
+ LOG(ERROR) << "Request fail";
+ }
+ return ret;
}
- tizen_base::Parcel parcel;
- parcel.ReadParcelable(return_parcel.get());
+ if (ptr->GetType() != pkgmgr_common::parcel::ParcelableType::AppInfo) {
+ LOG(ERROR) << "Invalid parcelable type";
+ return PMINFO_R_ERROR;
+ }
+
+ std::shared_ptr<pkgmgr_common::parcel::AppInfoParcelable> return_parcel(
+ std::static_pointer_cast<pkgmgr_common::parcel::AppInfoParcelable>(
+ ptr));
+
auto result_list = return_parcel->GetAppInfo();
for (auto& appinfo : result_list)
g_hash_table_insert(packages, (gpointer)appinfo->appid,