Commit 4020953
committed
Adjust mBiggerTouchSlopSquare to the suitable value
If the scaling factor is larger than 1.0 (i.e. 1.5),
then mTouchSlopSquare(576) is bigger than mBiggerTouchSlopSquare(400).
The double tap condition should be bigger than a single tap's one.
This causes the fail of the following CTS test cases in the device has
over 240 density.
- android.view.cts.GestureDetectorTest
* testOnTouchEvent
- android.view.cts.GestureDetector_SimpleOnGestureListenerTest
* testSimpleOnGestureListener
To fix this issue, I'll add a new public method
ViewConfiguration#getScaledLargeTouchSlop() then the value returned
from that method is used as a slop area of mLargeTouchSlop.
Change-Id: I0e61c13670e1300be1ccf45a89ef89410496fb481 parent a220a29 commit 4020953
File tree
3 files changed
+34
-5
lines changed- api
- core/java/android/view
3 files changed
+34
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190704 | 190704 | | |
190705 | 190705 | | |
190706 | 190706 | | |
| 190707 | + | |
| 190708 | + | |
| 190709 | + | |
| 190710 | + | |
| 190711 | + | |
| 190712 | + | |
| 190713 | + | |
| 190714 | + | |
| 190715 | + | |
| 190716 | + | |
| 190717 | + | |
190707 | 190718 | | |
190708 | 190719 | | |
190709 | 190720 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | 196 | | |
| 197 | + | |
200 | 198 | | |
201 | 199 | | |
202 | 200 | | |
| |||
384 | 382 | | |
385 | 383 | | |
386 | 384 | | |
387 | | - | |
| 385 | + | |
388 | 386 | | |
389 | 387 | | |
390 | 388 | | |
| 389 | + | |
391 | 390 | | |
392 | 391 | | |
393 | 392 | | |
394 | 393 | | |
395 | 394 | | |
396 | 395 | | |
397 | 396 | | |
| 397 | + | |
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| 403 | + | |
403 | 404 | | |
404 | 405 | | |
405 | 406 | | |
| |||
534 | 535 | | |
535 | 536 | | |
536 | 537 | | |
537 | | - | |
| 538 | + | |
538 | 539 | | |
539 | 540 | | |
540 | 541 | | |
| |||
core/java/android/view/ViewConfiguration.java
100644100755Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
| |||
156 | 162 | | |
157 | 163 | | |
158 | 164 | | |
| 165 | + | |
159 | 166 | | |
160 | 167 | | |
161 | 168 | | |
| |||
177 | 184 | | |
178 | 185 | | |
179 | 186 | | |
| 187 | + | |
180 | 188 | | |
181 | 189 | | |
182 | 190 | | |
| |||
206 | 214 | | |
207 | 215 | | |
208 | 216 | | |
| 217 | + | |
209 | 218 | | |
210 | 219 | | |
211 | 220 | | |
| |||
366 | 375 | | |
367 | 376 | | |
368 | 377 | | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
369 | 386 | | |
370 | 387 | | |
371 | 388 | | |
| |||
0 commit comments