Remove `Environment.setDebug()`
MODIFY
src/android/plugin/google/maps/Environment.java
src/android/plugin/google/maps/Environment.java
@@ -113,7 +113,7 @@ public class Environment extends CordovaPlugin {
handler.postDelayed(new Runnable() {
public void run() {
googleMaps.mPluginLayout.setBackgroundColor(finalBackgroundColor);
- sendNoResult(callbackContext);
+ callbackContext.success();
}
}, googleMaps.initialized ? 0 : 250);
}
@@ -124,36 +124,4 @@ public class Environment extends CordovaPlugin {
return true;
}
-
- /**
- * Set the debug flag of myPluginLayer
- * @param args Parameters given from JavaScript side
- * @param callbackContext Callback context for sending back the result.
- * @throws JSONException
- */
- @SuppressWarnings("unused")
- public void setDebuggable(final JSONArray args, final CallbackContext callbackContext) throws JSONException {
-
- cordova.getThreadPool().submit(new Runnable() {
- @Override
- public void run() {
- try {
- boolean debuggable = args.getBoolean(0);
- CordovaGoogleMaps googleMaps = (CordovaGoogleMaps) pluginManager.getPlugin("CordovaGoogleMaps");
- googleMaps.mPluginLayout.isDebug = debuggable;
- } catch (JSONException e) {
- e.printStackTrace();
- } finally {
- callbackContext.success();
- }
- }
- });
- }
-
- protected void sendNoResult(CallbackContext callbackContext) {
- PluginResult pluginResult = new PluginResult(PluginResult.Status.NO_RESULT);
- pluginResult.setKeepCallback(true);
- callbackContext.sendPluginResult(pluginResult);
- }
-
}

MODIFY
src/android/plugin/google/maps/PluginLocationService.java
src/android/plugin/google/maps/PluginLocationService.java
@@ -231,7 +231,6 @@ public class PluginLocationService extends CordovaPlugin {
@Override
public void onConnected(Bundle connectionHint) {
Log.d(TAG, "===> onConnected " + callbackContext.getCallbackId());
- //PluginLocationService.this.sendNoResult(callbackContext);
requestLocation();
}

MODIFY
www/Environment.js
www/Environment.js
@@ -12,11 +12,6 @@ Environment.setBackgroundColor = function(color) {
cordova.exec(null, null, 'Environment', 'setBackGroundColor', [common.HTMLColor2RGBA(color)]);
};
-Environment.setDebuggable = function(debug) {
- debug = common.parseBoolean(debug);
- cordova.exec(null, null, 'Environment', 'setDebuggable', [debug]);
-};
-
Environment.isAvailable = function(callback) {
cordova.exec(function() {
if (typeof callback === "function") {

Remove `Environment.setDebug()`