@Override public Object call(final Object who, Method method, Object... args) throws Throwable { if (Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN) { LocationRequest request = (LocationRequest) args[0]; fixLocationRequest(request); } if (isFakeLocationEnable()) { Object transport = ArrayUtils.getFirst(args, mirror.android.location.LocationManager.ListenerTransport.TYPE); if (transport != null) { Object locationManager = mirror.android.location.LocationManager.ListenerTransport.this$0.get(transport); MockLocationHelper.setGpsStatus(locationManager); GPSListenerThread.get().addListenerTransport(locationManager); } return 0; } return super.call(who, method, args); } }
@Override public Object call(final Object who, Method method, Object... args) throws Throwable { if (Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN) { LocationRequest request = (LocationRequest) args[0]; fixLocationRequest(request); } if (isFakeLocationEnable()) { Object transport = ArrayUtils.getFirst(args, mirror.android.location.LocationManager.ListenerTransport.TYPE); if (transport != null) { Object locationManager = mirror.android.location.LocationManager.ListenerTransport.this$0.get(transport); MockLocationHelper.setGpsStatus(locationManager); GPSListenerThread.get().addListenerTransport(locationManager); } return 0; } return super.call(who, method, args); } }
@Override public Object call(final Object who, Method method, Object... args) throws Throwable { if (Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN) { LocationRequest request = (LocationRequest) args[0]; fixLocationRequest(request); } if (isFakeLocationEnable()) { Object transport = ArrayUtils.getFirst(args, mirror.android.location.LocationManager.ListenerTransport.TYPE); if (transport != null) { Object locationManager = mirror.android.location.LocationManager.ListenerTransport.this$0.get(transport); MockLocationHelper.setGpsStatus(locationManager); GPSListenerThread.get().addListenerTransport(locationManager); } return 0; } return super.call(who, method, args); } }