Renamce enableGeoLocation -> disableWebViewOptimizations

This commit is contained in:
Sebastián Katzer 2017-01-02 16:32:51 +01:00
parent 4b2db271c1
commit 626776f60b
2 changed files with 5 additions and 5 deletions

View File

@ -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 {

View File

@ -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', []);
}
};