!110 添加进程调用接口时的判空检查

Merge pull request !110 from 曹刘超/master
This commit is contained in:
openharmony_ci
2022-01-22 09:03:05 +00:00
committed by Gitee
@@ -70,6 +70,11 @@ bool DeviceManagerImpl::isSystemAppCalling(void)
LOGI("get bundle manager proxy success.");
sptr<IBundleMgr> iBundleMgr = iface_cast<IBundleMgr>(remoteObject);
if (iBundleMgr == nullptr) {
LOGI("iBundleMgr is nullptr, caller may be a process");
return true;
}
return iBundleMgr->CheckIsSystemAppByUid(uid);
}