Home | History | Annotate | Download | only in androidfw

Lines Matching refs:strategy

103 // The default velocity tracker strategy.
105 // this is the strategy that applications will actually use. Be very careful
106 // when adjusting the default strategy because it can dramatically affect
110 VelocityTracker::VelocityTracker(const char* strategy) :
114 // Allow the default strategy to be overridden using a system property for debugging.
115 if (!strategy) {
116 int length = property_get("debug.velocitytracker.strategy", value, NULL);
118 strategy = value;
120 strategy = DEFAULT_STRATEGY;
124 // Configure the strategy.
125 if (!configureStrategy(strategy)) {
126 ALOGD("Unrecognized velocity tracker strategy name '%s'.", strategy);
128 LOG_ALWAYS_FATAL("Could not create the default velocity tracker strategy '%s'!",
129 strategy);
138 bool VelocityTracker::configureStrategy(const char* strategy) {
139 mStrategy = createStrategy(strategy);
143 VelocityTrackerStrategy* VelocityTracker::createStrategy(const char* strategy) {
144 if (!strcmp("lsq1", strategy)) {
151 if (!strcmp("lsq2", strategy)) {
158 if (!strcmp("lsq3", strategy)) {
164 if (!strcmp("wlsq2-delta", strategy)) {
169 if (!strcmp("wlsq2-central", strategy)) {
174 if (!strcmp("wlsq2-recent", strategy)) {
179 if (!strcmp("int1", strategy)) {
182 // more tolerant of errors. Like 'lsq1', this strategy tends to underestimate
183 // the velocity of a fling but this strategy tends to respond to changes in
187 if (!strcmp("int2", strategy)) {
189 // For comparison purposes only. Unlike 'int1' this strategy can compensate
193 if (!strcmp("legacy", strategy)) {