add Java APIs needed for WhatsApp MainActivity and ConversationActivity

This commit is contained in:
Julian Winkler
2024-08-25 11:20:01 +02:00
parent 9d8e091799
commit c492e1f03f
74 changed files with 903 additions and 69 deletions

View File

@@ -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