From 626776f60bf7ccce98fb3ac33721561c639b9975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Katzer?= Date: Mon, 2 Jan 2017 16:32:51 +0100 Subject: [PATCH] Renamce enableGeoLocation -> disableWebViewOptimizations --- src/android/BackgroundMode.java | 6 +++--- www/background-mode.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/android/BackgroundMode.java b/src/android/BackgroundMode.java index 3f9cfdf..3a7f70d 100644 --- a/src/android/BackgroundMode.java +++ b/src/android/BackgroundMode.java @@ -104,8 +104,8 @@ public class BackgroundMode extends CordovaPlugin { return true; } - if (action.equalsIgnoreCase("enableGeoLocation")) { - enableGeoLocation(); + if (action.equalsIgnoreCase("disableWebViewOptimizations")) { + disableWebViewOptimizations(); return true; } @@ -271,7 +271,7 @@ public class BackgroundMode extends CordovaPlugin { /** * Enable GPS position tracking while in background. */ - private void enableGeoLocation() { + private void disableWebViewOptimizations() { Thread thread = new Thread(){ public void run() { try { diff --git a/www/background-mode.js b/www/background-mode.js index 6d520a0..622859e 100644 --- a/www/background-mode.js +++ b/www/background-mode.js @@ -93,9 +93,9 @@ exports.configure = function (options) { /** * Enable GPS-tracking in background (Android). */ -exports.enableGeoLocation = function () { +exports.disableWebViewOptimizations = function () { if (device.platform == 'Android') { - cordova.exec(null, null, 'BackgroundMode', 'enableGeoLocation', []); + cordova.exec(null, null, 'BackgroundMode', 'disableWebViewOptimizations', []); } };