mirror of
https://gitee.com/openharmony/bundlemanager_bundle_framework
synced 2024-11-23 23:30:28 +00:00
commit
35d42b9f52
@ -1481,7 +1481,7 @@ static bool ParseWant(napi_env env, Want &want, napi_value args)
|
|||||||
if (elementUri.empty()) {
|
if (elementUri.empty()) {
|
||||||
elementUri = wantUri;
|
elementUri = wantUri;
|
||||||
}
|
}
|
||||||
APP_LOGD("deviceId:%{public}s, bundleName:%{public}s, abilityName:%{public}s",
|
APP_LOGD("deviceId:%{private}s, bundleName:%{public}s, abilityName:%{public}s",
|
||||||
elementDeviceId.c_str(), elementBundleName.c_str(), elementAbilityName.c_str());
|
elementDeviceId.c_str(), elementBundleName.c_str(), elementAbilityName.c_str());
|
||||||
APP_LOGD("action:%{public}s, uri:%{private}s, type:%{public}s, flags:%{public}d",
|
APP_LOGD("action:%{public}s, uri:%{private}s, type:%{public}s, flags:%{public}d",
|
||||||
wantAction.c_str(), elementUri.c_str(), wantType.c_str(), wantFlags);
|
wantAction.c_str(), elementUri.c_str(), wantType.c_str(), wantFlags);
|
||||||
|
@ -85,7 +85,7 @@ struct AsyncApplicationInfoCallbackInfo : public AsyncWorkData {
|
|||||||
explicit AsyncApplicationInfoCallbackInfo(napi_env env) : AsyncWorkData(env) {}
|
explicit AsyncApplicationInfoCallbackInfo(napi_env env) : AsyncWorkData(env) {}
|
||||||
std::string bundleName;
|
std::string bundleName;
|
||||||
int32_t flags = 0;
|
int32_t flags = 0;
|
||||||
int32_t userId;
|
int32_t userId = Constants::UNSPECIFIED_USERID;
|
||||||
OHOS::AppExecFwk::ApplicationInfo appInfo;
|
OHOS::AppExecFwk::ApplicationInfo appInfo;
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
int32_t err = 0;
|
int32_t err = 0;
|
||||||
@ -114,7 +114,7 @@ struct AsyncBundleInfosCallbackInfo : public AsyncWorkData {
|
|||||||
struct AsyncApplicationInfosCallbackInfo : public AsyncWorkData {
|
struct AsyncApplicationInfosCallbackInfo : public AsyncWorkData {
|
||||||
explicit AsyncApplicationInfosCallbackInfo(napi_env env) : AsyncWorkData(env) {}
|
explicit AsyncApplicationInfosCallbackInfo(napi_env env) : AsyncWorkData(env) {}
|
||||||
int32_t flags = 0;
|
int32_t flags = 0;
|
||||||
int32_t userId = 0;
|
int32_t userId = Constants::UNSPECIFIED_USERID;
|
||||||
std::vector<OHOS::AppExecFwk::ApplicationInfo> appInfos;
|
std::vector<OHOS::AppExecFwk::ApplicationInfo> appInfos;
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
int32_t err = 0;
|
int32_t err = 0;
|
||||||
@ -132,7 +132,7 @@ struct AsyncAbilityLabelCallbackInfo : public AsyncWorkData {
|
|||||||
|
|
||||||
struct InstallResult {
|
struct InstallResult {
|
||||||
std::string resultMsg;
|
std::string resultMsg;
|
||||||
int32_t resultCode;
|
int32_t resultCode = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AsyncInstallCallbackInfo : public AsyncWorkData {
|
struct AsyncInstallCallbackInfo : public AsyncWorkData {
|
||||||
@ -201,7 +201,7 @@ struct AsyncExtensionInfoCallbackInfo : public AsyncWorkData {
|
|||||||
|
|
||||||
struct AsyncGetNameByUidInfo : public AsyncWorkData {
|
struct AsyncGetNameByUidInfo : public AsyncWorkData {
|
||||||
explicit AsyncGetNameByUidInfo(napi_env env) : AsyncWorkData(env) {}
|
explicit AsyncGetNameByUidInfo(napi_env env) : AsyncWorkData(env) {}
|
||||||
int32_t uid;
|
int32_t uid = 0;
|
||||||
std::string bundleName;
|
std::string bundleName;
|
||||||
int32_t err = 0;
|
int32_t err = 0;
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
@ -227,8 +227,8 @@ struct AsyncHandleBundleContext : public AsyncWorkData {
|
|||||||
OHOS::sptr<CleanCacheCallback> cleanCacheCallback;
|
OHOS::sptr<CleanCacheCallback> cleanCacheCallback;
|
||||||
std::string bundleName;
|
std::string bundleName;
|
||||||
std::string className;
|
std::string className;
|
||||||
int32_t labelId;
|
int32_t labelId = 0;
|
||||||
int32_t iconId;
|
int32_t iconId = 0;
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
int32_t err = 0;
|
int32_t err = 0;
|
||||||
};
|
};
|
||||||
|
@ -278,7 +278,7 @@ bool BundlePermissionMgr::AddDefineAndRequestPermissions(const Security::AccessT
|
|||||||
|
|
||||||
int32_t BundlePermissionMgr::DeleteAccessTokenId(const AccessToken::AccessTokenID tokenId)
|
int32_t BundlePermissionMgr::DeleteAccessTokenId(const AccessToken::AccessTokenID tokenId)
|
||||||
{
|
{
|
||||||
APP_LOGD("BundlePermissionMgr::DeleteAccessTokenId tokenId : %{public}u", tokenId);
|
APP_LOGD("BundlePermissionMgr::DeleteAccessTokenId tokenId : %{private}u", tokenId);
|
||||||
return AccessToken::AccessTokenKit::DeleteToken(tokenId);
|
return AccessToken::AccessTokenKit::DeleteToken(tokenId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -432,7 +432,7 @@ bool BundlePermissionMgr::GetRequestPermissionStates(BundleInfo &bundleInfo)
|
|||||||
return perm.permissionName == req;
|
return perm.permissionName == req;
|
||||||
});
|
});
|
||||||
if (iter != allPermissionState.end()) {
|
if (iter != allPermissionState.end()) {
|
||||||
APP_LOGD("GetRequestPermissionStates request permission name : %{public}s, deviceId : %{public}s",
|
APP_LOGD("GetRequestPermissionStates request permission name: %{public}s, deviceId: %{private}s",
|
||||||
req.c_str(), deviceId.c_str());
|
req.c_str(), deviceId.c_str());
|
||||||
for (std::vector<std::string>::size_type i = 0; i < iter->resDeviceID.size(); i++) {
|
for (std::vector<std::string>::size_type i = 0; i < iter->resDeviceID.size(); i++) {
|
||||||
if (iter->resDeviceID[i] == deviceId) {
|
if (iter->resDeviceID[i] == deviceId) {
|
||||||
@ -494,7 +494,7 @@ bool BundlePermissionMgr::VerifyCallingPermission(const std::string &permissionN
|
|||||||
{
|
{
|
||||||
APP_LOGD("VerifyCallingPermission permission %{public}s", permissionName.c_str());
|
APP_LOGD("VerifyCallingPermission permission %{public}s", permissionName.c_str());
|
||||||
AccessToken::AccessTokenID callerToken = IPCSkeleton::GetCallingTokenID();
|
AccessToken::AccessTokenID callerToken = IPCSkeleton::GetCallingTokenID();
|
||||||
APP_LOGD("callerToken : %{public}u", callerToken);
|
APP_LOGD("callerToken : %{private}u", callerToken);
|
||||||
AccessToken::ATokenTypeEnum tokenType = AccessToken::AccessTokenKit::GetTokenTypeFlag(callerToken);
|
AccessToken::ATokenTypeEnum tokenType = AccessToken::AccessTokenKit::GetTokenTypeFlag(callerToken);
|
||||||
if (tokenType == AccessToken::ATokenTypeEnum::TOKEN_NATIVE) {
|
if (tokenType == AccessToken::ATokenTypeEnum::TOKEN_NATIVE) {
|
||||||
APP_LOGD("caller tokenType is native, verify success");
|
APP_LOGD("caller tokenType is native, verify success");
|
||||||
|
@ -110,7 +110,7 @@ static OHOS::sptr<OHOS::AppExecFwk::IDistributedBms> GetDistributedBundleMgr(con
|
|||||||
APP_LOGI("GetDistributedBundleMgr");
|
APP_LOGI("GetDistributedBundleMgr");
|
||||||
auto samgr = OHOS::SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager();
|
auto samgr = OHOS::SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager();
|
||||||
OHOS::sptr<OHOS::IRemoteObject> remoteObject;
|
OHOS::sptr<OHOS::IRemoteObject> remoteObject;
|
||||||
APP_LOGD("GetDistributedBundleMgr deviceId:%{public}s", deviceId.c_str());
|
APP_LOGD("GetDistributedBundleMgr deviceId:%{private}s", deviceId.c_str());
|
||||||
if (deviceId.empty()) {
|
if (deviceId.empty()) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user