Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit 9bdbd4b

Browse files
committed
Disable old binding workarounds
1 parent a7a641e commit 9bdbd4b

File tree

1 file changed

+73
-73
lines changed

1 file changed

+73
-73
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,86 @@
1-
using System;
2-
using Android.Runtime;
1+
// using System;
2+
// using Android.Runtime;
33

4-
namespace Android.Support.Animation
5-
{
6-
internal static class __JniCtorUtil
7-
{
8-
internal static unsafe void CtorImpl(Java.Lang.Object sender, Type classType, IntPtr classRef, IntPtr methodId, string jniSignature, JValue* args, Action<IntPtr, JniHandleOwnership> setHandle)
9-
{
10-
if (sender.Handle != IntPtr.Zero)
11-
return;
4+
// namespace Android.Support.Animation
5+
// {
6+
// internal static class __JniCtorUtil
7+
// {
8+
// internal static unsafe void CtorImpl(Java.Lang.Object sender, Type classType, IntPtr classRef, IntPtr methodId, string jniSignature, JValue* args, Action<IntPtr, JniHandleOwnership> setHandle)
9+
// {
10+
// if (sender.Handle != IntPtr.Zero)
11+
// return;
1212

13-
try
14-
{
15-
if (((object)sender).GetType() != classType)
16-
{
17-
setHandle(
18-
global::Android.Runtime.JNIEnv.StartCreateInstance(((object)sender).GetType(), jniSignature, args),
19-
JniHandleOwnership.TransferLocalRef);
20-
global::Android.Runtime.JNIEnv.FinishCreateInstance(((global::Java.Lang.Object)sender).Handle, jniSignature, args);
21-
return;
22-
}
13+
// try
14+
// {
15+
// if (((object)sender).GetType() != classType)
16+
// {
17+
// setHandle(
18+
// global::Android.Runtime.JNIEnv.StartCreateInstance(((object)sender).GetType(), jniSignature, args),
19+
// JniHandleOwnership.TransferLocalRef);
20+
// global::Android.Runtime.JNIEnv.FinishCreateInstance(((global::Java.Lang.Object)sender).Handle, jniSignature, args);
21+
// return;
22+
// }
2323

24-
if (methodId == IntPtr.Zero)
25-
methodId = JNIEnv.GetMethodID(classRef, "<init>", jniSignature);
26-
setHandle(
27-
global::Android.Runtime.JNIEnv.StartCreateInstance(classRef, methodId, args),
28-
JniHandleOwnership.TransferLocalRef);
29-
JNIEnv.FinishCreateInstance(((global::Java.Lang.Object)sender).Handle, classRef, methodId, args);
30-
}
31-
finally
32-
{
33-
}
34-
}
35-
}
24+
// if (methodId == IntPtr.Zero)
25+
// methodId = JNIEnv.GetMethodID(classRef, "<init>", jniSignature);
26+
// setHandle(
27+
// global::Android.Runtime.JNIEnv.StartCreateInstance(classRef, methodId, args),
28+
// JniHandleOwnership.TransferLocalRef);
29+
// JNIEnv.FinishCreateInstance(((global::Java.Lang.Object)sender).Handle, classRef, methodId, args);
30+
// }
31+
// finally
32+
// {
33+
// }
34+
// }
35+
// }
3636

37-
public partial class SpringAnimation
38-
{
39-
private const string CTOR_1 = "(Ljava/lang/Object;Landroid/support/animation/FloatPropertyCompat;)V";
40-
static IntPtr id_ctor_1;
37+
// public partial class SpringAnimation
38+
// {
39+
// private const string CTOR_1 = "(Ljava/lang/Object;Landroid/support/animation/FloatPropertyCompat;)V";
40+
// static IntPtr id_ctor_1;
4141

42-
[Register(".ctor", CTOR_1, "")]
43-
public unsafe SpringAnimation(global::Java.Lang.Object @object, FloatPropertyCompat @property)
44-
: base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
45-
{
46-
JValue* __args = stackalloc JValue[2];
47-
__args[0] = new JValue(@object);
48-
__args[1] = new JValue(@property);
42+
// [Register(".ctor", CTOR_1, "")]
43+
// public unsafe SpringAnimation(global::Java.Lang.Object @object, FloatPropertyCompat @property)
44+
// : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
45+
// {
46+
// JValue* __args = stackalloc JValue[2];
47+
// __args[0] = new JValue(@object);
48+
// __args[1] = new JValue(@property);
4949

50-
__JniCtorUtil.CtorImpl(this, typeof(SpringAnimation), class_ref, id_ctor_1, CTOR_1, __args, SetHandle);
51-
}
50+
// __JniCtorUtil.CtorImpl(this, typeof(SpringAnimation), class_ref, id_ctor_1, CTOR_1, __args, SetHandle);
51+
// }
5252

5353

54-
private const string JNI_CTOR_2 = "(Ljava/lang/Object;Landroid/support/animation/FloatPropertyCompat;F)V";
55-
static IntPtr id_ctor_2;
54+
// private const string JNI_CTOR_2 = "(Ljava/lang/Object;Landroid/support/animation/FloatPropertyCompat;F)V";
55+
// static IntPtr id_ctor_2;
5656

57-
[Register(".ctor", JNI_CTOR_2, "")]
58-
public unsafe SpringAnimation(global::Java.Lang.Object @object, FloatPropertyCompat @property, float finalPosition)
59-
: base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
60-
{
61-
JValue* __args = stackalloc JValue[3];
62-
__args[0] = new JValue(@object);
63-
__args[1] = new JValue(@property);
64-
__args[2] = new JValue(finalPosition);
57+
// [Register(".ctor", JNI_CTOR_2, "")]
58+
// public unsafe SpringAnimation(global::Java.Lang.Object @object, FloatPropertyCompat @property, float finalPosition)
59+
// : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
60+
// {
61+
// JValue* __args = stackalloc JValue[3];
62+
// __args[0] = new JValue(@object);
63+
// __args[1] = new JValue(@property);
64+
// __args[2] = new JValue(finalPosition);
6565

66-
__JniCtorUtil.CtorImpl(this, typeof(SpringAnimation), class_ref, id_ctor_2, JNI_CTOR_2, __args, SetHandle);
67-
}
68-
}
66+
// __JniCtorUtil.CtorImpl(this, typeof(SpringAnimation), class_ref, id_ctor_2, JNI_CTOR_2, __args, SetHandle);
67+
// }
68+
// }
6969

70-
public partial class FlingAnimation
71-
{
72-
private const string JNI_CTOR_1 = "(Ljava/lang/Object;Landroid/support/animation/FloatPropertyCompat;)V";
73-
static IntPtr id_ctor_1;
70+
// public partial class FlingAnimation
71+
// {
72+
// private const string JNI_CTOR_1 = "(Ljava/lang/Object;Landroid/support/animation/FloatPropertyCompat;)V";
73+
// static IntPtr id_ctor_1;
7474

75-
[Register(".ctor", JNI_CTOR_1, "")]
76-
public unsafe FlingAnimation(global::Java.Lang.Object @object, FloatPropertyCompat @property)
77-
: base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
78-
{
79-
JValue* __args = stackalloc JValue[2];
80-
__args[0] = new JValue(@object);
81-
__args[1] = new JValue(@property);
75+
// [Register(".ctor", JNI_CTOR_1, "")]
76+
// public unsafe FlingAnimation(global::Java.Lang.Object @object, FloatPropertyCompat @property)
77+
// : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
78+
// {
79+
// JValue* __args = stackalloc JValue[2];
80+
// __args[0] = new JValue(@object);
81+
// __args[1] = new JValue(@property);
8282

83-
__JniCtorUtil.CtorImpl(this, typeof(FlingAnimation), class_ref, id_ctor_1, JNI_CTOR_1, __args, SetHandle);
84-
}
85-
}
86-
}
83+
// __JniCtorUtil.CtorImpl(this, typeof(FlingAnimation), class_ref, id_ctor_1, JNI_CTOR_1, __args, SetHandle);
84+
// }
85+
// }
86+
// }

0 commit comments

Comments
 (0)