mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-27 00:20:44 +00:00
commit
917bf8d784
@ -26,7 +26,15 @@
|
|||||||
namespace OHOS {
|
namespace OHOS {
|
||||||
namespace DistributedSchedule {
|
namespace DistributedSchedule {
|
||||||
class MultiUserManager {
|
class MultiUserManager {
|
||||||
DECLARE_SINGLE_INSTANCE(MultiUserManager);
|
public:
|
||||||
|
static MultiUserManager& GetInstance();
|
||||||
|
private:
|
||||||
|
MultiUserManager(const MultiUserManager&) = delete;
|
||||||
|
MultiUserManager& operator= (const MultiUserManager&) = delete;
|
||||||
|
MultiUserManager(MultiUserManager&&) = delete;
|
||||||
|
MultiUserManager& operator= (MultiUserManager&&) = delete;
|
||||||
|
MultiUserManager();
|
||||||
|
~MultiUserManager() = default;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void Init();
|
void Init();
|
||||||
|
@ -31,7 +31,19 @@ namespace {
|
|||||||
const std::string TAG = "MultiUserManager";
|
const std::string TAG = "MultiUserManager";
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPLEMENT_SINGLE_INSTANCE(MultiUserManager);
|
MultiUserManager& MultiUserManager::GetInstance()
|
||||||
|
{
|
||||||
|
static auto instance = new MultiUserManager();
|
||||||
|
return *instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
MultiUserManager::MultiUserManager()
|
||||||
|
{
|
||||||
|
HILOGI("Start.");
|
||||||
|
if (currentUserId_ <= 0) {
|
||||||
|
Init();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MultiUserManager::Init()
|
void MultiUserManager::Init()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user