mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 12:43:16 -04:00
@@ -135,7 +135,6 @@ private:
|
||||
|
||||
static constexpr int RESUB_INTERVAL = 2;
|
||||
static std::mutex mutex_;
|
||||
static std::shared_ptr<DataObsMgrClient> instance_;
|
||||
sptr<IDataObsMgr> dataObsManger_;
|
||||
ConcurrentMap<sptr<IDataAbilityObserver>, std::list<Uri>> observers_;
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AAFwk {
|
||||
std::shared_ptr<DataObsMgrClient> DataObsMgrClient::instance_ = nullptr;
|
||||
std::mutex DataObsMgrClient::mutex_;
|
||||
|
||||
class DataObsMgrClient::SystemAbilityStatusChangeListener
|
||||
@@ -52,13 +51,8 @@ void DataObsMgrClient::SystemAbilityStatusChangeListener::OnAddSystemAbility(
|
||||
|
||||
std::shared_ptr<DataObsMgrClient> DataObsMgrClient::GetInstance()
|
||||
{
|
||||
if (instance_ == nullptr) {
|
||||
std::lock_guard<std::mutex> lock_l(mutex_);
|
||||
if (instance_ == nullptr) {
|
||||
instance_ = std::make_shared<DataObsMgrClient>();
|
||||
}
|
||||
}
|
||||
return instance_;
|
||||
static std::shared_ptr<DataObsMgrClient> proxy = std::make_shared<DataObsMgrClient>();
|
||||
return proxy;
|
||||
}
|
||||
|
||||
DataObsMgrClient::DataObsMgrClient()
|
||||
|
||||
Reference in New Issue
Block a user