mirror of
https://github.com/apache/cordova-android.git
synced 2025-05-12 14:21:40 +08:00
Remove unused code and variable.
This commit is contained in:
parent
cfc9631873
commit
ce9d577415
@ -134,11 +134,9 @@ public class DroidGap extends PhonegapActivity {
|
|||||||
// ie http://server/path/index.html#abc?query
|
// ie http://server/path/index.html#abc?query
|
||||||
private String url;
|
private String url;
|
||||||
|
|
||||||
// The initial URL for our app up to and including the file name
|
// The base of the initial URL for our app.
|
||||||
// ie http://server/path/index.html
|
// Does not include file name. Ends with /
|
||||||
private String urlFile;
|
// ie http://server/path/
|
||||||
|
|
||||||
// The base of the initial URL for our app
|
|
||||||
private String baseUrl = null;
|
private String baseUrl = null;
|
||||||
|
|
||||||
// Plugin to call when activity result is received
|
// Plugin to call when activity result is received
|
||||||
@ -334,7 +332,6 @@ public class DroidGap extends PhonegapActivity {
|
|||||||
*/
|
*/
|
||||||
public void loadUrl(final String url) {
|
public void loadUrl(final String url) {
|
||||||
System.out.println("loadUrl("+url+")");
|
System.out.println("loadUrl("+url+")");
|
||||||
this.urlFile = this.getUrlFile(url);
|
|
||||||
this.url = url;
|
this.url = url;
|
||||||
if (this.baseUrl == null) {
|
if (this.baseUrl == null) {
|
||||||
int i = url.lastIndexOf('/');
|
int i = url.lastIndexOf('/');
|
||||||
@ -711,21 +708,6 @@ public class DroidGap extends PhonegapActivity {
|
|||||||
this.callbackServer.sendJavascript(statement);
|
this.callbackServer.sendJavascript(statement);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Return up to file part of url.
|
|
||||||
* If url = http://server/page.html#abc, then return http://server/page.html
|
|
||||||
*
|
|
||||||
* @param url
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private String getUrlFile(String url) {
|
|
||||||
int p1 = url.indexOf("#");
|
|
||||||
int p2 = url.indexOf("?");
|
|
||||||
if (p1 < 0) p1 = url.length();
|
|
||||||
if (p2 < 0) p2 = url.length();
|
|
||||||
int p3 = (p1 < p2) ? p1 : p2;
|
|
||||||
return url.substring(0, p3);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display a new browser with the specified URL.
|
* Display a new browser with the specified URL.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user