summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/os/BaseBundle.java10
-rw-r--r--core/java/android/os/Bundle.java62
-rw-r--r--core/java/android/os/PersistableBundle.java3
3 files changed, 7 insertions, 68 deletions
diff --git a/core/java/android/os/BaseBundle.java b/core/java/android/os/BaseBundle.java
index 9589aac8e443..1b02141b988f 100644
--- a/core/java/android/os/BaseBundle.java
+++ b/core/java/android/os/BaseBundle.java
@@ -329,7 +329,7 @@ public class BaseBundle {
* @param key a String, or null
* @param value a Boolean, or null
*/
- void putBoolean(String key, boolean value) {
+ public void putBoolean(String key, boolean value) {
unparcel();
mMap.put(key, value);
}
@@ -497,7 +497,7 @@ public class BaseBundle {
* @param key a String, or null
* @param value a boolean array object, or null
*/
- void putBooleanArray(String key, boolean[] value) {
+ public void putBooleanArray(String key, boolean[] value) {
unparcel();
mMap.put(key, value);
}
@@ -617,7 +617,7 @@ public class BaseBundle {
* @param key a String
* @return a boolean value
*/
- boolean getBoolean(String key) {
+ public boolean getBoolean(String key) {
unparcel();
if (DEBUG) Log.d(TAG, "Getting boolean in "
+ Integer.toHexString(System.identityHashCode(this)));
@@ -654,7 +654,7 @@ public class BaseBundle {
* @param defaultValue Value to return if key does not exist
* @return a boolean value
*/
- boolean getBoolean(String key, boolean defaultValue) {
+ public boolean getBoolean(String key, boolean defaultValue) {
unparcel();
Object o = mMap.get(key);
if (o == null) {
@@ -1072,7 +1072,7 @@ public class BaseBundle {
* @param key a String, or null
* @return a boolean[] value, or null
*/
- boolean[] getBooleanArray(String key) {
+ public boolean[] getBooleanArray(String key) {
unparcel();
Object o = mMap.get(key);
if (o == null) {
diff --git a/core/java/android/os/Bundle.java b/core/java/android/os/Bundle.java
index a9aa570dd5fd..c5c537263bbd 100644
--- a/core/java/android/os/Bundle.java
+++ b/core/java/android/os/Bundle.java
@@ -252,18 +252,6 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable {
}
/**
- * Inserts a Boolean value into the mapping of this Bundle, replacing
- * any existing value for the given key. Either key or value may be null.
- *
- * @param key a String, or null
- * @param value a Boolean, or null
- */
- @Override
- public void putBoolean(String key, boolean value) {
- super.putBoolean(key, value);
- }
-
- /**
* Inserts a byte value into the mapping of this Bundle, replacing
* any existing value for the given key.
*
@@ -460,18 +448,6 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable {
}
/**
- * Inserts a boolean array value into the mapping of this Bundle, replacing
- * any existing value for the given key. Either key or value may be null.
- *
- * @param key a String, or null
- * @param value a boolean array object, or null
- */
- @Override
- public void putBooleanArray(String key, boolean[] value) {
- super.putBooleanArray(key, value);
- }
-
- /**
* Inserts a byte array value into the mapping of this Bundle, replacing
* any existing value for the given key. Either key or value may be null.
*
@@ -579,31 +555,6 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable {
}
/**
- * Returns the value associated with the given key, or false if
- * no mapping of the desired type exists for the given key.
- *
- * @param key a String
- * @return a boolean value
- */
- @Override
- public boolean getBoolean(String key) {
- return super.getBoolean(key);
- }
-
- /**
- * Returns the value associated with the given key, or defaultValue if
- * no mapping of the desired type exists for the given key.
- *
- * @param key a String
- * @param defaultValue Value to return if key does not exist
- * @return a boolean value
- */
- @Override
- public boolean getBoolean(String key, boolean defaultValue) {
- return super.getBoolean(key, defaultValue);
- }
-
- /**
* Returns the value associated with the given key, or (byte) 0 if
* no mapping of the desired type exists for the given key.
*
@@ -939,19 +890,6 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable {
* value is explicitly associated with the key.
*
* @param key a String, or null
- * @return a boolean[] value, or null
- */
- @Override
- public boolean[] getBooleanArray(String key) {
- return super.getBooleanArray(key);
- }
-
- /**
- * Returns the value associated with the given key, or null if
- * no mapping of the desired type exists for the given key or a null
- * value is explicitly associated with the key.
- *
- * @param key a String, or null
* @return a byte[] value, or null
*/
@Override
diff --git a/core/java/android/os/PersistableBundle.java b/core/java/android/os/PersistableBundle.java
index c01f6885df1a..3a44428df55d 100644
--- a/core/java/android/os/PersistableBundle.java
+++ b/core/java/android/os/PersistableBundle.java
@@ -96,7 +96,8 @@ public final class PersistableBundle extends BaseBundle implements Cloneable, Pa
!(value instanceof Double) && !(value instanceof String) &&
!(value instanceof int[]) && !(value instanceof long[]) &&
!(value instanceof double[]) && !(value instanceof String[]) &&
- !(value instanceof PersistableBundle) && (value != null)) {
+ !(value instanceof PersistableBundle) && (value != null) &&
+ !(value instanceof Boolean) && !(value instanceof boolean[])) {
throw new IllegalArgumentException("Bad value in PersistableBundle key=" + key +
" value=" + value);
}