From 3a5c790a5606e418892e8ee81249cc15710e4ecd Mon Sep 17 00:00:00 2001 From: Saninn <5490201+distante@users.noreply.github.com> Date: Fri, 30 Aug 2019 15:53:47 +0200 Subject: [PATCH] bugfix: add response type to permission checking (#3149) --- .../plugins/android-permissions/index.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/@ionic-native/plugins/android-permissions/index.ts b/src/@ionic-native/plugins/android-permissions/index.ts index c6ef5cb72..ab6f4036b 100644 --- a/src/@ionic-native/plugins/android-permissions/index.ts +++ b/src/@ionic-native/plugins/android-permissions/index.ts @@ -204,20 +204,20 @@ export class AndroidPermissions extends IonicNativePlugin { /** * Check permission * @param {string} permission The name of the permission - * @return {Promise} Returns a promise + * @return {Promise} Returns a promise */ @Cordova() - checkPermission(permission: string): Promise { + checkPermission(permission: string): Promise { return; } /** * Request permission * @param {string} permission The name of the permission to request - * @return {Promise} + * @return {Promise} */ @Cordova() - requestPermission(permission: string): Promise { + requestPermission(permission: string): Promise { return; } @@ -234,10 +234,14 @@ export class AndroidPermissions extends IonicNativePlugin { /** * This function still works now, will not support in the future. * @param {string} permission The name of the permission - * @return {Promise} Returns a promise + * @return {Promise} Returns a promise */ @Cordova() - hasPermission(permission: string): Promise { + hasPermission(permission: string): Promise { return; } } + +export interface AndroidPermissionResponse { + hasPermission: boolean; +}