mirror of
https://github.com/openharmony/distributedschedule_samgr.git
synced 2026-07-21 06:55:27 -04:00
@@ -46,7 +46,7 @@ struct DstbMissionInfo : public Parcelable {
|
||||
std::string label;
|
||||
int32_t size = 0;
|
||||
std::string iconPath;
|
||||
int32_t color = 0;
|
||||
int32_t continuable = 0;
|
||||
int32_t windowType = 0;
|
||||
bool lockedState = false;
|
||||
int32_t missionType = INT_MAX;
|
||||
|
||||
@@ -50,7 +50,7 @@ bool DstbMissionInfo::ReadFromParcel(Parcel& parcel)
|
||||
label = Str16ToStr8(parcel.ReadString16());
|
||||
size = parcel.ReadInt32();
|
||||
iconPath = Str16ToStr8(parcel.ReadString16());
|
||||
color = parcel.ReadInt32();
|
||||
continuable = parcel.ReadInt32();
|
||||
windowType = parcel.ReadInt32();
|
||||
lockedState = parcel.ReadBool();
|
||||
missionType = parcel.ReadInt32();
|
||||
@@ -91,7 +91,7 @@ bool DstbMissionInfo::Marshalling(Parcel& parcel) const
|
||||
PARCEL_WRITE_HELPER_RET(parcel, String16, Str8ToStr16(label), false);
|
||||
PARCEL_WRITE_HELPER_RET(parcel, Int32, size, false);
|
||||
PARCEL_WRITE_HELPER_RET(parcel, String16, Str8ToStr16(iconPath), false);
|
||||
PARCEL_WRITE_HELPER_RET(parcel, Int32, color, false);
|
||||
PARCEL_WRITE_HELPER_RET(parcel, Int32, continuable, false);
|
||||
PARCEL_WRITE_HELPER_RET(parcel, Int32, windowType, false);
|
||||
PARCEL_WRITE_HELPER_RET(parcel, Bool, lockedState, false);
|
||||
PARCEL_WRITE_HELPER_RET(parcel, Int32, missionType, false);
|
||||
@@ -184,7 +184,7 @@ std::string DstbMissionInfo::ToString() const
|
||||
str += " label: " + label;
|
||||
str += " size: " + std::to_string(size);
|
||||
str += " iconPath: " + iconPath;
|
||||
str += " color: " + std::to_string(color);
|
||||
str += " continuable: " + std::to_string(continuable);
|
||||
str += " windowType: " + std::to_string(windowType);
|
||||
str += " lockedState: ";
|
||||
str += lockedState ? "true" : "false";
|
||||
|
||||
@@ -41,6 +41,7 @@ int32_t MissionInfoConverter::ConvertToDstbMissionInfos(std::vector<AAFwk::Missi
|
||||
dstbMissionInfo.iconPath = iter->iconPath;
|
||||
shared_ptr<AAFwk::Want> spWant = make_shared<AAFwk::Want>(iter->want);
|
||||
dstbMissionInfo.baseWant = spWant;
|
||||
dstbMissionInfo.continuable = iter->continuable ? 1 : 0;
|
||||
dstbMissionInfos.push_back(dstbMissionInfo);
|
||||
}
|
||||
return ERR_OK;
|
||||
@@ -60,6 +61,7 @@ int32_t MissionInfoConverter::ConvertToMissionInfos(std::vector<DstbMissionInfo>
|
||||
missionInfo.label = iter->label;
|
||||
missionInfo.iconPath = iter->iconPath;
|
||||
missionInfo.want = *(iter->baseWant);
|
||||
missionInfo.continuable = iter->continuable == 1;
|
||||
missionInfos.push_back(missionInfo);
|
||||
}
|
||||
return ERR_OK;
|
||||
|
||||
Reference in New Issue
Block a user