mirror of
https://github.com/openharmony/bundlemanager_bundle_framework_lite.git
synced 2026-07-20 23:55:24 -04:00
IssueNo:#I47EPA
Description:if getbundlesize failed return 0 Sig:appexecfwk Feature or Bugfix:Bugfix Binary Source:No Signed-off-by: wangdengjia <wangdengjia@huawei.com> Change-Id: I0f9263b9a85ce98c36bb3ffc1e61810673d5491e Signed-off-by: wangdengjia <wangdengjia@huawei.com>
This commit is contained in:
@@ -251,7 +251,7 @@ void FreeSystemAvailableCapabilitiesInfo(SystemCapability *sysCap);
|
||||
* @brief Get bundle size
|
||||
*
|
||||
* @param bundleName Indicates the bundle name.
|
||||
* @return Returns the bundle size if this function is successfully called; returns 0 otherwise.
|
||||
* @return Returns the bundle size (Byte) if this function is successfully called; returns 0 otherwise.
|
||||
*
|
||||
* @since 7
|
||||
* @version 7
|
||||
|
||||
@@ -256,14 +256,14 @@ uint8_t BundleMsFeature::GetInnerBundleSize(const uint8_t funcId, IpcIo *req, Ip
|
||||
return ERR_APPEXECFWK_OBJECT_NULL;
|
||||
}
|
||||
size_t size = 0;
|
||||
uint32_t bundleSize = 0;
|
||||
char *bundleName = reinterpret_cast<char *>(IpcIoPopString(req, &size));
|
||||
if (bundleName == nullptr) {
|
||||
return ERR_APPEXECFWK_DESERIALIZATION_FAILED;
|
||||
}
|
||||
uint32_t bundleSize = GetBundleSize(bundleName);
|
||||
if (bundleSize == 0) {
|
||||
return ERR_APPEXECFWK_OBJECT_NULL;
|
||||
IpcIoPushUint8(reply, static_cast<uint8_t>(OHOS_SUCCESS));
|
||||
IpcIoPushUint32(reply, bundleSize);
|
||||
return OHOS_SUCCESS;
|
||||
}
|
||||
bundleSize = GetBundleSize(bundleName);
|
||||
IpcIoPushUint8(reply, static_cast<uint8_t>(OHOS_SUCCESS));
|
||||
IpcIoPushUint32(reply, bundleSize);
|
||||
return OHOS_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user