diff --git a/api/@ohos.privacyManager.d.ts b/api/@ohos.privacyManager.d.ts index 43e9ff36d0b2620a38feea9387e5ca8da5ff75dd..4afcd90de0e99a528371e09cd91e9c3849622289 100644 --- a/api/@ohos.privacyManager.d.ts +++ b/api/@ohos.privacyManager.d.ts @@ -45,7 +45,7 @@ declare namespace privacyManager { * @throws { BusinessError } 202 - Not system app. Interface caller is not a system app. * @throws { BusinessError } 12100001 - Invalid parameter. The tokenID is 0, the permissionName exceeds 256 characters, or the count value is invalid. * @throws { BusinessError } 12100002 - The specified tokenID does not exist or refer to an application process. - * @throws { BusinessError } 12100003 - The specified permission does not exist or is not an user_grant permission. + * @throws { BusinessError } 12100003 - The specified permission does not exist or is not a user_grant permission. * @throws { BusinessError } 12100007 - The service is abnormal. * @throws { BusinessError } 12100008 - Out of memory. * @syscap SystemCapability.Security.AccessToken @@ -68,7 +68,7 @@ declare namespace privacyManager { * @throws { BusinessError } 12100001 - Invalid parameter. The tokenID is 0, the permissionName exceeds 256 characters, the count value is invalid, * or usedType in AddPermissionUsedRecordOptions is invalid. * @throws { BusinessError } 12100002 - The specified tokenID does not exist or refer to an application process. - * @throws { BusinessError } 12100003 - The specified permission does not exist or is not an user_grant permission. + * @throws { BusinessError } 12100003 - The specified permission does not exist or is not a user_grant permission. * @throws { BusinessError } 12100007 - The service is abnormal. * @throws { BusinessError } 12100008 - Out of memory. * @syscap SystemCapability.Security.AccessToken @@ -98,7 +98,7 @@ declare namespace privacyManager { * @throws { BusinessError } 202 - Not system app. Interface caller is not a system app. * @throws { BusinessError } 12100001 - Invalid parameter. The tokenID is 0, the permissionName exceeds 256 characters, or the count value is invalid. * @throws { BusinessError } 12100002 - The specified tokenID does not exist or refer to an application process. - * @throws { BusinessError } 12100003 - The specified permission does not exist or is not an user_grant permission. + * @throws { BusinessError } 12100003 - The specified permission does not exist or is not a user_grant permission. * @throws { BusinessError } 12100007 - The service is abnormal. * @throws { BusinessError } 12100008 - Out of memory. * @syscap SystemCapability.Security.AccessToken diff --git a/api/security/PermissionRequestResult.d.ts b/api/security/PermissionRequestResult.d.ts index 05d2bceacce9fb81d6e26e277b43874281135b68..f941c2469aa63e8685e51b5f716ad40bf96e8c4e 100644 --- a/api/security/PermissionRequestResult.d.ts +++ b/api/security/PermissionRequestResult.d.ts @@ -46,7 +46,7 @@ import { int } from '@ohos.base'; * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ -export default class PermissionRequestResult { +declare class PermissionRequestResult { /** * The permissions passed in by the user. * @@ -72,28 +72,16 @@ export default class PermissionRequestResult { * @stagemodelonly * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ permissions: Array; - /** - * The permissions passed in by the user. - * - * @type { Array } - * @syscap SystemCapability.Security.AccessToken - * @stagemodelonly - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - permissions: Array = new Array(); - /** * The results for the corresponding request permissions. The value 0 indicates that a * permission is granted, the value -1 indicates not, and the value 2 indicates the request is invalid. * - * @type { Array } + * @type { Array } * @syscap SystemCapability.Security.AccessToken * @stagemodelonly * @since 9 @@ -102,25 +90,12 @@ export default class PermissionRequestResult { * The results for the corresponding request permissions. The value 0 indicates that a * permission is granted, the value -1 indicates not, and the value 2 indicates the request is invalid. * - * @type { Array } + * @type { Array } * @syscap SystemCapability.Security.AccessToken * @stagemodelonly * @crossplatform * @since 10 */ - /** - * The results for the corresponding request permissions. The value 0 indicates that a - * permission is granted, the value -1 indicates not, and the value 2 indicates the request is invalid. - * - * @type { Array } - * @syscap SystemCapability.Security.AccessToken - * @stagemodelonly - * @crossplatform - * @atomicservice - * @since 11 - */ - authResults: Array; - /** * The results for the corresponding request permissions. The value 0 indicates that a * permission is granted, the value -1 indicates not, and the value 2 indicates the request is invalid. @@ -130,10 +105,10 @@ export default class PermissionRequestResult { * @stagemodelonly * @crossplatform * @atomicservice - * @since 20 - * @arkts 1.2 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - authResults: Array = new Array(); + authResults: Array; /** * Specifies whether a dialog box is shown for each requested permission. @@ -168,3 +143,5 @@ export default class PermissionRequestResult { */ errorReasons?: Array; } + +export default PermissionRequestResult;