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 Java APIs needed for WhatsApp MainActivity and ConversationActivity
This commit is contained in:
@@ -27,7 +27,7 @@ import java.util.List;
|
||||
* A mapping from String values to various Parcelable types.
|
||||
*
|
||||
*/
|
||||
public final class Bundle extends BaseBundle implements Cloneable {
|
||||
public final class Bundle extends BaseBundle implements Cloneable, Parcelable {
|
||||
static final boolean DEBUG = false;
|
||||
public static final Bundle EMPTY;
|
||||
|
||||
@@ -188,15 +188,6 @@ public final class Bundle extends BaseBundle implements Cloneable {
|
||||
mFdsKnown = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes any entry with the given key from the mapping of this Bundle.
|
||||
*
|
||||
* @param key a String key
|
||||
*/
|
||||
public void remove(String key) {
|
||||
mMap.remove(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts all mappings from the given Bundle into this Bundle.
|
||||
*
|
||||
@@ -541,17 +532,6 @@ public final class Bundle extends BaseBundle implements Cloneable {
|
||||
mMap.put(key, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts a String 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 String array object, or null
|
||||
*/
|
||||
public void putStringArray(String key, String[] value) {
|
||||
mMap.put(key, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts a CharSequence array value into the mapping of this Bundle, replacing
|
||||
* any existing value for the given key. Either key or value may be null.
|
||||
@@ -1196,27 +1176,6 @@ public final class Bundle extends BaseBundle implements Cloneable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 String[] value, or null
|
||||
*/
|
||||
public String[] getStringArray(String key) {
|
||||
Object o = mMap.get(key);
|
||||
if (o == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return (String[])o;
|
||||
} catch (ClassCastException e) {
|
||||
typeWarning(key, o, "String[]", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
||||
Reference in New Issue
Block a user