You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
add more stubs
This commit is contained in:
@@ -94,6 +94,27 @@ public class BaseBundle {
|
||||
return (s == null) ? defaultValue : s;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 long value
|
||||
*/
|
||||
public long getLong(String key, long defaultValue) {
|
||||
Object o = mMap.get(key);
|
||||
if (o == null) {
|
||||
return defaultValue;
|
||||
}
|
||||
try {
|
||||
return (Long)o;
|
||||
} catch (ClassCastException e) {
|
||||
typeWarning(key, o, "Long", defaultValue, e);
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts a long value into the mapping of this Bundle, replacing
|
||||
* any existing value for the given key.
|
||||
|
||||
@@ -795,27 +795,6 @@ public final class Bundle extends BaseBundle implements Cloneable {
|
||||
return getLong(key, 0L);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 long value
|
||||
*/
|
||||
public long getLong(String key, long defaultValue) {
|
||||
Object o = mMap.get(key);
|
||||
if (o == null) {
|
||||
return defaultValue;
|
||||
}
|
||||
try {
|
||||
return (Long)o;
|
||||
} catch (ClassCastException e) {
|
||||
typeWarning(key, o, "Long", defaultValue, e);
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value associated with the given key, or 0.0f if
|
||||
* no mapping of the desired type exists for the given key.
|
||||
|
||||
Reference in New Issue
Block a user