• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include "load_mode_handler_default.h"
17 
18 #include "iam_logger.h"
19 #include "system_param_manager.h"
20 
21 #define LOG_TAG "PIN_AUTH_SA"
22 
23 namespace OHOS {
24 namespace UserIam {
25 namespace PinAuth {
LoadModeHandlerDefault()26 LoadModeHandlerDefault::LoadModeHandlerDefault()
27 {
28     IAM_LOGI("sa load mode is default");
29 }
30 
StartSubscribe()31 void LoadModeHandlerDefault::StartSubscribe()
32 {
33     std::lock_guard<std::recursive_mutex> lock(mutex_);
34     if (isSubscribed_) {
35         return;
36     }
37 
38     isSubscribed_ = true;
39 }
40 
OnFrameworkDown()41 void LoadModeHandlerDefault::OnFrameworkDown()
42 {
43     IAM_LOGI("fwk down");
44     SystemParamManager::GetInstance().SetParam(FWK_READY_KEY, FALSE_STR);
45 }
46 } // namespace PinAuth
47 } // namespace UserIam
48 } // namespace OHOS