From 78de4cdb146cb9beb0f4387c96925e2699bfd151 Mon Sep 17 00:00:00 2001 From: lsq Date: Fri, 29 Apr 2022 09:12:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lsq Change-Id: I25ad44a86e6f7fc910c1b458014b40f84a96ef3d Signed-off-by: lsq --- .../innerkits/accesstoken/include/access_token.h | 1 + .../src/command/sync_remote_hap_token_command.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/interfaces/innerkits/accesstoken/include/access_token.h b/interfaces/innerkits/accesstoken/include/access_token.h index 263fe1660..b5f3e732b 100644 --- a/interfaces/innerkits/accesstoken/include/access_token.h +++ b/interfaces/innerkits/accesstoken/include/access_token.h @@ -46,6 +46,7 @@ typedef enum TypeATokenTypeEnum { } ATokenTypeEnum; typedef enum TypeATokenAplEnum { + APL_INVALID = 0, APL_NORMAL = 1, APL_SYSTEM_BASIC = 2, APL_SYSTEM_CORE = 3, diff --git a/services/tokensyncmanager/src/command/sync_remote_hap_token_command.cpp b/services/tokensyncmanager/src/command/sync_remote_hap_token_command.cpp index cb5d801a5..65d0ef836 100644 --- a/services/tokensyncmanager/src/command/sync_remote_hap_token_command.cpp +++ b/services/tokensyncmanager/src/command/sync_remote_hap_token_command.cpp @@ -51,6 +51,17 @@ SyncRemoteHapTokenCommand::SyncRemoteHapTokenCommand( SyncRemoteHapTokenCommand::SyncRemoteHapTokenCommand(const std::string &json) { requestTokenId_ = 0; + hapTokenInfo_.baseInfo.apl = APL_INVALID; + hapTokenInfo_.baseInfo.appID = ""; + hapTokenInfo_.baseInfo.bundleName = ""; + hapTokenInfo_.baseInfo.deviceID = ""; + hapTokenInfo_.baseInfo.instIndex = 0; + hapTokenInfo_.baseInfo.dlpType = 0; + hapTokenInfo_.baseInfo.tokenAttr = 0; + hapTokenInfo_.baseInfo.tokenID = 0; + hapTokenInfo_.baseInfo.userID = 0; + hapTokenInfo_.baseInfo.ver = DEFAULT_TOKEN_VERSION; + nlohmann::json jsonObject = nlohmann::json::parse(json, nullptr, false); BaseRemoteCommand::FromRemoteProtocolJson(jsonObject); if (jsonObject.find("requestTokenId") != jsonObject.end() && jsonObject.at("requestTokenId").is_number()) { -- Gitee