mirror of
https://gitee.com/openharmony/bundlemanager_bundle_framework
synced 2024-11-27 09:20:49 +00:00
IssueNo:#I8DNH7
Description:Bugfix Sig:bundleManager Feature or Bugfix:Bugfix Binary Source:No Signed-off-by: zhouwenzhi <zhouwenzhi@huawei.com>
This commit is contained in:
parent
126cc87a99
commit
f9f1c392ed
@ -240,7 +240,7 @@ struct AbilityInfo : public Parcelable {
|
||||
bool unclearableMission = false;
|
||||
// whether to support recover UI interface
|
||||
bool recoverable = false;
|
||||
bool specifiedProcess = false;
|
||||
bool isolationProcess = false;
|
||||
|
||||
// support windows mode
|
||||
std::vector<SupportWindowMode> windowModes;
|
||||
|
@ -102,7 +102,7 @@ const std::string JOSN_KEY_UNCLEARABLE_MISSION = "unclearableMission";
|
||||
const std::string JSON_KEY_RECOVERABLE = "recoverable";
|
||||
const std::string JSON_KEY_SUPPORT_EXT_NAMES = "supportExtNames";
|
||||
const std::string JSON_KEY_SUPPORT_MIME_TYPES = "supportMimeTypes";
|
||||
const std::string JSON_KEY_SPECIFIED_PROCESS = "specifiedProcess";
|
||||
const std::string JSON_KEY_ISOLATION_PROCESS = "isolationProcess";
|
||||
const size_t ABILITY_CAPACITY = 10240; // 10K
|
||||
} // namespace
|
||||
|
||||
@ -281,7 +281,7 @@ bool AbilityInfo::ReadFromParcel(Parcel &parcel)
|
||||
stctUri.type = Str16ToStr8(parcel.ReadString16());
|
||||
skillUri.emplace_back(stctUri);
|
||||
}
|
||||
specifiedProcess = parcel.ReadBool();
|
||||
isolationProcess = parcel.ReadBool();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -432,7 +432,7 @@ bool AbilityInfo::Marshalling(Parcel &parcel) const
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(uri.pathRegex));
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(uri.type));
|
||||
}
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, specifiedProcess);
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, isolationProcess);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -559,7 +559,7 @@ void to_json(nlohmann::json &jsonObject, const AbilityInfo &abilityInfo)
|
||||
{JSON_KEY_RECOVERABLE, abilityInfo.recoverable},
|
||||
{JSON_KEY_SUPPORT_EXT_NAMES, abilityInfo.supportExtNames},
|
||||
{JSON_KEY_SUPPORT_MIME_TYPES, abilityInfo.supportMimeTypes},
|
||||
{JSON_KEY_SPECIFIED_PROCESS, abilityInfo.specifiedProcess},
|
||||
{JSON_KEY_ISOLATION_PROCESS, abilityInfo.isolationProcess},
|
||||
};
|
||||
if (abilityInfo.maxWindowRatio == 0) {
|
||||
// maxWindowRatio in json string will be 0 instead of 0.0
|
||||
@ -1211,8 +1211,8 @@ void from_json(const nlohmann::json &jsonObject, AbilityInfo &abilityInfo)
|
||||
ArrayType::STRING);
|
||||
GetValueIfFindKey<bool>(jsonObject,
|
||||
jsonObjectEnd,
|
||||
JSON_KEY_SPECIFIED_PROCESS,
|
||||
abilityInfo.specifiedProcess,
|
||||
JSON_KEY_ISOLATION_PROCESS,
|
||||
abilityInfo.isolationProcess,
|
||||
JsonType::BOOLEAN,
|
||||
false,
|
||||
parseResult,
|
||||
|
@ -412,7 +412,7 @@ constexpr const char* ABILITY_MIN_WINDOW_HEIGHT = "minWindowHeight";
|
||||
constexpr const char* ABILITY_EXCLUDE_FROM_MISSIONS = "excludeFromMissions";
|
||||
constexpr const char* ABILITY_UNCLEARABLE_MISSION = "unclearableMission";
|
||||
constexpr const char* ABILITY_RECOVERABLE = "recoverable";
|
||||
constexpr const char* ABILITY_SPECIFIED_PROCESS = "specifiedProcess";
|
||||
constexpr const char* ABILITY_ISOLATION_PROCESS = "isolationProcess";
|
||||
// extension ability
|
||||
constexpr const char* EXTENSION_ABILITY_NAME = "name";
|
||||
constexpr const char* EXTENSION_ABILITY_TYPE = "type";
|
||||
|
@ -151,7 +151,7 @@ struct Ability {
|
||||
bool excludeFromMissions = false;
|
||||
bool recoverable = false;
|
||||
bool unclearableMission = false;
|
||||
bool specifiedProcess = false;
|
||||
bool isolationProcess = false;
|
||||
};
|
||||
|
||||
struct Extension {
|
||||
@ -556,8 +556,8 @@ void from_json(const nlohmann::json &jsonObject, Ability &ability)
|
||||
ArrayType::NOT_ARRAY);
|
||||
GetValueIfFindKey<bool>(jsonObject,
|
||||
jsonObjectEnd,
|
||||
ABILITY_SPECIFIED_PROCESS,
|
||||
ability.specifiedProcess,
|
||||
ABILITY_ISOLATION_PROCESS,
|
||||
ability.isolationProcess,
|
||||
JsonType::BOOLEAN,
|
||||
false,
|
||||
g_parseResult,
|
||||
@ -1899,7 +1899,7 @@ bool ToAbilityInfo(
|
||||
abilityInfo.permissions = ability.permissions;
|
||||
abilityInfo.visible = ability.visible;
|
||||
abilityInfo.continuable = ability.continuable;
|
||||
abilityInfo.specifiedProcess = ability.specifiedProcess;
|
||||
abilityInfo.isolationProcess = ability.isolationProcess;
|
||||
abilityInfo.backgroundModes = GetBackgroundModes(ability.backgroundModes);
|
||||
GetMetadata(abilityInfo.metadata, ability.metadata);
|
||||
abilityInfo.package = moduleJson.module.name;
|
||||
|
@ -832,7 +832,7 @@ protected:
|
||||
"writePermission": "",
|
||||
"supportExtNames": [],
|
||||
"supportMimeTypes": [],
|
||||
"specifiedProcess": false
|
||||
"isolationProcess": false
|
||||
},
|
||||
"com.ohos.launcher.com.ohos.launcher.recents.com.ohos.launcher.recents.MainAbility": {
|
||||
"applicationName": "com.ohos.launcher",
|
||||
|
@ -655,7 +655,7 @@ HWTEST_F(BmsBundleInstallerTest, ParseModuleJson_0100, Function | SmallTest | Le
|
||||
EXPECT_EQ(abilityInfos.srcEntrance, "./login/MyLoginAbility.ts");
|
||||
EXPECT_EQ(abilityInfos.description, "$string:description_main_ability");
|
||||
EXPECT_EQ(abilityInfos.descriptionId, 16777219);
|
||||
EXPECT_EQ(abilityInfos.specifiedProcess, true);
|
||||
EXPECT_EQ(abilityInfos.isolationProcess, true);
|
||||
EXPECT_EQ(hapModuleInfo.label, "Login");
|
||||
|
||||
auto metadata = abilityInfos.metadata.front();
|
||||
|
@ -47,7 +47,7 @@
|
||||
"label": "Login",
|
||||
"labelId": 16777216,
|
||||
"permissions":["ext","sql"],
|
||||
"specifiedProcess": true,
|
||||
"isolationProcess": true,
|
||||
"metadata":[
|
||||
{
|
||||
"name":"a01",
|
||||
|
Loading…
Reference in New Issue
Block a user