Exemple #1
0
 static void n_BeforeHookedMethod_Lde_robv_android_xposed_XC_MethodHook_MethodHookParam_(IntPtr jnienv, IntPtr native__this, IntPtr native_param)
 {
     global::Xposed.XC_MethodHook __this = global::Java.Lang.Object.GetObject <global::Xposed.XC_MethodHook> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Xposed.XC_MethodHook.MethodHookParam param = global::Java.Lang.Object.GetObject <global::Xposed.XC_MethodHook.MethodHookParam> (native_param, JniHandleOwnership.DoNotTransfer);
     __this.BeforeHookedMethod(param);
 }
        public static unsafe void UnhookMethod(global::Java.Lang.Reflect.IMember hookMethod, global::Xposed.XC_MethodHook @callback)
        {
            const string __id = "unhookMethod.(Ljava/lang/reflect/Member;Lde/robv/android/xposed/XC_MethodHook;)V";

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [2];
                __args [0] = new JniArgumentValue((hookMethod == null) ? IntPtr.Zero : ((global::Java.Lang.Object)hookMethod).Handle);
                __args [1] = new JniArgumentValue((@callback == null) ? IntPtr.Zero : ((global::Java.Lang.Object)@callback).Handle);
                _members.StaticMethods.InvokeVoidMethod(__id, __args);
            } finally {
            }
        }
        public static unsafe global::System.Collections.Generic.ICollection <global::Xposed.XC_MethodHook.Unhook> HookAllMethods(global::Java.Lang.Class hookClass, string methodName, global::Xposed.XC_MethodHook @callback)
        {
            const string __id = "hookAllMethods.(Ljava/lang/Class;Ljava/lang/String;Lde/robv/android/xposed/XC_MethodHook;)Ljava/util/Set;";
            IntPtr       native_methodName = JNIEnv.NewString(methodName);

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [3];
                __args [0] = new JniArgumentValue((hookClass == null) ? IntPtr.Zero : ((global::Java.Lang.Object)hookClass).Handle);
                __args [1] = new JniArgumentValue(native_methodName);
                __args [2] = new JniArgumentValue((@callback == null) ? IntPtr.Zero : ((global::Java.Lang.Object)@callback).Handle);
                var __rm = _members.StaticMethods.InvokeObjectMethod(__id, __args);
                return(global::Android.Runtime.JavaSet <global::Xposed.XC_MethodHook.Unhook> .FromJniHandle(__rm.Handle, JniHandleOwnership.TransferLocalRef));
            } finally {
                JNIEnv.DeleteLocalRef(native_methodName);
            }
        }
        public static unsafe global::Xposed.XC_MethodHook.Unhook HookMethod(global::Java.Lang.Reflect.IMember hookMethod, global::Xposed.XC_MethodHook @callback)
        {
            const string __id = "hookMethod.(Ljava/lang/reflect/Member;Lde/robv/android/xposed/XC_MethodHook;)Lde/robv/android/xposed/XC_MethodHook$Unhook;";

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [2];
                __args [0] = new JniArgumentValue((hookMethod == null) ? IntPtr.Zero : ((global::Java.Lang.Object)hookMethod).Handle);
                __args [1] = new JniArgumentValue((@callback == null) ? IntPtr.Zero : ((global::Java.Lang.Object)@callback).Handle);
                var __rm = _members.StaticMethods.InvokeObjectMethod(__id, __args);
                return(global::Java.Lang.Object.GetObject <global::Xposed.XC_MethodHook.Unhook> (__rm.Handle, JniHandleOwnership.TransferLocalRef));
            } finally {
            }
        }