mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 22:21:36 -04:00
@@ -607,7 +607,10 @@ void AbilityContextImpl::RegisterAbilityCallback(std::weak_ptr<AppExecFwk::IAbil
|
||||
ErrCode AbilityContextImpl::RequestDialogService(napi_env env, AAFwk::Want &want, RequestDialogResultTask &&task)
|
||||
{
|
||||
want.SetParam(RequestConstants::REQUEST_TOKEN_KEY, token_);
|
||||
int32_t left, top, width, height;
|
||||
int32_t left;
|
||||
int32_t top;
|
||||
int32_t width;
|
||||
int32_t height;
|
||||
GetWindowRect(left, top, width, height);
|
||||
want.SetParam(RequestConstants::WINDOW_RECTANGLE_LEFT_KEY, left);
|
||||
want.SetParam(RequestConstants::WINDOW_RECTANGLE_TOP_KEY, top);
|
||||
|
||||
@@ -173,7 +173,6 @@ std::unique_ptr<JsRuntime> JsRuntime::Create(const Options& options)
|
||||
|
||||
if (!options.preload && options.isStageModel) {
|
||||
auto preloadedInstance = Runtime::GetPreloaded();
|
||||
|
||||
#ifdef SUPPORT_GRAPHICS
|
||||
// reload ace if compatible mode changes
|
||||
if (Ace::AceForwardCompatibility::PipelineChanged() && preloadedInstance) {
|
||||
|
||||
@@ -118,7 +118,9 @@ sptr<IServiceRouterManager> ServiceRouterMgrHelper::GetServiceRouterMgr()
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(cvLock_);
|
||||
auto waitState = mgrConn_.wait_for(lock, std::chrono::milliseconds(LOAD_SA_TIMEOUT_MS),
|
||||
[this](){ return isReady; });
|
||||
[this]() {
|
||||
return isReady;
|
||||
});
|
||||
if (!waitState) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -563,7 +563,6 @@ int32_t AbilityManagerService::StartAbilityByInsightIntent(const Want &want, con
|
||||
return ERR_INVALID_VALUE;
|
||||
}
|
||||
std::string bundleNameFromAbilityRecord = abilityRecord->GetAbilityInfo().bundleName;
|
||||
|
||||
if (!bundleNameFromWant.empty() && bundleNameFromWant == bundleNameFromIntentMgr &&
|
||||
bundleNameFromWant == bundleNameFromAbilityRecord) {
|
||||
HILOG_INFO("bundleName match");
|
||||
@@ -6530,7 +6529,6 @@ void AbilityManagerService::EnableRecoverAbility(const sptr<IRemoteObject>& toke
|
||||
}
|
||||
missionListMgr->EnableRecoverAbility(record->GetMissionId());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void AbilityManagerService::RecoverAbilityRestart(const Want& want)
|
||||
|
||||
@@ -621,7 +621,7 @@ int AbilityManagerStub::ScheduleCommandAbilityWindowDoneInner(MessageParcel &dat
|
||||
|
||||
int AbilityManagerStub::AcquireDataAbilityInner(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
std::unique_ptr<Uri> uri(new Uri(data.ReadString()));
|
||||
std::unique_ptr<Uri> uri = std::make_unique<Uri>(data.ReadString());
|
||||
bool tryBind = data.ReadBool();
|
||||
sptr<IRemoteObject> callerToken = data.ReadRemoteObject();
|
||||
sptr<IAbilityScheduler> result = AcquireDataAbility(*uri, tryBind, callerToken);
|
||||
|
||||
@@ -154,8 +154,8 @@ ErrCode AppMgrService::Init()
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
int32_t AppMgrService::CheckPermission(
|
||||
[[maybe_unused]] const int32_t recordId, [[maybe_unused]] const std::string &permission)
|
||||
int32_t AppMgrService::CheckPermission([[maybe_unused]]
|
||||
const int32_t recordId, [[maybe_unused]] const std::string &permission)
|
||||
{
|
||||
HILOG_INFO("check application's permission");
|
||||
|
||||
|
||||
@@ -944,8 +944,6 @@ void AppRunningRecord::AbilityBackground(const std::shared_ptr<AbilityRunningRec
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Then schedule application background when all ability is not foreground.
|
||||
if (foregroundSize == 0 && mainBundleName_ != LAUNCHER_NAME && windowIds_.empty()) {
|
||||
SetApplicationPendingState(ApplicationPendingState::BACKGROUNDING);
|
||||
|
||||
@@ -784,7 +784,6 @@ void QuickFixManagerApplyTask::PostRevokeQuickFixTask()
|
||||
HILOG_ERROR("Revoke task is nullptr.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (applyTask->GetRunningState()) {
|
||||
applyTask->HandleRevokeQuickFixAppRunning();
|
||||
return;
|
||||
|
||||
@@ -734,8 +734,8 @@ uint32_t UriPermissionManagerStubImpl::GetTokenIdByBundleName(const std::string
|
||||
return bundleInfo.applicationInfo.accessTokenId;
|
||||
}
|
||||
|
||||
void UriPermissionManagerStubImpl::ProxyDeathRecipient::OnRemoteDied(
|
||||
[[maybe_unused]] const wptr<IRemoteObject>& remote)
|
||||
void UriPermissionManagerStubImpl::ProxyDeathRecipient::OnRemoteDied([[maybe_unused]]
|
||||
const wptr<IRemoteObject>& remote)
|
||||
{
|
||||
if (proxy_) {
|
||||
HILOG_DEBUG("mgr stub died.");
|
||||
|
||||
@@ -56,8 +56,7 @@ public:
|
||||
|
||||
int MockGetCurrentState()
|
||||
{
|
||||
int value;
|
||||
value = GetCurrentState();
|
||||
int value = GetCurrentState();
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -25,7 +25,8 @@ public:
|
||||
MOCK_METHOD1(PassPrimary, void(const sptr<IRemoteObject> &primary));
|
||||
MOCK_METHOD0(ReverseContinuation, bool());
|
||||
MOCK_METHOD1(NotifyReverseResult, void(int reverseResult));
|
||||
int SendRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) {
|
||||
int SendRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option)
|
||||
{
|
||||
SendRequest_called = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
-2
@@ -653,8 +653,6 @@ HWTEST_F(AbilityManagerServiceThirdTest, ForceTimeoutForTest_001, TestSize.Level
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Feature: AbilityManagerService
|
||||
* Function: JudgeMultiUserConcurrency
|
||||
|
||||
@@ -330,7 +330,6 @@ HWTEST_F(AppRecoveryUnitTest, ScheduleSaveAppState_003, TestSize.Level1)
|
||||
EXPECT_TRUE(ret);
|
||||
});
|
||||
watchdog.join();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -67,7 +67,6 @@ public:
|
||||
|
||||
void SetApplicationInfo(const std::shared_ptr<AppExecFwk::ApplicationInfo> &info);
|
||||
|
||||
|
||||
void SetParentContext(const std::shared_ptr<Context> &context);
|
||||
|
||||
std::string GetBundleCodePath() const override;
|
||||
|
||||
-3
@@ -37,9 +37,6 @@ public:
|
||||
static void TearDownTestCase(void);
|
||||
void SetUp();
|
||||
void TearDown();
|
||||
|
||||
protected:
|
||||
|
||||
};
|
||||
|
||||
void RemoteRegisterServiceProxyTest::SetUpTestCase(void)
|
||||
|
||||
-3
@@ -36,9 +36,6 @@ public:
|
||||
static void TearDownTestCase(void);
|
||||
void SetUp();
|
||||
void TearDown();
|
||||
|
||||
protected:
|
||||
|
||||
};
|
||||
|
||||
void RemoteRegisterServiceStubTest::SetUpTestCase(void)
|
||||
|
||||
@@ -74,8 +74,8 @@ public:
|
||||
|
||||
class MockReverseContinuationSchedulerPrimaryProxy : public IRemoteProxy<IReverseContinuationSchedulerPrimary> {
|
||||
public:
|
||||
explicit MockReverseContinuationSchedulerPrimaryProxy(const sptr<IRemoteObject> &remoteObject) :
|
||||
IRemoteProxy<IReverseContinuationSchedulerPrimary>(remoteObject) {}
|
||||
explicit MockReverseContinuationSchedulerPrimaryProxy(const sptr<IRemoteObject> &remoteObject)
|
||||
: IRemoteProxy<IReverseContinuationSchedulerPrimary>(remoteObject) {}
|
||||
virtual ~MockReverseContinuationSchedulerPrimaryProxy() = default;
|
||||
MOCK_METHOD0(NotifyReplicaTerminated, void());
|
||||
MOCK_METHOD1(ContinuationBack, bool(const AAFwk::Want &want));
|
||||
@@ -83,8 +83,8 @@ public:
|
||||
|
||||
class MockReverseContinuationSchedulerReplicaProxy : public IRemoteProxy<IReverseContinuationSchedulerReplica> {
|
||||
public:
|
||||
explicit MockReverseContinuationSchedulerReplicaProxy(const sptr<IRemoteObject> &remoteObject) :
|
||||
IRemoteProxy<IReverseContinuationSchedulerReplica>(remoteObject) {}
|
||||
explicit MockReverseContinuationSchedulerReplicaProxy(const sptr<IRemoteObject> &remoteObject)
|
||||
: IRemoteProxy<IReverseContinuationSchedulerReplica>(remoteObject) {}
|
||||
virtual ~MockReverseContinuationSchedulerReplicaProxy() = default;
|
||||
MOCK_METHOD1(PassPrimary, void(const sptr<IRemoteObject> &primary));
|
||||
MOCK_METHOD0(ReverseContinuation, bool());
|
||||
|
||||
@@ -30,8 +30,7 @@ using namespace testing::ext;
|
||||
using namespace OHOS;
|
||||
using namespace OHOS::AppExecFwk;
|
||||
static const std::string URI = "dataability://ohos.demo.TestDataAbilityOperation";
|
||||
namespace
|
||||
{
|
||||
namespace {
|
||||
const int32_t ZERO = 0;
|
||||
const int32_t ONE = 1;
|
||||
const int32_t TWO = 2;
|
||||
|
||||
@@ -25,8 +25,7 @@ namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
using namespace testing::ext;
|
||||
using namespace OHOS::AppExecFwk;
|
||||
namespace
|
||||
{
|
||||
namespace {
|
||||
const int32_t THOUSAND = 1000;
|
||||
const int32_t NEGATIVE = -1;
|
||||
}
|
||||
|
||||
+2
-2
@@ -239,7 +239,7 @@ HWTEST_F(QuickFixManagerApplyTaskTest, NotifyApplyStatus_0100, TestSize.Level1)
|
||||
HWTEST_F(QuickFixManagerApplyTaskTest, RemoveTimeoutTask_0100, TestSize.Level1)
|
||||
{
|
||||
HILOG_INFO("%{public}s start.", __func__);
|
||||
auto applyTask = std::make_shared<QuickFixManagerApplyTask>(bundleQfMgr_, appMgr_,
|
||||
auto applyTask = std::make_shared<QuickFixManagerApplyTask>(bundleQfMgr_, appMgr_,
|
||||
nullptr, quickFixMs_);
|
||||
ASSERT_NE(applyTask, nullptr);
|
||||
applyTask->RemoveTimeoutTask();
|
||||
@@ -255,7 +255,7 @@ HWTEST_F(QuickFixManagerApplyTaskTest, RemoveTimeoutTask_0100, TestSize.Level1)
|
||||
HWTEST_F(QuickFixManagerApplyTaskTest, RemoveTimeoutTask_0200, TestSize.Level1)
|
||||
{
|
||||
HILOG_INFO("%{public}s start.", __func__);
|
||||
auto applyTask = std::make_shared<QuickFixManagerApplyTask>(bundleQfMgr_, appMgr_,
|
||||
auto applyTask = std::make_shared<QuickFixManagerApplyTask>(bundleQfMgr_, appMgr_,
|
||||
quickFixMs_->eventHandler_, quickFixMs_);
|
||||
ASSERT_NE(applyTask, nullptr);
|
||||
applyTask->RemoveTimeoutTask();
|
||||
|
||||
@@ -21,8 +21,7 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AAFwk {
|
||||
class ShellCommandConfigLoder final
|
||||
{
|
||||
class ShellCommandConfigLoder final {
|
||||
public:
|
||||
ShellCommandConfigLoder() = default;
|
||||
~ShellCommandConfigLoder() = default;
|
||||
|
||||
Reference in New Issue
Block a user