From 3571307df5d62b2da75fdad66c458cb27df85b08 Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Wed, 30 Apr 2014 11:33:26 -0700 Subject: [PATCH] Adding setIntegerProperty, setBooleanProperty and setStringProperty back, due to possible demand, and due to the fact that I don't want to rewrite my tests --- .../org/apache/cordova/CordovaActivity.java | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/framework/src/org/apache/cordova/CordovaActivity.java b/framework/src/org/apache/cordova/CordovaActivity.java index a161bf8f..1715fde2 100755 --- a/framework/src/org/apache/cordova/CordovaActivity.java +++ b/framework/src/org/apache/cordova/CordovaActivity.java @@ -1064,4 +1064,66 @@ public class CordovaActivity extends Activity implements CordovaInterface { outState.putString("callbackClass", cClass); } } + + + /** + * 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); + } + + /** + * 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); + } + + /** + * 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); + } + + /** + * 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); + } + }