mirror of
https://gitee.com/openharmony/window_window_manager
synced 2025-02-21 16:31:44 +00:00
!2500 第三方应用创建输入法窗口权限校验
Merge pull request !2500 from ZhengJiangliang/master
This commit is contained in:
commit
59784c8fcf
@ -108,8 +108,10 @@ bool Permission::IsStartByInputMethod()
|
||||
AppExecFwk::BundleInfo bundleInfo;
|
||||
// reset ipc identity
|
||||
std::string identity = IPCSkeleton::ResetCallingIdentity();
|
||||
// 200000 use uid to caculate userId
|
||||
int userId = uid / 200000;
|
||||
bool result = bundleManagerServiceProxy_->GetBundleInfo(bundleName,
|
||||
AppExecFwk::BundleFlag::GET_BUNDLE_WITH_EXTENSION_INFO, bundleInfo);
|
||||
AppExecFwk::BundleFlag::GET_BUNDLE_WITH_EXTENSION_INFO, bundleInfo, userId);
|
||||
// set ipc identity to raw
|
||||
IPCSkeleton::SetCallingIdentity(identity);
|
||||
if (!result) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user