@Override public Bundle call(MethodBox methodBox, String method, String arg, Bundle extras) throws InvocationTargetException { if (!VClientImpl.get().isBound()) { return methodBox.call(); } int methodType = getMethodType(method); if (METHOD_GET == methodType) { String presetValue = PRE_SET_VALUES.get(arg); if (presetValue != null) { return wrapBundle(arg, presetValue); } if ("android_id".equals(arg)) { return wrapBundle("android_id", VClientImpl.get().getDeviceInfo().androidId); } } if (METHOD_PUT == methodType) { if (isSecureMethod(method)) { return null; } } try { return methodBox.call(); } catch (InvocationTargetException e) { if (e.getCause() instanceof SecurityException) { return null; } throw e; } }
@Override public Bundle call(MethodBox methodBox, String method, String arg, Bundle extras) throws InvocationTargetException { if (!VClientImpl.get().isBound()) { return methodBox.call(); } int methodType = getMethodType(method); if (METHOD_GET == methodType) { String presetValue = PRE_SET_VALUES.get(arg); if (presetValue != null) { return wrapBundle(arg, presetValue); } if ("android_id".equals(arg)) { return wrapBundle("android_id", VClientImpl.get().getDeviceInfo().androidId); } } if (METHOD_PUT == methodType) { if (isSecureMethod(method)) { return null; } } try { return methodBox.call(); } catch (InvocationTargetException e) { if (e.getCause() instanceof SecurityException) { return null; } throw e; } }
@Override public Bundle call(MethodBox methodBox, String method, String arg, Bundle extras) throws InvocationTargetException { if (!VClientImpl.get().isBound()) { return methodBox.call(); } int methodType = getMethodType(method); if (METHOD_GET == methodType) { String presetValue = PRE_SET_VALUES.get(arg); if (presetValue != null) { return wrapBundle(arg, presetValue); } if ("android_id".equals(arg)) { return wrapBundle("android_id", VClientImpl.get().getDeviceInfo().androidId); } } if (METHOD_PUT == methodType) { if (isSecureMethod(method)) { return null; } } try { return methodBox.call(); } catch (InvocationTargetException e) { if (e.getCause() instanceof SecurityException) { return null; } throw e; } }