private void _AndroidJavaObject(string className, params object[] args)
{
this.DebugPrint("Creating AndroidJavaObject from " + className);
if (args == null)
args = new object[1];
using (AndroidJavaObject @class = AndroidJavaObject.FindClass(className))
{
this.m_jclass = new GlobalJavaObjectRef(@class.GetRawObject());
jvalue[] jniArgArray = AndroidJNIHelper.CreateJNIArgArray(args);
try
{
IntPtr num = AndroidJNISafe.NewObject((IntPtr) this.m_jclass, AndroidJNIHelper.GetConstructorID((IntPtr) this.m_jclass, args), jniArgArray);
this.m_jobject = new GlobalJavaObjectRef(num);
AndroidJNISafe.DeleteLocalRef(num);
}
finally
{
AndroidJNIHelper.DeleteJNIArgArray(args, jniArgArray);
}
}
}