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
api-impl: stubs and fixes for Compose Stopwatch and LibreSudoku
This commit is contained in:
@@ -302,4 +302,25 @@ public class BaseBundle {
|
||||
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
|
||||
* value is explicitly associated with the key.
|
||||
*
|
||||
* @param key a String, or null
|
||||
* @return an int[] value, or null
|
||||
*/
|
||||
public int[] getIntArray(String key) {
|
||||
Object o = mMap.get(key);
|
||||
if (o == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return (int[])o;
|
||||
} catch (ClassCastException e) {
|
||||
typeWarning(key, o, "int[]", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1042,27 +1042,6 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 an int[] value, or null
|
||||
*/
|
||||
public int[] getIntArray(String key) {
|
||||
Object o = mMap.get(key);
|
||||
if (o == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return (int[])o;
|
||||
} catch (ClassCastException e) {
|
||||
typeWarning(key, o, "int[]", 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
|
||||
|
||||
13
src/api-impl/android/os/VibrationEffect.java
Normal file
13
src/api-impl/android/os/VibrationEffect.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package android.os;
|
||||
|
||||
public class VibrationEffect {
|
||||
|
||||
public static VibrationEffect createOneShot(long milliseconds, int amplitude) {
|
||||
return new VibrationEffect();
|
||||
}
|
||||
|
||||
public static VibrationEffect createWaveform(long[] pattern, int repeat) {
|
||||
return new VibrationEffect();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user