@Override protected void onBindMethods() { super.onBindMethods(); addMethodProxy(new ReplaceCallingPkgMethodProxy("listen")); addMethodProxy(new ReplaceSequencePkgMethodProxy("listenForSubscriber", 1) { @Override public boolean beforeCall(Object who, Method method, Object... args) { if (android.os.Build.VERSION.SDK_INT >= 17) { if (isFakeLocationEnable()) { for (int i = args.length - 1; i > 0; i--) { if (args[i] instanceof Integer) { int events = (Integer) args[i]; events ^= PhoneStateListener.LISTEN_CELL_INFO; events ^= PhoneStateListener.LISTEN_CELL_LOCATION; args[i] = events; break; } } } } return super.beforeCall(who, method, args); } }); } }
@Override protected void onBindMethods() { super.onBindMethods(); addMethodProxy(new ReplaceCallingPkgMethodProxy("listen")); addMethodProxy(new ReplaceSequencePkgMethodProxy("listenForSubscriber", 1) { @Override public boolean beforeCall(Object who, Method method, Object... args) { if (android.os.Build.VERSION.SDK_INT >= 17) { if (isFakeLocationEnable()) { for (int i = args.length - 1; i > 0; i--) { if (args[i] instanceof Integer) { int events = (Integer) args[i]; events ^= PhoneStateListener.LISTEN_CELL_INFO; events ^= PhoneStateListener.LISTEN_CELL_LOCATION; args[i] = events; break; } } } } return super.beforeCall(who, method, args); } }); } }
@Override protected void onBindMethods() { super.onBindMethods(); addMethodProxy(new ReplaceCallingPkgMethodProxy("listen")); addMethodProxy(new ReplaceSequencePkgMethodProxy("listenForSubscriber", 1) { // 傻逼微信 @Override public Object call(Object who, Method method, Object... args) throws Throwable { return null; } @Override public boolean beforeCall(Object who, Method method, Object... args) { if (android.os.Build.VERSION.SDK_INT >= 17) { if (isFakeLocationEnable()) { for (int i = args.length - 1; i > 0; i--) { if (args[i] instanceof Integer) { int events = (Integer) args[i]; events ^= PhoneStateListener.LISTEN_CELL_INFO; events ^= PhoneStateListener.LISTEN_CELL_LOCATION; args[i] = events; break; } } } } return super.beforeCall(who, method, args); } }); } }