/* if move is completed, then update installed storage to pkgmgr_parser db */
if (move_type == APP2EXT_MOVE_TO_EXT) {
+ if (!image_path) {
+ _E("image_path is NULL");
+ return APP2EXT_ERROR_MEMORY_ALLOC_FAILED;
+ }
pkgmgr_ret = pkgmgrinfo_pkginfo_set_usr_installed_storage(pkgid,
INSTALL_EXTERNAL, image_path, uid);
if (pkgmgr_ret < 0) {
}
}
+ if (image_path)
+ free(image_path);
+
sync();
return APP2EXT_SUCCESS;
}
char *device_name = NULL;
char *encoded_id = NULL;
int ret = APP2EXT_SUCCESS;
+ int pkgmgr_ret = 0;
/* validate the function parameter recieved */
if (pkgid == NULL || install_status < APP2EXT_STATUS_FAILED
}
#endif
+ pkgmgr_ret = pkgmgrinfo_pkginfo_set_usr_installed_storage(pkgid,
+ INSTALL_EXTERNAL, loopback_device, uid);
+ if (pkgmgr_ret < 0) {
+ _E("fail to update installed location " \
+ "to db[%s, %d] of uid(%d), pkgmgr ret(%d)",
+ pkgid, INSTALL_EXTERNAL, uid, pkgmgr_ret);
+ return APP2EXT_ERROR_PKGMGR_ERROR;
+ }
+
if (device_name) {
free(device_name);
device_name = NULL;