From ba77fd70c3a247c092722bddf53b1c4b693d0c28 Mon Sep 17 00:00:00 2001 From: Ibby Date: Tue, 27 Dec 2016 07:37:03 -0500 Subject: [PATCH] fix(background-mode): isEnabled and isActive return booleans fixes #908 --- src/plugins/backgroundmode.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/plugins/backgroundmode.ts b/src/plugins/backgroundmode.ts index 75d4953a5..d9858877e 100644 --- a/src/plugins/backgroundmode.ts +++ b/src/plugins/backgroundmode.ts @@ -76,17 +76,21 @@ export class BackgroundMode { /** * Checks if background mode is enabled or not. - * @returns {Promise} returns a promise that resolves with boolean that indicates if the background mode is enabled. + * @returns {boolean} returns a boolean that indicates if the background mode is enabled. */ - @Cordova() - static isEnabled(): Promise { return; } + @Cordova({ + sync: true + }) + static isEnabled(): boolean { return; } /** * Can be used to get the information if the background mode is active. - * @returns {Promise} returns a promise that resolves with boolean that indicates if the background mode is active. + * @returns {boolean} returns a boolean that indicates if the background mode is active. */ - @Cordova() - static isActive(): Promise { return; } + @Cordova({ + sync: true + }) + static isActive(): boolean { return; } /** * Override the default title, ticker and text.