diff options
Diffstat (limited to 'shadows/framework/src/main/java/org/robolectric/shadows/ShadowNativePropertyValuesHolder.java')
-rw-r--r-- | shadows/framework/src/main/java/org/robolectric/shadows/ShadowNativePropertyValuesHolder.java | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/shadows/framework/src/main/java/org/robolectric/shadows/ShadowNativePropertyValuesHolder.java b/shadows/framework/src/main/java/org/robolectric/shadows/ShadowNativePropertyValuesHolder.java index f5e9b8e9f..4e2c6f76c 100644 --- a/shadows/framework/src/main/java/org/robolectric/shadows/ShadowNativePropertyValuesHolder.java +++ b/shadows/framework/src/main/java/org/robolectric/shadows/ShadowNativePropertyValuesHolder.java @@ -8,75 +8,80 @@ import org.robolectric.annotation.Implements; import org.robolectric.nativeruntime.DefaultNativeRuntimeLoader; import org.robolectric.nativeruntime.PropertyValuesHolderNatives; import org.robolectric.shadows.ShadowNativePropertyValuesHolder.Picker; +import org.robolectric.versioning.AndroidVersions.U; /** Shadow for {@link PropertyValuesHolder} that is backed by native code */ -@Implements(value = PropertyValuesHolder.class, minSdk = O, shadowPicker = Picker.class) +@Implements( + value = PropertyValuesHolder.class, + minSdk = O, + shadowPicker = Picker.class, + callNativeMethodsByDefault = true) public class ShadowNativePropertyValuesHolder { static { DefaultNativeRuntimeLoader.injectAndLoad(); } - @Implementation + @Implementation(maxSdk = U.SDK_INT) protected static long nGetIntMethod(Class<?> targetClass, String methodName) { return PropertyValuesHolderNatives.nGetIntMethod(targetClass, methodName); } - @Implementation + @Implementation(maxSdk = U.SDK_INT) protected static long nGetFloatMethod(Class<?> targetClass, String methodName) { return PropertyValuesHolderNatives.nGetFloatMethod(targetClass, methodName); } - @Implementation + @Implementation(maxSdk = U.SDK_INT) protected static long nGetMultipleIntMethod( Class<?> targetClass, String methodName, int numParams) { return PropertyValuesHolderNatives.nGetMultipleIntMethod(targetClass, methodName, numParams); } - @Implementation + @Implementation(maxSdk = U.SDK_INT) protected static long nGetMultipleFloatMethod( Class<?> targetClass, String methodName, int numParams) { return PropertyValuesHolderNatives.nGetMultipleFloatMethod(targetClass, methodName, numParams); } - @Implementation + @Implementation(maxSdk = U.SDK_INT) protected static void nCallIntMethod(Object target, long methodID, int arg) { PropertyValuesHolderNatives.nCallIntMethod(target, methodID, arg); } - @Implementation + @Implementation(maxSdk = U.SDK_INT) protected static void nCallFloatMethod(Object target, long methodID, float arg) { PropertyValuesHolderNatives.nCallFloatMethod(target, methodID, arg); } - @Implementation + @Implementation(maxSdk = U.SDK_INT) protected static void nCallTwoIntMethod(Object target, long methodID, int arg1, int arg2) { PropertyValuesHolderNatives.nCallTwoIntMethod(target, methodID, arg1, arg2); } - @Implementation + @Implementation(maxSdk = U.SDK_INT) protected static void nCallFourIntMethod( Object target, long methodID, int arg1, int arg2, int arg3, int arg4) { PropertyValuesHolderNatives.nCallFourIntMethod(target, methodID, arg1, arg2, arg3, arg4); } - @Implementation + @Implementation(maxSdk = U.SDK_INT) protected static void nCallMultipleIntMethod(Object target, long methodID, int[] args) { PropertyValuesHolderNatives.nCallMultipleIntMethod(target, methodID, args); } - @Implementation + @Implementation(maxSdk = U.SDK_INT) protected static void nCallTwoFloatMethod(Object target, long methodID, float arg1, float arg2) { PropertyValuesHolderNatives.nCallTwoFloatMethod(target, methodID, arg1, arg2); } - @Implementation + @Implementation(maxSdk = U.SDK_INT) protected static void nCallFourFloatMethod( Object target, long methodID, float arg1, float arg2, float arg3, float arg4) { PropertyValuesHolderNatives.nCallFourFloatMethod(target, methodID, arg1, arg2, arg3, arg4); } - @Implementation + @Implementation(maxSdk = U.SDK_INT) protected static void nCallMultipleFloatMethod(Object target, long methodID, float[] args) { PropertyValuesHolderNatives.nCallMultipleFloatMethod(target, methodID, args); } |