diff --git a/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_host.cpp b/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_host.cpp index ad58b7d28f9505df8b93b20f9837da0d97710b54..5589a03e1f0f6f31c4a79453eb12204fe312c153 100644 --- a/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_host.cpp +++ b/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_host.cpp @@ -2044,12 +2044,9 @@ ErrCode BundleMgrHost::HandleDumpInfos(MessageParcel &data, MessageParcel &reply APP_LOGE("write failed"); return ERR_APPEXECFWK_PARCEL_ERROR; } - if (ret) { - std::vector dumpInfos; - SplitString(result, dumpInfos); - if (!reply.WriteStringVector(dumpInfos)) { - return ERR_APPEXECFWK_PARCEL_ERROR; - } + if (ret && (WriteBigString(result, reply) != ERR_OK)) { + APP_LOGE("write big string failed"); + return ERR_APPEXECFWK_PARCEL_ERROR; } return ERR_OK; } diff --git a/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_proxy.cpp b/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_proxy.cpp index 91a8ce418222a06cb44863e5a6ea01ca3f48fe3b..a10245c348f60562a9bcdcb4eb13e11700f70411 100644 --- a/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_proxy.cpp +++ b/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_proxy.cpp @@ -2083,12 +2083,11 @@ bool BundleMgrProxy::DumpInfos( APP_LOGE("readParcelableInfo failed"); return false; } - std::vector dumpInfos; - if (!reply.ReadStringVector(&dumpInfos)) { - APP_LOGE("fail to dump from reply"); + auto ret = InnerGetBigString(reply, result); + if (ret != ERR_OK) { + APP_LOGE("fail to dump from reply err:%{public}d", ret); return false; } - result = std::accumulate(dumpInfos.begin(), dumpInfos.end(), result); return true; } diff --git a/test/systemtest/common/bms/acts_bms_kit_system_test/acts_bms_kit_system_test.cpp b/test/systemtest/common/bms/acts_bms_kit_system_test/acts_bms_kit_system_test.cpp index 8a235fabaf51066451d945b0bfdcf3dd56588dd8..9356baaa37d2ab0b4d223d0ed7ff244f26518b88 100644 --- a/test/systemtest/common/bms/acts_bms_kit_system_test/acts_bms_kit_system_test.cpp +++ b/test/systemtest/common/bms/acts_bms_kit_system_test/acts_bms_kit_system_test.cpp @@ -9072,6 +9072,9 @@ HWTEST_F(ActsBmsKitSystemTest, DumpInfos_0002, Function | SmallTest | Level1) auto ret = bundleMgrProxy->DumpInfos(DumpFlag::DUMP_BUNDLE_INFO, appName, wrongUser, result); EXPECT_FALSE(ret); + ret = bundleMgrProxy->DumpInfos(DumpFlag::DUMP_BUNDLE_INFO, "not_exist", USERID, result); + EXPECT_EQ(ret, false); + auto dumpLabelRes = bundleMgrProxy->DumpInfos(DumpFlag::DUMP_BUNDLE_LABEL, appName, wrongUser, result); EXPECT_FALSE(dumpLabelRes);