Offset 3, 75 lines modifiedOffset 3, 92 lines modified
3 .source·"FastScroller.java"3 .source·"FastScroller.java"
  
4 #·interfaces4 #·interfaces
5 .implements·Landroid/view/View$OnTouchListener;5 .implements·Landroid/view/View$OnTouchListener;
  
  
6 #·instance·fields6 #·instance·fields
7 .field·private·mIsDragging:Z7 .field·private·mClickActionThreshold:I
  
8 .field·private·mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;8 .field·private·mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
  
9 .field·private·mScrollThumb:Landroid/view/View;9 .field·private·mScrollThumb:Landroid/view/View;
  
10 .field·private·mScrollTrackView:Landroid/view/View;10 .field·private·mScrollTrackView:Landroid/view/View;
  
11 .field·private·mTouchDownY:F11 .field·private·mTouchDownY:F
  
  
12 #·direct·methods12 #·direct·methods
13 .method·constructor·<init>(Landroidx/recyclerview/widget/RecyclerView;Landroid/view/View;Landroid/view/View;)V13 .method·constructor·<init>(Landroidx/recyclerview/widget/RecyclerView;Landroid/view/View;Landroid/view/View;)V
14 ····.locals·114 ····.locals·1
  
15 ····.line·4615 ····.line·47
16 ····invoke-direct·{p0},·Ljava/lang/Object;-><init>()V16 ····invoke-direct·{p0},·Ljava/lang/Object;-><init>()V
  
17 ····const/high16·v0,·-0x40800000····#·-1.0f17 ····const/high16·v0,·-0x40800000····#·-1.0f
  
18 ····.line·3818 ····.line·39
19 ····iput·v0,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mTouchDownY:F19 ····iput·v0,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mTouchDownY:F
  
20 ····.line·4720 ····.line·48
21 ····iput-object·p1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;21 ····iput-object·p1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
  
22 ····.line·4822 ····.line·49
23 ····iput-object·p2,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollTrackView:Landroid/view/View;23 ····iput-object·p2,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollTrackView:Landroid/view/View;
  
24 ····.line·4924 ····.line·50
25 ····sget·p1,·Lcom/android/car/ui/R$id;->car_ui_scrollbar_thumb:I25 ····sget·p2,·Lcom/android/car/ui/R$id;->car_ui_scrollbar_thumb:I
  
 26 ····invoke-static·{p3,·p2},·Lcom/android/car/ui/utils/CarUiUtils;->requireViewByRefId(Landroid/view/View;I)Landroid/view/View;
  
 27 ····move-result-object·p2
  
 28 ····iput-object·p2,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollThumb:Landroid/view/View;
  
 29 ····.line·52
 30 ····invoke-virtual·{p1},·Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
  
26 ····invoke-static·{p3,·p1},·Lcom/android/car/ui/utils/CarUiUtils;->requireViewByRefId(Landroid/view/View;I)Landroid/view/View;31 ····move-result-object·p1
  
 32 ····.line·51
 33 ····invoke-static·{p1},·Landroid/view/ViewConfiguration;->get(Landroid/content/Context;)Landroid/view/ViewConfiguration;
  
27 ····move-result-object·p134 ····move-result-object·p1
  
28 ····iput-object·p1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollThumb:Landroid/view/View;35 ····.line·52
 36 ····invoke-virtual·{p1},·Landroid/view/ViewConfiguration;->getScaledTouchSlop()I
  
 37 ····move-result·p1
  
 38 ····iput·p1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mClickActionThreshold:I
  
29 ····return-void39 ····return-void
30 .end·method40 .end·method
  
31 .method·private·calculateScrollDistance(F)I41 .method·private·calculateScrollDistance(F)I
32 ····.locals·542 ····.locals·5
  
