forked from github/cordova-android
Deprecate some convenience methods on CordovaActivity
They don't add much convenience and the file is too big already.
This commit is contained in:
parent
965e4e9b19
commit
b636874bd9
@ -57,7 +57,7 @@ import android.widget.LinearLayout;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is the main Android activity that represents the Cordova
|
* This class is the main Android activity that represents the Cordova
|
||||||
* application. It should be extended by the user to load the specific
|
* application. It should be extended by the user to load the specific
|
||||||
* html file that contains the application.
|
* html file that contains the application.
|
||||||
*
|
*
|
||||||
* As an example:
|
* As an example:
|
||||||
@ -91,9 +91,13 @@ public class CordovaActivity extends Activity implements CordovaInterface {
|
|||||||
|
|
||||||
// The webview for our app
|
// The webview for our app
|
||||||
protected CordovaWebView appView;
|
protected CordovaWebView appView;
|
||||||
|
|
||||||
|
@Deprecated // unused.
|
||||||
protected CordovaWebViewClient webViewClient;
|
protected CordovaWebViewClient webViewClient;
|
||||||
|
|
||||||
|
@Deprecated // Will be removed. Use findViewById() to retrieve views.
|
||||||
protected LinearLayout root;
|
protected LinearLayout root;
|
||||||
|
|
||||||
protected ProgressDialog spinnerDialog = null;
|
protected ProgressDialog spinnerDialog = null;
|
||||||
private final ExecutorService threadPool = Executors.newCachedThreadPool();
|
private final ExecutorService threadPool = Executors.newCachedThreadPool();
|
||||||
|
|
||||||
@ -238,10 +242,8 @@ public class CordovaActivity extends Activity implements CordovaInterface {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the Android activity.
|
* Get the Android activity.
|
||||||
*
|
|
||||||
* @return the Activity
|
|
||||||
*/
|
*/
|
||||||
public Activity getActivity() {
|
@Override public Activity getActivity() {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -426,6 +428,7 @@ public class CordovaActivity extends Activity implements CordovaInterface {
|
|||||||
/**
|
/**
|
||||||
* Clear the resource cache.
|
* Clear the resource cache.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated // Call method on appView directly.
|
||||||
public void clearCache() {
|
public void clearCache() {
|
||||||
if (this.appView == null) {
|
if (this.appView == null) {
|
||||||
this.init();
|
this.init();
|
||||||
@ -436,6 +439,7 @@ public class CordovaActivity extends Activity implements CordovaInterface {
|
|||||||
/**
|
/**
|
||||||
* Clear web history in this web view.
|
* Clear web history in this web view.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated // Call method on appView directly.
|
||||||
public void clearHistory() {
|
public void clearHistory() {
|
||||||
this.appView.clearHistory();
|
this.appView.clearHistory();
|
||||||
}
|
}
|
||||||
@ -445,6 +449,7 @@ public class CordovaActivity extends Activity implements CordovaInterface {
|
|||||||
*
|
*
|
||||||
* @return true if we went back, false if we are already at top
|
* @return true if we went back, false if we are already at top
|
||||||
*/
|
*/
|
||||||
|
@Deprecated // Call method on appView directly.
|
||||||
public boolean backHistory() {
|
public boolean backHistory() {
|
||||||
if (this.appView != null) {
|
if (this.appView != null) {
|
||||||
return appView.backHistory();
|
return appView.backHistory();
|
||||||
@ -727,6 +732,7 @@ public class CordovaActivity extends Activity implements CordovaInterface {
|
|||||||
*
|
*
|
||||||
* @param statement
|
* @param statement
|
||||||
*/
|
*/
|
||||||
|
@Deprecated // Call method on appView directly.
|
||||||
public void sendJavascript(String statement) {
|
public void sendJavascript(String statement) {
|
||||||
if (this.appView != null) {
|
if (this.appView != null) {
|
||||||
this.appView.jsMessageQueue.addJavaScript(statement);
|
this.appView.jsMessageQueue.addJavaScript(statement);
|
||||||
@ -949,6 +955,7 @@ public class CordovaActivity extends Activity implements CordovaInterface {
|
|||||||
* @param clearHistory Clear the history stack, so new page becomes top of history
|
* @param clearHistory Clear the history stack, so new page becomes top of history
|
||||||
* @param params Parameters for new app
|
* @param params Parameters for new app
|
||||||
*/
|
*/
|
||||||
|
@Deprecated // Call method on appView directly.
|
||||||
public void showWebPage(String url, boolean openExternal, boolean clearHistory, HashMap<String, Object> params) {
|
public void showWebPage(String url, boolean openExternal, boolean clearHistory, HashMap<String, Object> params) {
|
||||||
if (this.appView != null) {
|
if (this.appView != null) {
|
||||||
appView.showWebPage(url, openExternal, clearHistory, params);
|
appView.showWebPage(url, openExternal, clearHistory, params);
|
||||||
|
Loading…
Reference in New Issue
Block a user