Home | History | Annotate | Download | only in input

Lines Matching full:strategy

102 // The default velocity tracker strategy.
104 // this is the strategy that applications will actually use. Be very careful
105 // when adjusting the default strategy because it can dramatically affect
109 VelocityTracker::VelocityTracker(const char* strategy) :
113 // Allow the default strategy to be overridden using a system property for debugging.
114 if (!strategy) {
115 int length = property_get("debug.velocitytracker.strategy", value, NULL);
117 strategy = value;
119 strategy = DEFAULT_STRATEGY;
123 // Configure the strategy.
124 if (!configureStrategy(strategy)) {
125 ALOGD("Unrecognized velocity tracker strategy name '%s'.", strategy);
127 LOG_ALWAYS_FATAL("Could not create the default velocity tracker strategy '%s'!",
128 strategy);
137 bool VelocityTracker::configureStrategy(const char* strategy) {
138 mStrategy = createStrategy(strategy);
142 VelocityTrackerStrategy* VelocityTracker::createStrategy(const char* strategy) {
143 if (!strcmp("lsq1", strategy)) {
150 if (!strcmp("lsq2", strategy)) {
157 if (!strcmp("lsq3", strategy)) {
163 if (!strcmp("wlsq2-delta", strategy)) {
168 if (!strcmp("wlsq2-central", strategy)) {
173 if (!strcmp("wlsq2-recent", strategy)) {
178 if (!strcmp("int1", strategy)) {
181 // more tolerant of errors. Like 'lsq1', this strategy tends to underestimate
182 // the velocity of a fling but this strategy tends to respond to changes in
186 if (!strcmp("int2", strategy)) {
188 // For comparison purposes only. Unlike 'int1' this strategy can compensate
192 if (!strcmp("legacy", strategy)) {