mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-27 00:20:44 +00:00
commit
97ce78b7f6
@ -112,8 +112,7 @@ bool DstbMissionInfo::ReadDstbMissionInfosFromParcel(Parcel& parcel,
|
||||
return false;
|
||||
}
|
||||
size_t size = static_cast<size_t>(len);
|
||||
if ((size > Constants::Mission::GET_MAX_MISSIONS) || (size * sizeof(DstbMissionInfo) >
|
||||
parcel.GetReadableBytes())) {
|
||||
if (size > Constants::Mission::GET_MAX_MISSIONS) {
|
||||
HILOGE("Failed to read DstbMissionInfo vector, size = %{public}zu", size);
|
||||
return false;
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ HWTEST_F(BundleManagerInternalTest, BundleManagerInternalTest_005, TestSize.Leve
|
||||
{
|
||||
DTEST_LOG << "BundleManagerInternalTest BundleManagerInternalTest_005 begin" << std::endl;
|
||||
string deviceId = "123456";
|
||||
string bundleName = "com.third.hiworld.example";
|
||||
string bundleName = "com.ohos.mms";
|
||||
AppExecFwk::DistributedBundleInfo remoteBundleInfo;
|
||||
int ret = BundleManagerInternal::CheckRemoteBundleInfoForContinuation(deviceId, bundleName, remoteBundleInfo);
|
||||
EXPECT_TRUE(CONTINUE_REMOTE_UNINSTALLED_UNSUPPORT_FREEINSTALL == ret);
|
||||
@ -159,7 +159,7 @@ HWTEST_F(BundleManagerInternalTest, BundleManagerInternalTest_006, TestSize.Leve
|
||||
{
|
||||
DTEST_LOG << "BundleManagerInternalTest BundleManagerInternalTest_006 begin" << std::endl;
|
||||
string deviceId = "123456";
|
||||
string bundleName = "com.third.hiworld.example";
|
||||
string bundleName = "com.ohos.mms";
|
||||
string moduleName = "entry";
|
||||
string abilityName = "bmsThirdBundle";
|
||||
AAFwk::Want want;
|
||||
|
@ -356,7 +356,7 @@ HWTEST_F(DSchedContinuationTest, SetWantForContinuation_002, TestSize.Level1)
|
||||
* @tc.steps: step1. input valid bundleName.
|
||||
* @tc.expected: step1. return OK.
|
||||
*/
|
||||
std::string bundleName = "com.third.hiworld.example";
|
||||
std::string bundleName = "com.ohos.mms";
|
||||
std::string abilityName = "bmsThirdBundle";
|
||||
std::shared_ptr<Want> spWant = MockWant(bundleName, abilityName, 0);
|
||||
int32_t missionId = 0;
|
||||
|
@ -60,8 +60,8 @@ namespace {
|
||||
constexpr int32_t MISSION_ID = 1;
|
||||
const std::string DMS_SRC_NETWORK_ID = "dmsSrcNetworkId";
|
||||
const int DEFAULT_REQUEST_CODE = -1;
|
||||
const string ABILITY_NAME = "com.ohos.launcher.MainAbility";
|
||||
const string BUNDLE_NAME = "com.ohos.launcher";
|
||||
const string ABILITY_NAME = "com.ohos.permissionmanager.MainAbility";
|
||||
const string BUNDLE_NAME = "com.ohos.permissionmanager";
|
||||
const string DMS_IS_CALLER_BACKGROUND = "dmsIsCallerBackGround";
|
||||
const string DMS_VERSION_ID = "dmsVersion";
|
||||
const string DMS_VERSION = "4.0.0";
|
||||
@ -1934,7 +1934,7 @@ HWTEST_F(DistributedSchedServiceTest, StartLocalAbility_005, TestSize.Level3)
|
||||
AAFwk::Want want;
|
||||
std::string localDeviceId;
|
||||
DtbschedmgrDeviceInfoStorage::GetInstance().GetLocalDeviceId(localDeviceId);
|
||||
AppExecFwk::ElementName element(localDeviceId, "com.third.hiworld.example", "bmsThirdBundle");
|
||||
AppExecFwk::ElementName element(localDeviceId, "com.ohos.mms", "bmsThirdBundle");
|
||||
want.SetElement(element);
|
||||
want.SetParam(DMS_IS_CALLER_BACKGROUND, false);
|
||||
AppExecFwk::AbilityInfo abilityInfo;
|
||||
|
Loading…
Reference in New Issue
Block a user