fix format

Signed-off-by: donglin <donglin9@huawei.com>
This commit is contained in:
donglin
2022-07-29 10:26:51 +08:00
parent 54243997ca
commit 9ac1c4e0db
3 changed files with 13 additions and 14 deletions
@@ -67,7 +67,7 @@ napi_value WantConstantInit(napi_env env, napi_value exports)
SetNamedProperty(env, action, "ohos.action.fileSelect", "ACTION_FILE_SELECT");
SetNamedProperty(env, action, "ability.params.stream", "PARAMS_STREAM");
SetNamedProperty(env, action, "ohos.account.appAccount.action.oauth", "ACTION_APP_ACCOUNT_OAUTH");
SetNamedProperty(env, action, "ohos.want.action.marketDownload", "ACTION_MARKER_DOWNLOAD");
SetNamedProperty(env, action, "ohos.want.action.marketDownload", "ACTION_MARKET_DOWNLOAD");
SetNamedProperty(env, action, "ohos.want.action.marketCrowdTest", "ACTION_MARKET_CROWDTEST");
SetNamedProperty(env, entity, "entity.system.default", "ENTITY_DEFAULT");
@@ -1012,8 +1012,6 @@ private:
void SubscribeBackgroundTask();
int StartAppgallery(int requestCode, int32_t userId);
constexpr static int REPOLL_TIME_MICRO_SECONDS = 1000000;
constexpr static int WAITING_BOOT_ANIMATION_TIMER = 5;
@@ -353,7 +353,10 @@ int AbilityManagerService::StartAbilityInner(const Want &want, const sptr<IRemot
if (AAFwk::ApplicationUtil::IsCrowdtestExpired(want, GetUserId())) {
HILOG_ERROR("%{public}s: Crowdtest expired", __func__);
#ifdef SUPPORT_GRAPHICS
int ret = StartAppgallery(requestCode, userId);
Want crowdtestWant = want;
crowdtestWant.SetElementName(MARKET_BUNDLE_NAME, "");
crowdtestWant.SetAction(ACTION_MARKET_CROWDTEST);
int ret = StartAbilityInner(crowdtestWant, nullptr, requestCode, -1, userId);
if (ret != ERR_OK) {
HILOG_ERROR("%{public}s: Crowdtest implicit start appgallery failed", __func__);
return ret;
@@ -519,7 +522,10 @@ int AbilityManagerService::StartAbility(const Want &want, const AbilityStartSett
if (AAFwk::ApplicationUtil::IsCrowdtestExpired(want, GetUserId())) {
HILOG_ERROR("%{public}s: Crowdtest expired", __func__);
#ifdef SUPPORT_GRAPHICS
int ret = StartAppgallery(requestCode, userId);
Want crowdtestWant = want;
crowdtestWant.SetElementName(MARKET_BUNDLE_NAME, "");
crowdtestWant.SetAction(ACTION_MARKET_CROWDTEST);
int ret = StartAbilityInner(crowdtestWant, nullptr, requestCode, -1, userId);
if (ret != ERR_OK) {
HILOG_ERROR("%{public}s: Crowdtest implicit start appgallery failed", __func__);
return ret;
@@ -683,7 +689,10 @@ int AbilityManagerService::StartAbility(const Want &want, const StartOptions &st
if (AAFwk::ApplicationUtil::IsCrowdtestExpired(want, GetUserId())) {
HILOG_ERROR("%{public}s: Crowdtest expired", __func__);
#ifdef SUPPORT_GRAPHICS
int ret = StartAppgallery(requestCode, userId);
Want crowdtestWant = want;
crowdtestWant.SetElementName(MARKET_BUNDLE_NAME, "");
crowdtestWant.SetAction(ACTION_MARKET_CROWDTEST);
int ret = StartAbilityInner(crowdtestWant, nullptr, requestCode, -1, userId);
if (ret != ERR_OK) {
HILOG_ERROR("%{public}s: Crowdtest implicit start appgallery failed", __func__);
return ret;
@@ -4944,14 +4953,6 @@ int32_t AbilityManagerService::ShowPickerDialog(const Want& want, int32_t userId
);
return Ace::UIServiceMgrClient::GetInstance()->ShowAppPickerDialog(want, abilityInfos, userId);
}
int AbilityManagerService::StartAppgallery(int requestCode, int32_t userId)
{
Want want;
want.SetElementName(MARKET_BUNDLE_NAME, "");
want.SetAction(ACTION_MARKET_CROWDTEST);
return StartAbilityInner(want, nullptr, requestCode, -1, userId);
}
#endif
} // namespace AAFwk
} // namespace OHOS