From 5d16c7eba71cb193a4bea0c5c266566b399ffdb3 Mon Sep 17 00:00:00 2001 From: zhaolinglan Date: Mon, 8 May 2023 10:16:00 +0800 Subject: [PATCH] add api restriction for InputMethodExtensionAbility Signed-off-by: zhaolinglan --- .../inputmethodextentionability.md | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/zh-cn/application-dev/application-models/inputmethodextentionability.md b/zh-cn/application-dev/application-models/inputmethodextentionability.md index f1e9245683..1791a584e0 100644 --- a/zh-cn/application-dev/application-models/inputmethodextentionability.md +++ b/zh-cn/application-dev/application-models/inputmethodextentionability.md @@ -363,38 +363,38 @@ InputMethodExtensionAbility通过[InputMethodExtensionContext](../reference/apis ## 限制 -为了降低InputMethodExtensionAbility能力被三方应用滥用的风险,在InputMethodExtensionAbility中限制以下接口的调用: - -- [@ohos.ability.featureAbility.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.ability.featureAbility.d.ts) -- [@ohos.ability.particleAbility.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.ability.particleAbility.d.ts) -- [@ohos.account.distributedAccount.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.account.distributedAccount.d.ts) -- [@ohos.account.osAccount.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.account.osAccount.d.ts) -- [@ohos.backgroundTaskManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.backgroundTaskManager.d.ts) -- [@ohos.bluetooth.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.bluetooth.d.ts) -- [@ohos.bluetoothManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.bluetoothManager.d.ts) -- [@ohos.connectedTag.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.connectedTag.d.ts) -- [@ohos.geolocation.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.geolocation.d.ts) -- [@ohos.geoLocationManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.geoLocationManager.d.ts) -- [@ohos.nfc.cardEmulation.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.nfc.cardEmulation.d.ts) -- [@ohos.nfc.controller.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.nfc.controller.d.ts) -- [@ohos.nfc.tag.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.nfc.tag.d.ts) -- [@ohos.reminderAgent.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.reminderAgent.d.ts) -- [@ohos.reminderAgentManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.reminderAgentManager.d.ts) -- [@ohos.sensor.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.sensor.d.ts) -- [@ohos.telephony.call.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.telephony.call.d.ts) -- [@ohos.telephony.data.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.telephony.data.d.ts) -- [@ohos.telephony.observer.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.telephony.observer.d.ts) -- [@ohos.telephony.radio.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.telephony.radio.d.ts) -- [@ohos.telephony.sim.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.telephony.sim.d.ts) -- [@ohos.telephony.sms.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.telephony.sms.d.ts) -- [@ohos.wallpaper.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.wallpaper.d.ts) -- [@ohos.wifiext.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.wifiext.d.ts) -- [@ohos.wifiManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.wifiManager.d.ts) -- [@ohos.wifiManagerExt.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@ohos.wifiManagerExt.d.ts) -- [@system.geolocation.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@system.geolocation.d.ts) -- [@system.sensor.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/@system.sensor.d.ts) -- [nfctech.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/tag/nfctech.d.ts) -- [tagSession.d.ts](https://gitee.com/openharmony/interface_sdk-js/tree/master/api/tag/tagSession.d.ts) +为了降低InputMethodExtensionAbility能力被三方应用滥用的风险,在InputMethodExtensionAbility中限制调用以下模块中的接口。 + +**注意:** 若导入被限制的API,在编译时不报错,在运行时会返回错误的值,即undefined,导致不生效。 + +- [@ohos.ability.featureAbility (FeatureAbility模块)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-ability-featureAbility.md) +- [@ohos.ability.particleAbility (ParticleAbility模块)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-ability-particleAbility.md) +- [@ohos.account.distributedAccount (分布式帐号管理)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-distributed-account.md) +- [@ohos.backgroundTaskManager (后台任务管理)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-backgroundTaskManager.md) +- [@ohos.bluetooth (蓝牙)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-bluetooth.md) +- [@ohos.bluetoothManager (蓝牙)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-bluetoothManager.md) +- [@ohos.connectedTag (有源标签)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-connectedTag.md) +- [@ohos.geolocation (位置服务)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-geolocation.md) +- [@ohos.geoLocationManager (位置服务)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-geoLocationManager.md) +- [@ohos.nfc.cardEmulation (标准NFC-cardEmulation)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-cardEmulation.md) +- [@ohos.nfc.controller (标准NFC)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-nfcController.md) +- [@ohos.nfc.tag (标准NFC-Tag)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-nfcTag.md) +- [@ohos.reminderAgent (后台代理提醒)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-reminderAgent.md) +- [@ohos.reminderAgentManager (后台代理提醒)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-reminderAgentManager.md) +- [@ohos.sensor (传感器)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-sensor.md) +- [@ohos.telephony.call (拨打电话)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-call.md) +- [@ohos.telephony.data (蜂窝数据)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-telephony-data.md) +- [@ohos.telephony.observer (observer)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-observer.md) +- [@ohos.telephony.radio (网络搜索)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-radio.md) +- [@ohos.telephony.sim (SIM卡管理)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-sim.md) +- [@ohos.telephony.sms (短信服务)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-sms.md) +- [@ohos.wallpaper (壁纸)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-wallpaper.md) +- [@ohos.wifiext (WLAN扩展接口)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-wifiext.md) +- [@ohos.wifiManager (WLAN)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-wifiManager.md) +- [@ohos.wifiManagerExt (WLAN扩展接口)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-wifiManagerExt.md) +- [@system.geolocation (地理位置)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-system-location.md) +- [nfctech (标准NFC-Tag Nfc 技术)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-nfctech.md) +- [tagSession (标准NFC-Tag TagSession)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-tagSession.md) -- GitLab