From 17214ffba717bb7f2db44a27dac2ef6ad789766f Mon Sep 17 00:00:00 2001 From: Guille Date: Fri, 8 Jul 2016 00:54:06 +0200 Subject: [PATCH] refactor(diagnostic): --- src/plugins/diagnostic.ts | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/plugins/diagnostic.ts b/src/plugins/diagnostic.ts index d1c31cd6..4037fa98 100644 --- a/src/plugins/diagnostic.ts +++ b/src/plugins/diagnostic.ts @@ -1,4 +1,5 @@ -import {Plugin, Cordova} from './plugin'; +import { Cordova, Plugin } from './plugin'; + @Plugin({ plugin: 'cordova.plugins.diagnostic', @@ -10,28 +11,28 @@ export class Diagnostic { * Checks if app is able to access device location. */ @Cordova() - static isLocationEnabled(): Promise {return; } + static isLocationEnabled(): Promise { return; } /** * Checks if Wifi is connected/enabled. On iOS this returns true if the device is connected to a network by WiFi. On Android and Windows 10 Mobile this returns true if the WiFi setting is set to enabled. * On Android this requires permission. `` */ @Cordova() - static isWifiEnabled(): Promise {return; } + static isWifiEnabled(): Promise { return; } /** * Checks if the device has a camera. On Android this returns true if the device has a camera. On iOS this returns true if both the device has a camera AND the application is authorized to use it. On Windows 10 Mobile this returns true if both the device has a rear-facing camera AND the * application is authorized to use it. */ @Cordova() - static isCameraEnabled(): Promise {return; } + static isCameraEnabled(): Promise { return; } /** * Checks if the device has Bluetooth capabilities and if so that Bluetooth is switched on (same on Android, iOS and Windows 10 Mobile) * On Android this requires permission */ @Cordova() - static isBluetoothEnabled(): Promise {return; } + static isBluetoothEnabled(): Promise { return; } /** * Returns the location authorization status for the application. @@ -40,27 +41,27 @@ export class Diagnostic { * mode - (iOS-only / optional) location authorization mode: "always" or "when_in_use". If not specified, defaults to "when_in_use". */ @Cordova() - static requestLocationAuthorization(mode?: string): Promise {return; } + static requestLocationAuthorization(mode?: string): Promise { return; } /** * Checks if the application is authorized to use location. * Note for Android: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time. */ @Cordova() - static isLocationAuthorized(): Promise {return; } + static isLocationAuthorized(): Promise { return; } /** * Checks if camera hardware is present on device. */ @Cordova() - static isCameraPresent(): Promise {return; } + static isCameraPresent(): Promise { return; } /** * Checks if the application is authorized to use the camera. * Note for Android: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return TRUE as permissions are already granted at installation time. */ @Cordova() - static isCameraAuthorized(): Promise {return; } + static isCameraAuthorized(): Promise { return; } /** * Checks if location mode is set to return high-accuracy locations from GPS hardware. * Returns true if Location mode is enabled and is set to either: @@ -68,7 +69,7 @@ export class Diagnostic { * - High accuracy = GPS hardware, network triangulation and Wifi network IDs (high and low accuracy) */ @Cordova() - static isGpsLocationEnabled(): Promise {return; } + static isGpsLocationEnabled(): Promise { return; } /** * Checks if location mode is set to return low-accuracy locations from network triangulation/WiFi access points. @@ -77,7 +78,7 @@ export class Diagnostic { * - High accuracy = GPS hardware, network triangulation and Wifi network IDs (high and low accuracy) */ @Cordova() - static isNetworkLocationEnabled(): Promise {return; } + static isNetworkLocationEnabled(): Promise { return; } /** * Checks if remote (push) notifications are enabled. @@ -85,7 +86,7 @@ export class Diagnostic { * On iOS <=7, returns true if app is registered for remote notifications AND alert style is not set to "None" (i.e. "Banners" or "Alerts") - same as isRegisteredForRemoteNotifications(). */ @Cordova() - static isRemoteNotificationsEnabled(): Promise {return; } + static isRemoteNotificationsEnabled(): Promise { return; } /** * Indicates if the app is registered for remote (push) notifications on the device. @@ -93,5 +94,5 @@ export class Diagnostic { * On iOS <=7, returns true if app is registered for remote notifications AND alert style is not set to "None" (i.e. "Banners" or "Alerts") - same as isRemoteNotificationsEnabled(). */ @Cordova() - static isRegisteredForRemoteNotifications(): Promise {return; } + static isRegisteredForRemoteNotifications(): Promise { return; } }