String tracker = ctx.getResources().getString(R.string.velocity_tracker_impl);
switch (tracker) {
case NOISY_IMPL:
return NoisyVelocityTracker.obtain();
case PLATFORM_IMPL:
return PlatformVelocityTracker.obtain();
default:
throw new IllegalStateException("Invalid tracker: " + tracker);
}