33 ····.line·10743 ····.line·112
34 ····invoke-direct·{p0},·Lcom/android/car/ui/recyclerview/FastScroller;->getVerticalRange()[I44 ····invoke-direct·{p0},·Lcom/android/car/ui/recyclerview/FastScroller;->getVerticalRange()[I
  
35 ····move-result-object·v045 ····move-result-object·v0
  
36 ····const/4·v1,·0x146 ····const/4·v1,·0x1
  
37 ····.line·10847 ····.line·113
38 ····aget·v1,·v0,·v148 ····aget·v1,·v0,·v1
  
39 ····const/4·v2,·0x049 ····const/4·v2,·0x0
  
40 ····aget·v0,·v0,·v250 ····aget·v0,·v0,·v2
  
41 ····sub-int/2addr·v1,·v051 ····sub-int/2addr·v1,·v0
  
42 ····.line·11052 ····.line·115
43 ····iget-object·v0,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollThumb:Landroid/view/View;53 ····iget-object·v0,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollThumb:Landroid/view/View;
  
44 ····invoke-virtual·{v0},·Landroid/view/View;->getY()F54 ····invoke-virtual·{v0},·Landroid/view/View;->getY()F
  
45 ····move-result·v055 ····move-result·v0
  
46 ····iget-object·v3,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollThumb:Landroid/view/View;56 ····iget-object·v3,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollThumb:Landroid/view/View;
Offset 95, 18 lines modifiedOffset 112, 18 lines modified
95 ····:cond_0112 ····:cond_0
96 ····sub-float/2addr·p1,·v0113 ····sub-float/2addr·p1,·v0
  
97 ····int-to-float·v0,·v1114 ····int-to-float·v0,·v1
  
98 ····div-float/2addr·p1,·v0115 ····div-float/2addr·p1,·v0
  
99 ····.line·117116 ····.line·122
100 ····iget-object·v0,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;117 ····iget-object·v0,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
  
101 ····.line·118118 ····.line·123
102 ····invoke-virtual·{v0},·Landroidx/recyclerview/widget/RecyclerView;->computeVerticalScrollRange()I119 ····invoke-virtual·{v0},·Landroidx/recyclerview/widget/RecyclerView;->computeVerticalScrollRange()I
  
103 ····move-result·v0120 ····move-result·v0
  
104 ····iget-object·v1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;121 ····iget-object·v1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
  
105 ····invoke-virtual·{v1},·Landroid/view/ViewGroup;->getHeight()I122 ····invoke-virtual·{v1},·Landroid/view/ViewGroup;->getHeight()I
Offset 117, 28 lines modifiedOffset 134, 14 lines modified
  
117 ····int-to-float·v0,·v0134 ····int-to-float·v0,·v0
  
118 ····mul-float/2addr·p1,·v0135 ····mul-float/2addr·p1,·v0
  
119 ····float-to-int·p1,·p1136 ····float-to-int·p1,·p1
  
120 ····.line·120 
121 ····iget-object·v0,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView; 
  
122 ····invoke-virtual·{v0},·Landroidx/recyclerview/widget/RecyclerView;->computeVerticalScrollOffset()I 
  
123 ····move-result·v0 
  
124 ····add-int/2addr·v0,·p1 
  
125 ····if-gez·v0,·:cond_1 
  
126 ····return·v2 
  
127 ····:cond_1 
128 ····return·p1137 ····return·p1
129 .end·method138 .end·method
  
130 .method·private·getVerticalRange()[I139 .method·private·getVerticalRange()[I
131 ····.locals·4140 ····.locals·4
  
132 ····const/4·v0,·0x2141 ····const/4·v0,·0x2
Offset 199, 25 lines modifiedOffset 202, 54 lines modified
199 ····const/4·v0,·0x1202 ····const/4·v0,·0x1
  
200 ····aput·v2,·v1,·v0203 ····aput·v2,·v1,·v0
  
201 ····return-object·v1204 ····return-object·v1
202 .end·method205 .end·method
  
 206 .method·private·isClick(FF)Z
 207 ····.locals·0
  
 208 ····sub-float/2addr·p1,·p2
  
 209 ····.line·101
 210 ····invoke-static·{p1},·Ljava/lang/Math;->abs(F)F
  
 211 ····move-result·p1
  
 212 ····iget·p2,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mClickActionThreshold:I
  
 213 ····int-to-float·p2,·p2
  
 214 ····cmpg-float·p1,·p1,·p2
  
 215 ····if-gez·p1,·:cond_0
  
 216 ····const/4·p1,·0x1
  
 217 ····goto·:goto_0
  
 218 ····:cond_0
 219 ····const/4·p1,·0x0
  
 220 ····:goto_0
 221 ····return·p1
 222 .end·method
  
203 .method·private·verticalScrollTo(F)V223 .method·private·verticalScrollTo(F)V
204 ····.locals·2224 ····.locals·2
  
205 ····.line·100225 ····.line·105
206 ····invoke-direct·{p0,·p1},·Lcom/android/car/ui/recyclerview/FastScroller;->calculateScrollDistance(F)I226 ····invoke-direct·{p0,·p1},·Lcom/android/car/ui/recyclerview/FastScroller;->calculateScrollDistance(F)I
  
207 ····move-result·p1227 ····move-result·p1
  
208 ····if-eqz·p1,·:cond_0228 ····if-eqz·p1,·:cond_0
  
209 ····.line·102229 ····.line·107
210 ····iget-object·v0,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;230 ····iget-object·v0,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
  
211 ····const/4·v1,·0x0231 ····const/4·v1,·0x0
  
212 ····invoke-virtual·{v0,·v1,·p1},·Landroidx/recyclerview/widget/RecyclerView;->scrollBy(II)V232 ····invoke-virtual·{v0,·v1,·p1},·Landroidx/recyclerview/widget/RecyclerView;->scrollBy(II)V
  
213 ····:cond_0233 ····:cond_0
Offset 225, 76 lines modifiedOffset 257, 82 lines modified
225 .end·method257 .end·method
  
  
226 #·virtual·methods258 #·virtual·methods
227 .method·enable()V259 .method·enable()V
228 ····.locals·1260 ····.locals·1
  
229 ····.line·53261 ····.line·56
230 ····iget-object·v0,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;262 ····iget-object·v0,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
  
231 ····if-eqz·v0,·:cond_0263 ····if-eqz·v0,·:cond_0
  
232 ····.line·54264 ····.line·57
233 ····iget-object·v0,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollTrackView:Landroid/view/View;265 ····iget-object·v0,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollTrackView:Landroid/view/View;
  
234 ····invoke-virtual·{v0,·p0},·Landroid/view/View;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V266 ····invoke-virtual·{v0,·p0},·Landroid/view/View;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V
  
235 ····:cond_0267 ····:cond_0
236 ····return-void268 ····return-void
237 .end·method269 .end·method
  
238 .method·public·onTouch(Landroid/view/View;Landroid/view/MotionEvent;)Z270 .method·public·onTouch(Landroid/view/View;Landroid/view/MotionEvent;)Z
239 ····.locals·3271 ····.locals·3
  
240 ····.line·60272 ····.line·63
241 ····invoke-virtual·{p2},·Landroid/view/MotionEvent;->getAction()I273 ····invoke-virtual·{p2},·Landroid/view/MotionEvent;->getAction()I
  
242 ····move-result·p1274 ····move-result·p1
  
243 ····const/4·v0,·0x1275 ····const/4·v0,·0x1
  
244 ····if-eqz·p1,·:cond_3276 ····if-eqz·p1,·:cond_4
  
245 ····const/4·v1,·0x2277 ····const/4·v1,·0x2
  
246 ····if-eq·p1,·v1,·:cond_0278 ····if-eq·p1,·v1,·:cond_1
  
247 ····const/high16·p1,·-0x40800000····#·-1.0f279 ····.line·89
 280 ····iget·p1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mTouchDownY:F
  
 281 ····invoke-virtual·{p2},·Landroid/view/MotionEvent;->getY()F
248 ····.line·88 
249 ····iput·p1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mTouchDownY:F 
  
250 ····.line·92 
251 ····iget-boolean·p1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mIsDragging:Z282 ····move-result·v1
  
 283 ····invoke-direct·{p0,·p1,·v1},·Lcom/android/car/ui/recyclerview/FastScroller;->isClick(FF)Z
  
 284 ····move-result·p1
  
252 ····if-nez·p1,·:cond_4285 ····if-eqz·p1,·:cond_0
  
253 ····.line·93286 ····.line·90
254 ····invoke-virtual·{p2},·Landroid/view/MotionEvent;->getY()F287 ····invoke-virtual·{p2},·Landroid/view/MotionEvent;->getY()F
  
255 ····move-result·p1288 ····move-result·p1
  
256 ····iget-object·p2,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollTrackView:Landroid/view/View;289 ····iget-object·p2,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollTrackView:Landroid/view/View;
  
257 ····invoke-virtual·{p2},·Landroid/view/View;->getY()F290 ····invoke-virtual·{p2},·Landroid/view/View;->getY()F
  
258 ····move-result·p2291 ····move-result·p2
  
259 ····add-float/2addr·p1,·p2292 ····add-float/2addr·p1,·p2
  
260 ····invoke-direct·{p0,·p1},·Lcom/android/car/ui/recyclerview/FastScroller;->verticalScrollTo(F)V293 ····invoke-direct·{p0,·p1},·Lcom/android/car/ui/recyclerview/FastScroller;->verticalScrollTo(F)V
  
261 ····goto·:goto_1 
  
262 ····.line·66 
263 ····:cond_0294 ····:cond_0
 295 ····const/high16·p1,·-0x40800000····#·-1.0f
  
 296 ····.line·92
264 ····iput-boolean·v0,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mIsDragging:Z297 ····iput·p1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mTouchDownY:F
  
 298 ····goto·:goto_1
  
265 ····.line·67299 ····.line·68
 300 ····:cond_1
266 ····iget-object·p1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollThumb:Landroid/view/View;301 ····iget-object·p1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollThumb:Landroid/view/View;
  
267 ····invoke-virtual·{p1},·Landroid/view/View;->getY()F302 ····invoke-virtual·{p1},·Landroid/view/View;->getY()F
  
268 ····move-result·p1303 ····move-result·p1
  
269 ····iget-object·v1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollThumb:Landroid/view/View;304 ····iget-object·v1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollThumb:Landroid/view/View;
Offset 303, 32 lines modifiedOffset 341, 32 lines modified
  
303 ····move-result·v1341 ····move-result·v1
  
304 ····int-to-float·v1,·v1342 ····int-to-float·v1,·v1
  
305 ····add-float/2addr·p1,·v1343 ····add-float/2addr·p1,·v1
  
306 ····.line·70344 ····.line·71
307 ····invoke-virtual·{p2},·Landroid/view/MotionEvent;->getY()F345 ····invoke-virtual·{p2},·Landroid/view/MotionEvent;->getY()F
  
308 ····move-result·v1346 ····move-result·v1
  
309 ····iget-object·v2,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollTrackView:Landroid/view/View;347 ····iget-object·v2,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollTrackView:Landroid/view/View;
  
310 ····invoke-virtual·{v2},·Landroid/view/View;->getY()F348 ····invoke-virtual·{v2},·Landroid/view/View;->getY()F
  
311 ····move-result·v2349 ····move-result·v2
  
312 ····add-float/2addr·v1,·v2350 ····add-float/2addr·v1,·v2
  
313 ····cmpg-float·p1,·v1,·p1351 ····cmpg-float·p1,·v1,·p1
  
314 ····if-gez·p1,·:cond_2352 ····if-gez·p1,·:cond_3
  
315 ····.line·71353 ····.line·72
316 ····invoke-virtual·{p2},·Landroid/view/MotionEvent;->getY()F354 ····invoke-virtual·{p2},·Landroid/view/MotionEvent;->getY()F
  
317 ····move-result·p1355 ····move-result·p1
  
318 ····iget-object·v1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollTrackView:Landroid/view/View;356 ····iget-object·v1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollTrackView:Landroid/view/View;
  
319 ····invoke-virtual·{v1},·Landroid/view/View;->getY()F357 ····invoke-virtual·{v1},·Landroid/view/View;->getY()F
Offset 341, 20 lines modifiedOffset 379, 20 lines modified
  
341 ····invoke-virtual·{v1},·Landroid/view/View;->getY()F379 ····invoke-virtual·{v1},·Landroid/view/View;->getY()F
  
342 ····move-result·v1380 ····move-result·v1
  
343 ····cmpl-float·p1,·p1,·v1381 ····cmpl-float·p1,·p1,·v1
  
344 ····if-gtz·p1,·:cond_1382 ····if-gtz·p1,·:cond_2
  
345 ····goto·:goto_0383 ····goto·:goto_0
  
346 ····.line·76384 ····.line·77
347 ····:cond_1385 ····:cond_2
348 ····iget-object·p1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollThumb:Landroid/view/View;386 ····iget-object·p1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollThumb:Landroid/view/View;
  
349 ····invoke-virtual·{p1},·Landroid/view/View;->getY()F387 ····invoke-virtual·{p1},·Landroid/view/View;->getY()F
  
350 ····move-result·p1388 ····move-result·p1
  
351 ····iget-object·v1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollThumb:Landroid/view/View;389 ····iget-object·v1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mScrollThumb:Landroid/view/View;
Offset 367, 50 lines modifiedOffset 405, 44 lines modified
  
367 ····const/high16·v2,·0x40000000····#·2.0f405 ····const/high16·v2,·0x40000000····#·2.0f
  
368 ····div-float/2addr·v1,·v2406 ····div-float/2addr·v1,·v2
  
369 ····add-float/2addr·p1,·v1407 ····add-float/2addr·p1,·v1
  
370 ····.line·83408 ····.line·84
371 ····invoke-virtual·{p2},·Landroid/view/MotionEvent;->getY()F409 ····invoke-virtual·{p2},·Landroid/view/MotionEvent;->getY()F
  
372 ····move-result·v1410 ····move-result·v1
  
373 ····iget·v2,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mTouchDownY:F411 ····iget·v2,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mTouchDownY:F
  
374 ····sub-float/2addr·v1,·v2412 ····sub-float/2addr·v1,·v2
  
375 ····add-float/2addr·p1,·v1413 ····add-float/2addr·p1,·v1
  
376 ····invoke-direct·{p0,·p1},·Lcom/android/car/ui/recyclerview/FastScroller;->verticalScrollTo(F)V414 ····invoke-direct·{p0,·p1},·Lcom/android/car/ui/recyclerview/FastScroller;->verticalScrollTo(F)V
  
377 ····.line·84415 ····.line·85
378 ····invoke-virtual·{p2},·Landroid/view/MotionEvent;->getY()F416 ····invoke-virtual·{p2},·Landroid/view/MotionEvent;->getY()F
  
379 ····move-result·p1417 ····move-result·p1
  
380 ····iput·p1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mTouchDownY:F418 ····iput·p1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mTouchDownY:F
  
381 ····goto·:goto_1419 ····goto·:goto_1
  
382 ····:cond_2420 ····:cond_3
383 ····:goto_0421 ····:goto_0
384 ····return·v0422 ····return·v0
  
385 ····.line·62423 ····.line·65
386 ····:cond_3424 ····:cond_4
387 ····invoke-virtual·{p2},·Landroid/view/MotionEvent;->getY()F425 ····invoke-virtual·{p2},·Landroid/view/MotionEvent;->getY()F
  
388 ····move-result·p1426 ····move-result·p1
  
389 ····iput·p1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mTouchDownY:F427 ····iput·p1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mTouchDownY:F
  
390 ····const/4·p1,·0x0 
  
391 ····.line·63 
392 ····iput-boolean·p1,·p0,·Lcom/android/car/ui/recyclerview/FastScroller;->mIsDragging:Z 
  
393 ····:cond_4 
394 ····:goto_1428 ····:goto_1
395 ····return·v0429 ····return·v0
396 .end·method430 .end·method