FileDocCategorySizeDatePackage
VelocityTrackerFactory.javaAPI DocAndroid 5.1 API1503Thu Mar 12 22:22:42 GMT 2015com.android.systemui.statusbar.phone

VelocityTrackerFactory

public class VelocityTrackerFactory extends Object
A class to generate {@link VelocityTrackerInterface}, depending on the configuration.

Fields Summary
public static final String
PLATFORM_IMPL
public static final String
NOISY_IMPL
Constructors Summary
Methods Summary
public static VelocityTrackerInterfaceobtain(android.content.Context ctx)


         
        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);
        }