diff --git a/bundle.json b/bundle.json new file mode 100644 index 00000000..a204d9be --- /dev/null +++ b/bundle.json @@ -0,0 +1,74 @@ +{ + "name": "@ohos/device_manager_base", + "description": "device manager service", + "version": "3.1", + "license": "Apache License 2.0", + "repository": "https://gitee.com/openharmony/device_manager", + "publishAs": "code-segment", + "segment": { + "destPath": "foundation/distributedhardware/devicemanager" + }, + "dirs": {}, + "scripts": {}, + "component": { + "name": "device_manager_base", + "subsystem": "distributedhardware", + "syscap":[ "systemcapbility.distributedhardware.devicemanager" ], + "features":[], + "adapted_system_type": [ "standard", "small" ], + "rom": "2M", + "ram": "16M", + "deps": { + "components": [ + "aafwk_standard", + "appexecfwk_standard", + "hiviewdfx_hilog_native", + "ipc", + "safwk", + "startup_l2", + "device_profile_core", + "samgr_standard", + "ces_standard", + "dsoftbus_standard", + "utils_base", + "napi", + "deviceauth_standard" + ], + "third_party": [ + "json", + "node", + "googletest", + "mbedtls" + ] + }, + "build": { + "sub_component": [ + "//foundation/distributedhardware/devicemanager/utils:devicemanagerutils", + "//foundation/distributedhardware/devicemanager/interfaces/inner_kits/native_cpp:devicemanagersdk", + "//foundation/distributedhardware/devicemanager/interfaces/kits/js:devicemanager_native_js", + "//foundation/distributedhardware/devicemanager/services/devicemanagerservice:devicemanagerservice", + "//foundation/distributedhardware/devicemanager/sa_profile:dm_sa_profile", + "//foundation/distributedhardware/devicemanager/ext/pin_auth:devicemanagerext_pin_auth", + "//foundation/distributedhardware/devicemanager/ext/profile:devicemanagerext_profile" + ], + "inner_kits": [ + { + "type": "so", + "name": "//foundation/distributedhardware/devicemanager/interfaces/inner_kits/native_cpp:devicemanagersdk", + "header": { + "header_files": [ + "device_manager.h", + "device_manager_callback.h", + "dm_device_info.h", + "dm_subscribe_info.h" + ], + "header_base": "//foundation/distributedhardware/devicemanager/interfaces/inner_kits/native_cpp/include" + } + } + ], + "test": [ + "//foundation/distributedhardware/devicemanager/test:test" + ] + } + } +} \ No newline at end of file diff --git a/interfaces/inner_kits/native_cpp/src/device_manager_impl.cpp b/interfaces/inner_kits/native_cpp/src/device_manager_impl.cpp index 87a6c77e..900305b1 100644 --- a/interfaces/inner_kits/native_cpp/src/device_manager_impl.cpp +++ b/interfaces/inner_kits/native_cpp/src/device_manager_impl.cpp @@ -60,12 +60,12 @@ bool DeviceManagerImpl::isSystemAppCalling(void) SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); if (systemAbilityManager == nullptr) { LOGE("failed to get system ability mgr."); - return false; + return true; } sptr remoteObject = systemAbilityManager->GetSystemAbility(BUNDLE_MGR_SERVICE_SYS_ABILITY_ID); if (remoteObject == nullptr) { LOGE("failed to get bundle manager proxy."); - return false; + return true; } LOGI("get bundle manager proxy success."); diff --git a/ohos.build b/ohos.build deleted file mode 100644 index 59995c05..00000000 --- a/ohos.build +++ /dev/null @@ -1,36 +0,0 @@ -{ - "parts": { - "device_manager_base": { - "variants": ["phone", "wearable", "ivi"], - "inner_kits": [ - { - "type": "so", - "name": "//foundation/distributedhardware/devicemanager/interfaces/inner_kits/native_cpp:devicemanagersdk", - "header": { - "header_base": "//foundation/distributedhardware/devicemanager/interfaces/inner_kits/native_cpp/include", - "header_files": [ - "device_manager.h", - "device_manager_callback.h", - "dm_device_info.h", - "dm_subscribe_info.h" - ] - } - } - ], - "module_list": [ - "//foundation/distributedhardware/devicemanager/utils:devicemanagerutils", - "//foundation/distributedhardware/devicemanager/interfaces/inner_kits/native_cpp:devicemanagersdk", - "//foundation/distributedhardware/devicemanager/interfaces/kits/js:devicemanager_native_js", - "//foundation/distributedhardware/devicemanager/services/devicemanagerservice:devicemanagerservice", - "//foundation/distributedhardware/devicemanager/sa_profile:dm_sa_profile", - "//foundation/distributedhardware/devicemanager/ext/pin_auth:devicemanagerext_pin_auth", - "//foundation/distributedhardware/devicemanager/ext/profile:devicemanagerext_profile" - ], - "test_list": [ - "//foundation/distributedhardware/devicemanager/test:test" - ], - "system_kits": [] - } - }, - "subsystem": "distributedhardware" -}