提交 aab3759e 编写于 作者: Z zhaogan

Issue: #I61EA7

Description: modify defaultApp's syscap
Sig: SIG_ApplicaitonFramework
Feature or Bugfix: Feature
Binary Source: No
Signed-off-by: Nzhaogan <zhaogan2@huawei.com>
上级 80856d69
......@@ -500,7 +500,7 @@ getApplicationInfo(bundleName: string, appFlags: [number](#applicationflag), cal
```ts
import bundleManager from '@ohos.bundle.bundleManager'
let bundleName = 'com.example.myapplication';
let appsFlag = bundleManager.ApplicationFlag.GET_APPLICATION_INFO_WITH_PERMISSION;
let appFlags = bundleManager.ApplicationFlag.GET_APPLICATION_INFO_WITH_PERMISSION;
try {
bundleManager.getApplicationInfo(bundleName, appFlags, (err, data) => {
......@@ -2210,7 +2210,7 @@ try {
}
try {
bundleManager.getProfileByAbility(moduleName, abilityNamemetadataName).then((data) => {
bundleManager.getProfileByAbility(moduleName, abilityName, metadataName).then((data) => {
console.info('getProfileByAbility successfully. Data: ' + JSON.stringify(data));
}).catch(error => {
console.error('getProfileByAbility failed. Cause: ' + error.message);
......@@ -2840,7 +2840,7 @@ import bundleManager from '@ohos.bundle.bundleManager'
let bundleName = 'com.example.myapplication';
let bundleFlags = bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_REQUESTED_PERMISSION;
try {
let data = bundleManager.getBundleInfoSync(bundleName, bundleFlags, userId);
let data = bundleManager.getBundleInfoSync(bundleName, bundleFlags);
console.info("getBundleInfoSync successfully :" + JSON.stringify(data));
} catch (err) {
console.error('getBundleInfoSync failed:' + err.message);
......
......@@ -15,7 +15,7 @@ import defaultAppMgr from '@ohos.bundle.defaultAppManager';
应用类型
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultAppManager
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultApp
| 名称 | 类型 | 值 | 说明 |
| -------- | -------- | -------------------------------------- | -------------------------------------- |
......@@ -34,7 +34,7 @@ isDefaultApplication(type: string): Promise\<boolean>
以异步方法根据系统已定义的应用类型判断当前应用是否是该应用类型的默认应用,使用Promise形式返回结果。
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultAppManager
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultApp
**参数:**
......@@ -66,7 +66,7 @@ isDefaultApplication(type: string, callback: AsyncCallback\<boolean>): void
以异步方法根据系统已定义的应用类型判断当前应用是否是该应用类型的默认应用,使用callback形式返回结果。
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultAppManager
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultApp
**参数:**
......@@ -96,7 +96,7 @@ getDefaultApplication(type: string, userId?: number): Promise\<BundleInfo>
**需要权限:** ohos.permission.GET_DEFAULT_APPLICATION
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultAppManager
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultApp
**系统API:** 此接口为系统接口,三方应用不支持调用
......@@ -150,7 +150,7 @@ getDefaultApplication(type: string, userId: number, callback: AsyncCallback\<Bun
**需要权限:** ohos.permission.GET_DEFAULT_APPLICATION
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultAppManager
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultApp
**系统API:** 此接口为系统接口,三方应用不支持调用
......@@ -200,7 +200,7 @@ getDefaultApplication(type: string, callback: AsyncCallback\<BundleInfo>) : void
**需要权限:** ohos.permission.GET_DEFAULT_APPLICATION
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultAppManager
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultApp
**系统API:** 此接口为系统接口,三方应用不支持调用
......@@ -253,7 +253,7 @@ setDefaultApplication(type: string, elementName: ElementName, userId?: number):
**需要权限:** ohos.permission.SET_DEFAULT_APPLICATION
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultAppManager
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultApp
**系统API:** 此接口为系统接口,三方应用不支持调用
......@@ -323,7 +323,7 @@ setDefaultApplication(type: string, elementName: ElementName, userId: number, ca
**需要权限:** ohos.permission.SET_DEFAULT_APPLICATION
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultAppManager
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultApp
**系统API:** 此接口为系统接口,三方应用不支持调用
......@@ -382,7 +382,7 @@ setDefaultApplication(type: string, elementName: ElementName, callback: AsyncCal
**需要权限:** ohos.permission.SET_DEFAULT_APPLICATION
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultAppManager
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultApp
**系统API:** 此接口为系统接口,三方应用不支持调用
......@@ -439,7 +439,7 @@ resetDefaultApplication(type: string, userId?: number): Promise\<void>
**需要权限:** ohos.permission.SET_DEFAULT_APPLICATION
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultAppManager
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultApp
**系统API:** 此接口为系统接口,三方应用不支持调用
......@@ -487,7 +487,7 @@ resetDefaultApplication(type: string, userId: number, callback: AsyncCallback\<v
**需要权限:** ohos.permission.SET_DEFAULT_APPLICATION
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultAppManager
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultApp
**系统API:** 此接口为系统接口,三方应用不支持调用
......@@ -536,7 +536,7 @@ resetDefaultApplication(type: string, callback: AsyncCallback\<void>) : void;
**需要权限:** ohos.permission.SET_DEFAULT_APPLICATION
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultAppManager
**系统能力:** SystemCapability.BundleManager.BundleFramework.DefaultApp
**系统API:** 此接口为系统接口,三方应用不支持调用
......
......@@ -298,9 +298,9 @@ getBundlePackInfo(bundleName: string, bundlePackFlag : BundlePackFlag, callback:
```js
import freeInstall from '@ohos.bundle.freeInstall';
let bundleName = 'com.example.myapplication';
let upgradeFlag = freeInstall.UpgradeFlag.GET_PACK_INFO_ALL;
let bundlePackFlag = freeInstall.BundlePackFlag.GET_PACK_INFO_ALL;
try {
freeInstall.getBundlePackInfo(bundleName, upgradeFlag, (err, data) => {
freeInstall.getBundlePackInfo(bundleName, bundlePackFlag, (err, data) => {
if (err) {
console.error('Operation failed:' + JSON.stringify(err));
} else {
......@@ -352,9 +352,9 @@ getBundlePackInfo(bundleName: string, bundlePackFlag : BundlePackFlag): Promise\
```js
import freeInstall from '@ohos.bundle.freeInstall';
let bundleName = 'com.example.myapplication';
let upgradeFlag = freeInstall.UpgradeFlag.GET_PACK_INFO_ALL;
let bundlePackFlag = freeInstall.BundlePackFlag.GET_PACK_INFO_ALL;
try {
freeInstall.getBundlePackInfo(bundleName, upgradeFlag).then(data => {
freeInstall.getBundlePackInfo(bundleName, bundlePackFlag).then(data => {
console.info('Operation succeed:' + JSON.stringify(data));
}).catch(err => {
console.error('Operation failed:' + JSON.stringify(err));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册