From b636874bd934d90492e82d144d7de27eef44470b Mon Sep 17 00:00:00 2001 From: Andrew Grieve Date: Fri, 4 Jul 2014 16:31:19 -0400 Subject: [PATCH] Deprecate some convenience methods on CordovaActivity They don't add much convenience and the file is too big already. --- .../src/org/apache/cordova/CordovaActivity.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/framework/src/org/apache/cordova/CordovaActivity.java b/framework/src/org/apache/cordova/CordovaActivity.java index 97697fcc..b1110e1c 100755 --- a/framework/src/org/apache/cordova/CordovaActivity.java +++ b/framework/src/org/apache/cordova/CordovaActivity.java @@ -57,7 +57,7 @@ import android.widget.LinearLayout; /** * 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. * * As an example: @@ -91,9 +91,13 @@ public class CordovaActivity extends Activity implements CordovaInterface { // The webview for our app protected CordovaWebView appView; + + @Deprecated // unused. protected CordovaWebViewClient webViewClient; + @Deprecated // Will be removed. Use findViewById() to retrieve views. protected LinearLayout root; + protected ProgressDialog spinnerDialog = null; private final ExecutorService threadPool = Executors.newCachedThreadPool(); @@ -238,10 +242,8 @@ public class CordovaActivity extends Activity implements CordovaInterface { /** * Get the Android activity. - * - * @return the Activity */ - public Activity getActivity() { + @Override public Activity getActivity() { return this; } @@ -426,6 +428,7 @@ public class CordovaActivity extends Activity implements CordovaInterface { /** * Clear the resource cache. */ + @Deprecated // Call method on appView directly. public void clearCache() { if (this.appView == null) { this.init(); @@ -436,6 +439,7 @@ public class CordovaActivity extends Activity implements CordovaInterface { /** * Clear web history in this web view. */ + @Deprecated // Call method on appView directly. public void 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 */ + @Deprecated // Call method on appView directly. public boolean backHistory() { if (this.appView != null) { return appView.backHistory(); @@ -727,6 +732,7 @@ public class CordovaActivity extends Activity implements CordovaInterface { * * @param statement */ + @Deprecated // Call method on appView directly. public void sendJavascript(String statement) { if (this.appView != null) { 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 params Parameters for new app */ + @Deprecated // Call method on appView directly. public void showWebPage(String url, boolean openExternal, boolean clearHistory, HashMap params) { if (this.appView != null) { appView.showWebPage(url, openExternal, clearHistory, params);