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
multiple additions and fixes for the Java APIs
Stuff needed for WhatsApp support
This commit is contained in:
@@ -62,6 +62,16 @@ public class BaseBundle {
|
||||
return mMap.containsKey(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the entry with the given key as an object.
|
||||
*
|
||||
* @param key a String key
|
||||
* @return an Object, or null
|
||||
*/
|
||||
public Object get(String key) {
|
||||
return mMap.get(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
|
||||
@@ -94,6 +104,17 @@ public class BaseBundle {
|
||||
return (s == null) ? defaultValue : s;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value associated with the given key, or 0L if
|
||||
* no mapping of the desired type exists for the given key.
|
||||
*
|
||||
* @param key a String
|
||||
* @return a long value
|
||||
*/
|
||||
public long getLong(String key) {
|
||||
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.
|
||||
|
||||
@@ -5,4 +5,8 @@ public class Binder extends IBinder {
|
||||
public void attachInterface(IInterface owner, String descriptor) {}
|
||||
|
||||
public static void flushPendingCommands() {}
|
||||
|
||||
public static long clearCallingIdentity() { return 0; }
|
||||
|
||||
public static void restoreCallingIdentity(long identityToken) {}
|
||||
}
|
||||
|
||||
@@ -188,16 +188,6 @@ public final class Bundle extends BaseBundle implements Cloneable {
|
||||
mFdsKnown = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the entry with the given key as an object.
|
||||
*
|
||||
* @param key a String key
|
||||
* @return an Object, or null
|
||||
*/
|
||||
public Object get(String key) {
|
||||
return mMap.get(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes any entry with the given key from the mapping of this Bundle.
|
||||
*
|
||||
@@ -752,17 +742,6 @@ public final class Bundle extends BaseBundle implements Cloneable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value associated with the given key, or 0L if
|
||||
* no mapping of the desired type exists for the given key.
|
||||
*
|
||||
* @param key a String
|
||||
* @return a long value
|
||||
*/
|
||||
public long getLong(String key) {
|
||||
return getLong(key, 0L);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value associated with the given key, or 0.0f if
|
||||
* no mapping of the desired type exists for the given key.
|
||||
|
||||
@@ -35,4 +35,8 @@ public class Parcel {
|
||||
public byte[] marshall() {
|
||||
return new byte[0];
|
||||
}
|
||||
|
||||
public int dataPosition() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user