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 to make exoplayer not crash
This commit is contained in:
@@ -93,4 +93,46 @@ public class BaseBundle {
|
||||
final String s = getString(key);
|
||||
return (s == null) ? defaultValue : s;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts a long value into the mapping of this Bundle, replacing
|
||||
* any existing value for the given key.
|
||||
*
|
||||
* @param key a String, or null
|
||||
* @param value a long
|
||||
*/
|
||||
public void putLong(String key, long value) {
|
||||
mMap.put(key, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts an int value into the mapping of this Bundle, replacing
|
||||
* any existing value for the given key.
|
||||
*
|
||||
* @param key a String, or null
|
||||
* @param value an int, or null
|
||||
*/
|
||||
public void putInt(String key, int value) {
|
||||
mMap.put(key, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts a String 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, or null
|
||||
*/
|
||||
public void putString(String key, String value) {
|
||||
mMap.put(key, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of mappings contained in this Bundle.
|
||||
*
|
||||
* @return the number of mappings as an int.
|
||||
*/
|
||||
public int size() {
|
||||
return mMap.size();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
package android.os;
|
||||
|
||||
public class Binder extends IBinder {
|
||||
|
||||
public void attachInterface(IInterface owner, String descriptor) {}
|
||||
}
|
||||
|
||||
@@ -179,15 +179,6 @@ public final class Bundle extends BaseBundle implements Cloneable {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of mappings contained in this Bundle.
|
||||
*
|
||||
* @return the number of mappings as an int.
|
||||
*/
|
||||
public int size() {
|
||||
return mMap.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all elements from the mapping of this Bundle.
|
||||
*/
|
||||
@@ -334,28 +325,6 @@ public final class Bundle extends BaseBundle implements Cloneable {
|
||||
mMap.put(key, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts an int value into the mapping of this Bundle, replacing
|
||||
* any existing value for the given key.
|
||||
*
|
||||
* @param key a String, or null
|
||||
* @param value an int, or null
|
||||
*/
|
||||
public void putInt(String key, int value) {
|
||||
mMap.put(key, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts a long value into the mapping of this Bundle, replacing
|
||||
* any existing value for the given key.
|
||||
*
|
||||
* @param key a String, or null
|
||||
* @param value a long
|
||||
*/
|
||||
public void putLong(String key, long value) {
|
||||
mMap.put(key, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts a float value into the mapping of this Bundle, replacing
|
||||
* any existing value for the given key.
|
||||
@@ -378,17 +347,6 @@ public final class Bundle extends BaseBundle implements Cloneable {
|
||||
mMap.put(key, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts a String 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, or null
|
||||
*/
|
||||
public void putString(String key, String value) {
|
||||
mMap.put(key, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts a CharSequence value into the mapping of this Bundle, replacing
|
||||
* any existing value for the given key. Either key or value may be null.
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
package android.os;
|
||||
|
||||
public class IBinder {
|
||||
|
||||
public interface DeathRecipient {}
|
||||
}
|
||||
|
||||
18
src/api-impl/android/os/Parcel.java
Normal file
18
src/api-impl/android/os/Parcel.java
Normal file
@@ -0,0 +1,18 @@
|
||||
package android.os;
|
||||
|
||||
public class Parcel {
|
||||
|
||||
public static Parcel obtain() {
|
||||
return new Parcel();
|
||||
}
|
||||
|
||||
public void writeBundle(Bundle bundle) {}
|
||||
|
||||
public Bundle readBundle(ClassLoader loader) {
|
||||
return new Bundle();
|
||||
}
|
||||
|
||||
public void setDataPosition(int position) {}
|
||||
|
||||
public void recycle() {}
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
package android.os;
|
||||
|
||||
public interface Parcelable {
|
||||
public static interface Creator<T> {}
|
||||
public static interface Creator<T> {
|
||||
public T createFromParcel(Parcel parcel);
|
||||
}
|
||||
|
||||
public static interface ClassLoaderCreator<T> extends Creator<T> {}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
package android.os;
|
||||
|
||||
public final class PowerManager {
|
||||
public final class WakeLock {}
|
||||
public final class WakeLock {
|
||||
public void setReferenceCounted(boolean referenceCounted) {}
|
||||
|
||||
public void acquire() {}
|
||||
|
||||
public void release() {}
|
||||
}
|
||||
|
||||
public WakeLock newWakeLock(int levelAndFlags, String tag) {
|
||||
return new WakeLock();
|
||||
|
||||
10
src/api-impl/android/os/RemoteCallbackList.java
Normal file
10
src/api-impl/android/os/RemoteCallbackList.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package android.os;
|
||||
|
||||
public class RemoteCallbackList {
|
||||
|
||||
public int beginBroadcast() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void finishBroadcast() {}
|
||||
}
|
||||
Reference in New Issue
Block a user