From b621c3e4c4327ecf53e4d1682963b6d70e888de6 Mon Sep 17 00:00:00 2001 From: Marcel Kinard Date: Tue, 26 Nov 2013 12:05:23 -0500 Subject: [PATCH] CB-5471: add deprecation javadoc/annotation --- .../src/org/apache/cordova/CordovaActivity.java | 16 ++++++++++++++++ framework/src/org/apache/cordova/DroidGap.java | 12 ++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/framework/src/org/apache/cordova/CordovaActivity.java b/framework/src/org/apache/cordova/CordovaActivity.java index 377c8fd6..cdae420a 100755 --- a/framework/src/org/apache/cordova/CordovaActivity.java +++ b/framework/src/org/apache/cordova/CordovaActivity.java @@ -642,10 +642,14 @@ public class CordovaActivity extends Activity implements CordovaInterface { /** * Set boolean property on activity. + * This method has been deprecated in 3.0 and will be removed at a future + * time. Please use config.xml instead. * * @param name * @param value + * @deprecated */ + @Deprecated public void setBooleanProperty(String name, boolean value) { Log.d(TAG, "Setting boolean properties in CordovaActivity will be deprecated in 3.0 on July 2013, please use config.xml"); this.getIntent().putExtra(name.toLowerCase(), value); @@ -653,10 +657,14 @@ public class CordovaActivity extends Activity implements CordovaInterface { /** * Set int property on activity. + * This method has been deprecated in 3.0 and will be removed at a future + * time. Please use config.xml instead. * * @param name * @param value + * @deprecated */ + @Deprecated public void setIntegerProperty(String name, int value) { Log.d(TAG, "Setting integer properties in CordovaActivity will be deprecated in 3.0 on July 2013, please use config.xml"); this.getIntent().putExtra(name.toLowerCase(), value); @@ -664,10 +672,14 @@ public class CordovaActivity extends Activity implements CordovaInterface { /** * Set string property on activity. + * This method has been deprecated in 3.0 and will be removed at a future + * time. Please use config.xml instead. * * @param name * @param value + * @deprecated */ + @Deprecated public void setStringProperty(String name, String value) { Log.d(TAG, "Setting string properties in CordovaActivity will be deprecated in 3.0 on July 2013, please use config.xml"); this.getIntent().putExtra(name.toLowerCase(), value); @@ -675,10 +687,14 @@ public class CordovaActivity extends Activity implements CordovaInterface { /** * Set double property on activity. + * This method has been deprecated in 3.0 and will be removed at a future + * time. Please use config.xml instead. * * @param name * @param value + * @deprecated */ + @Deprecated public void setDoubleProperty(String name, double value) { Log.d(TAG, "Setting double properties in CordovaActivity will be deprecated in 3.0 on July 2013, please use config.xml"); this.getIntent().putExtra(name.toLowerCase(), value); diff --git a/framework/src/org/apache/cordova/DroidGap.java b/framework/src/org/apache/cordova/DroidGap.java index fbaf6c40..d72d2a45 100644 --- a/framework/src/org/apache/cordova/DroidGap.java +++ b/framework/src/org/apache/cordova/DroidGap.java @@ -17,10 +17,18 @@ under the License. */ -// We moved everything to CordovaActivity - package org.apache.cordova; +/** + * This used to be the class that should be extended by application + * developers, but everything has been moved to CordovaActivity. So + * you should extend CordovaActivity instead of DroidGap. This class + * will be removed at a future time. + * + * @see CordovaActivity + * @deprecated + */ +@Deprecated public class DroidGap extends CordovaActivity { }