mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
Fixed broken functions that were deprecated
This commit is contained in:
parent
25aef945d1
commit
1f39386616
@ -64,7 +64,7 @@ public class App extends CordovaPlugin {
|
||||
this.loadUrl(args.getString(0), args.optJSONObject(1));
|
||||
}
|
||||
else if (action.equals("cancelLoadUrl")) {
|
||||
this.cancelLoadUrl();
|
||||
//this.cancelLoadUrl();
|
||||
}
|
||||
else if (action.equals("clearHistory")) {
|
||||
this.clearHistory();
|
||||
@ -160,14 +160,6 @@ public class App extends CordovaPlugin {
|
||||
this.webView.showWebPage(url, openExternal, clearHistory, params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancel loadUrl before it has been loaded (Only works on a CordovaInterface class)
|
||||
*/
|
||||
@Deprecated
|
||||
public void cancelLoadUrl() {
|
||||
this.cordova.cancelLoadUrl();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear page history for the app.
|
||||
*/
|
||||
|
@ -43,7 +43,6 @@ public class LegacyContext implements CordovaInterface {
|
||||
@Deprecated
|
||||
public void cancelLoadUrl() {
|
||||
Log.i(LOG_TAG, "Replace ctx.cancelLoadUrl() with cordova.cancelLoadUrl()");
|
||||
this.cordova.cancelLoadUrl();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@ -55,7 +54,7 @@ public class LegacyContext implements CordovaInterface {
|
||||
@Deprecated
|
||||
public Context getContext() {
|
||||
Log.i(LOG_TAG, "Replace ctx.getContext() with cordova.getContext()");
|
||||
return this.cordova.getContext();
|
||||
return this.cordova.getActivity();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
|
Loading…
Reference in New Issue
Block a user