Lines Matching defs:preferencesUtil
58 auto preferencesUtil = DelayedSingleton<PreferencesUtil>::GetInstance();
59 if (preferencesUtil == nullptr) {
60 SCLOCK_HILOGE("preferencesUtil is nullptr!");
65 int result = preferencesUtil->SaveString(std::to_string(userId), defaulVal);
66 std::string val = preferencesUtil->ObtainString(std::to_string(userId), defaulVal);
68 preferencesUtil->RemoveKey(std::to_string(userId));
69 preferencesUtil->Refresh();
83 auto preferencesUtil = DelayedSingleton<PreferencesUtil>::GetInstance();
84 if (preferencesUtil == nullptr) {
85 SCLOCK_HILOGE("preferencesUtil is nullptr!");
90 int result = preferencesUtil->SaveInt(std::to_string(userId), defaulVal);
91 int val = preferencesUtil->ObtainInt(std::to_string(userId), defaulVal);
93 preferencesUtil->RemoveKey(std::to_string(userId));
94 preferencesUtil->Refresh();
108 auto preferencesUtil = DelayedSingleton<PreferencesUtil>::GetInstance();
109 if (preferencesUtil == nullptr) {
110 SCLOCK_HILOGE("preferencesUtil is nullptr!");
115 int result = preferencesUtil->SaveBool(std::to_string(userId), defaulVal);
116 bool val = preferencesUtil->ObtainBool(std::to_string(userId), defaulVal);
118 preferencesUtil->RemoveKey(std::to_string(userId));
119 preferencesUtil->Refresh();
133 auto preferencesUtil = DelayedSingleton<PreferencesUtil>::GetInstance();
134 if (preferencesUtil == nullptr) {
135 SCLOCK_HILOGE("preferencesUtil is nullptr!");
140 preferencesUtil->SaveLong(std::to_string(userId), defaulVal);
141 int64_t val = preferencesUtil->ObtainLong(std::to_string(userId), defaulVal);
142 preferencesUtil->RemoveKey(std::to_string(userId));
143 preferencesUtil->Refresh();
157 auto preferencesUtil = DelayedSingleton<PreferencesUtil>::GetInstance();
158 if (preferencesUtil == nullptr) {
159 SCLOCK_HILOGE("preferencesUtil is nullptr!");
164 int result = preferencesUtil->SaveFloat(std::to_string(userId), defaulVal);
165 float val = preferencesUtil->ObtainFloat(std::to_string(userId), defaulVal);
167 preferencesUtil->RemoveKey(std::to_string(userId));
168 preferencesUtil->Refresh();
182 auto preferencesUtil = DelayedSingleton<PreferencesUtil>::GetInstance();
183 if (preferencesUtil == nullptr) {
184 SCLOCK_HILOGE("preferencesUtil is nullptr!");
187 preferencesUtil->RemoveAll();
188 preferencesUtil->RefreshSync();
189 EXPECT_NE(preferencesUtil, nullptr);