mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-25 12:23:20 -04:00
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user