未验证 提交 af309141 编写于 作者: O openharmony_ci 提交者: Gitee

!21515 【资料问题】元能力资料废弃模块引入问题修改

Merge pull request !21515 from yuyaozhi/master
......@@ -494,7 +494,7 @@ setDisplayOrientation(orientation: bundle.DisplayOrientation, callback: AsyncCal
```ts
import featureAbility from '@ohos.ability.featureAbility';
import bundle from '@ohos.bundle';
import bundle from '@ohos.bundle.bundleManager';
let context: featureAbility.Context = featureAbility.getContext();
let orientation = bundle.DisplayOrientation.UNSPECIFIED;
context.setDisplayOrientation(orientation, (error) => {
......@@ -521,7 +521,7 @@ setDisplayOrientation(orientation: bundle.DisplayOrientation): Promise\<void>;
```ts
import featureAbility from '@ohos.ability.featureAbility';
import bundle from '@ohos.bundle';
import bundle from '@ohos.bundle.bundleManager';
let context: featureAbility.Context = featureAbility.getContext();
let orientation = bundle.DisplayOrientation.UNSPECIFIED;
context.setDisplayOrientation(orientation).then((data) => {
......@@ -708,7 +708,7 @@ context.getProcessInfo().then((data) => {
getElementName(callback: AsyncCallback\<ElementName>): void
获取当前ability的ohos.bundle.ElementName对象(callback形式)。
获取当前ability的ohos.bundleManager.ElementName对象(callback形式)。
此方法仅适用于页面功能。
......@@ -718,7 +718,7 @@ getElementName(callback: AsyncCallback\<ElementName>): void
| 参数名 | 类型 | 必填 | 说明 |
| -------- | --------------------------- | ---- | -------------------------------------- |
| callback | AsyncCallback\<[ElementName](js-apis-bundleManager-elementName.md)> | 是 | 返回当前ability的ohos.bundle.ElementName对象。 |
| callback | AsyncCallback\<[ElementName](js-apis-bundleManager-elementName.md)> | 是 | 返回当前ability的ohos.bundleManager.ElementName对象。 |
**示例:**
......@@ -740,7 +740,7 @@ context.getElementName((error, data) => {
getElementName(): Promise\<ElementName>
获取当前能力的ohos.bundle.ElementName对象(Promise形式)。
获取当前能力的ohos.bundleManager.ElementName对象(Promise形式)。
此方法仅适用于页面功能。
......@@ -750,7 +750,7 @@ getElementName(): Promise\<ElementName>
| 类型 | 说明 |
| --------------------- | ------------------------------------ |
| Promise\<[ElementName](js-apis-bundleManager-elementName.md)> | 当前ability的ohos.bundle.ElementName对象。 |
| Promise\<[ElementName](js-apis-bundleManager-elementName.md)> | 当前ability的ohos.bundleManager.ElementName对象。 |
**示例:**
......
......@@ -53,12 +53,12 @@ grantUriPermission(uri: string, flag: wantConstant.Flags, targetBundleName: stri
```js
import uriPermissionManager from '@ohos.application.uriPermissionManager';
import WantConstant from '@ohos.ability.wantConstant';
import fileio from '@ohos.fileio';
import fs from '@ohos.file.fs';
import fileUri from '@ohos.file.fileuri';
let targetBundleName = 'com.example.test_case1'
let path = "file://com.example.test_case1/data/storage/el2/base/haps/entry_test/files/newDir";
fileio.mkdir(path, function (err) {
fs.mkdir(path, function (err) {
if (err) {
console.log("mkdir error"+err.message)
} else {
......@@ -115,13 +115,13 @@ grantUriPermission(uri: string, flag: wantConstant.Flags, targetBundleName: stri
```js
import uriPermissionManager from '@ohos.application.uriPermissionManager';
import WantConstant from '@ohos.ability.wantConstant';
import fileio from '@ohos.fileio';
import fs from '@ohos.file.fs';
import fileUri from '@ohos.file.fileuri';
let targetBundleName = 'com.example.test_case1'
let path = "file://com.example.test_case1/data/storage/el2/base/haps/entry_test/files/newDir";
fileio.mkdir(path, function (err) {
fs.mkdir(path, function (err) {
if (err) {
console.log("mkdir error"+err.message)
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册