diff options
| author | Narayan Kamath <narayan@google.com> | 2014-06-26 18:10:51 +0100 |
|---|---|---|
| committer | Narayan Kamath <narayan@google.com> | 2014-07-01 09:03:10 +0000 |
| commit | aeaf87fe452353371b36da42e5beccca3150ab08 (patch) | |
| tree | 01e52319f8fb42604762d829a644e431ab396a3a /core/java | |
| parent | cdcbacfa33e4bbc4d071cf5dabd302afd8498b7d (diff) | |
Update javadoc for android.os.Bundle.
Call out the fact that defaultValue is returned if a null
mapping exists for a given key.
bug: https://code.google.com/p/android/issues/detail?id=68453
(cherry picked from commit ca2197b0457b1626b95a053d835ceaca43ac0286)
Change-Id: Iec70478ae091bb222be6e9ef9726c817395e9e23
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/os/BaseBundle.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/core/java/android/os/BaseBundle.java b/core/java/android/os/BaseBundle.java index c2a45bac5c2f..9589aac8e443 100644 --- a/core/java/android/os/BaseBundle.java +++ b/core/java/android/os/BaseBundle.java @@ -927,10 +927,12 @@ public class BaseBundle { /** * Returns the value associated with the given key, or defaultValue if - * no mapping of the desired type exists for the given key. + * no mapping of the desired type exists for the given key or if a null + * value is explicitly associated with the given key. * * @param key a String, or null - * @param defaultValue Value to return if key does not exist + * @param defaultValue Value to return if key does not exist or if a null + * value is associated with the given key. * @return the String value associated with the given key, or defaultValue * if no valid String object is currently mapped to that key. */ @@ -960,10 +962,12 @@ public class BaseBundle { /** * Returns the value associated with the given key, or defaultValue if - * no mapping of the desired type exists for the given key. + * no mapping of the desired type exists for the given key or if a null + * value is explicitly associated with the given key. * * @param key a String, or null - * @param defaultValue Value to return if key does not exist + * @param defaultValue Value to return if key does not exist or if a null + * value is associated with the given key. * @return the CharSequence value associated with the given key, or defaultValue * if no valid CharSequence object is currently mapped to that key. */ |
