diff --git a/BUILD.gn b/BUILD.gn index 08440c7f..0010f77e 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -10,10 +10,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - -import("//build/lite/config/component/lite_component.gni") - if (defined(ohos_lite)) { + import("//build/lite/config/component/lite_component.gni") if (ohos_kernel_type == "liteos_m") { lite_component("devicemanager_mini") { features = [ @@ -23,9 +21,12 @@ if (defined(ohos_lite)) { "interfaces/kits/js_mini:devicemanager_native_js", ] } + group("device_manager_test") { + testonly = true + deps = [] + } } else { - import("//build/lite/config/component/lite_component.gni") - lite_component("devicemanager_lite") { + lite_component("device_manager_base") { features = [ "utils:devicemanagerutils", "services/devicemanagerservice:devicemanagerservice", @@ -33,5 +34,24 @@ if (defined(ohos_lite)) { "ext/pin_auth:devicemanagerext_pin_auth", ] } + group("device_manager_test") { + testonly = true + deps = [] + } + } +} else { + group("device_manager_base") { + deps = [ + "ext:ext_modules", + "interfaces/inner_kits/native_cpp:devicemanagersdk", + "interfaces/kits:devicemanager_native_js", + "sa_profile:dm_sa_profile", + "services/devicemanagerservice:devicemanagerservice", + "utils:devicemanagerutils", + ] + } + group("device_manager_test") { + testonly = true + deps = [ "test:test" ] } } diff --git a/bundle.json b/bundle.json index 2cfcfd48..416f08fd 100644 --- a/bundle.json +++ b/bundle.json @@ -42,12 +42,7 @@ }, "build": { "sub_component": [ - "//foundation/distributedhardware/devicemanager/utils:devicemanagerutils", - "//foundation/distributedhardware/devicemanager/interfaces/inner_kits/native_cpp:devicemanagersdk", - "//foundation/distributedhardware/devicemanager/interfaces/kits:devicemanager_native_js", - "//foundation/distributedhardware/devicemanager/services/devicemanagerservice:devicemanagerservice", - "//foundation/distributedhardware/devicemanager/sa_profile:dm_sa_profile", - "//foundation/distributedhardware/devicemanager/ext:ext_modules" + "//foundation/distributedhardware/devicemanager:device_manager_base" ], "inner_kits": [ { @@ -64,7 +59,9 @@ } } ], - "test": [ "//foundation/distributedhardware/devicemanager/test:test" ] + "test": [ + "//foundation/distributedhardware/devicemanager:device_manager_test" + ] } } } diff --git a/interfaces/inner_kits/native_cpp/src/ipc/lite/ipc_cmd_parser.cpp b/interfaces/inner_kits/native_cpp/src/ipc/lite/ipc_cmd_parser.cpp index d5e47578..35643d54 100644 --- a/interfaces/inner_kits/native_cpp/src/ipc/lite/ipc_cmd_parser.cpp +++ b/interfaces/inner_kits/native_cpp/src/ipc/lite/ipc_cmd_parser.cpp @@ -299,7 +299,8 @@ ON_IPC_CMD(SERVER_AUTH_RESULT, IpcIo &reply) LOGE("OnAuthResult, get para failed"); return; } - DeviceManagerNotify::GetInstance().OnAuthResult(pkgName, deviceId, nullptr, status, reason); + std::string token = ""; + DeviceManagerNotify::GetInstance().OnAuthResult(pkgName, deviceId, token, status, reason); } ON_IPC_CMD(SERVER_VERIFY_AUTH_RESULT, IpcIo &reply)