| | | |
Offset 3, 89 lines modified | Offset 3, 89 lines modified |
3 | .source·"OnContinuousScrollListener.java" | 3 | .source·"OnContinuousScrollListener.java" |
| |
4 | #·interfaces | 4 | #·interfaces |
5 | .implements·Landroid/view/View$OnTouchListener; | 5 | .implements·Landroid/view/View$OnTouchListener; |
| |
| |
6 | #·instance·fields | 6 | #·instance·fields |
7 | .field·private·mHandler:Landroid/os/Handler; | 7 | .field·private·final·mHandler:Landroid/os/Handler; |
| |
8 | .field·private·mInitialDelay:I | 8 | .field·private·final·mInitialDelay:I |
| |
9 | .field·private·mIsLongPressed:Z | 9 | .field·private·mIsLongPressed:Z |
| |
10 | .field·private·final·mOnClickListener:Landroid/view/View$OnClickListener; | 10 | .field·private·final·mOnClickListener:Landroid/view/View$OnClickListener; |
| |
11 | .field·private·mPeriodicRunnable:Ljava/lang/Runnable; | 11 | .field·private·final·mPeriodicRunnable:Ljava/lang/Runnable; |
| |
12 | .field·private·mRepeatInterval:I | 12 | .field·private·final·mRepeatInterval:I |
| |
13 | .field·private·mTouchedView:Landroid/view/View; | 13 | .field·private·mTouchedView:Landroid/view/View; |
| |
| |
14 | #·direct·methods | 14 | #·direct·methods |
15 | .method·public·constructor·<init>(Landroid/content/Context;Landroid/view/View$OnClickListener;)V | 15 | .method·public·constructor·<init>(Landroid/content/Context;Landroid/view/View$OnClickListener;)V |
16 | ····.locals·2 | 16 | ····.locals·2 |
| |
17 | ····.line·66 | 17 | ····.line·64 |
18 | ····invoke-direct·{p0},·Ljava/lang/Object;-><init>()V | 18 | ····invoke-direct·{p0},·Ljava/lang/Object;-><init>()V |
| |
19 | ····.line·37 | 19 | ····.line·37 |
20 | ····new-instance·v0,·Landroid/os/Handler; | 20 | ····new-instance·v0,·Landroid/os/Handler; |
| |
21 | ····invoke-direct·{v0},·Landroid/os/Handler;-><init>()V | 21 | ····invoke-direct·{v0},·Landroid/os/Handler;-><init>()V |
| |
22 | ····iput-object·v0,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mHandler:Landroid/os/Handler; | 22 | ····iput-object·v0,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mHandler:Landroid/os/Handler; |
| |
23 | ····.line·48 | 23 | ····.line·47 |
24 | ····new-instance·v0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener$1; | 24 | ····new-instance·v0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener$1; |
| |
25 | ····invoke-direct·{v0,·p0},·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener$1;-><init>(Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;)V | 25 | ····invoke-direct·{v0,·p0},·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener$1;-><init>(Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;)V |
| |
26 | ····iput-object·v0,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mPeriodicRunnable:Ljava/lang/Runnable; | 26 | ····iput-object·v0,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mPeriodicRunnable:Ljava/lang/Runnable; |
| |
27 | ····.line·67 | 27 | ····.line·65 |
28 | ····invoke-virtual·{p1},·Landroid/content/Context;->getResources()Landroid/content/res/Resources; | 28 | ····invoke-virtual·{p1},·Landroid/content/Context;->getResources()Landroid/content/res/Resources; |
| |
29 | ····move-result-object·v0 | 29 | ····move-result-object·v0 |
| |
30 | ····sget·v1,·Lcom/android/car/ui/R$integer;->car_ui_scrollbar_longpress_initial_delay:I | 30 | ····sget·v1,·Lcom/android/car/ui/R$integer;->car_ui_scrollbar_longpress_initial_delay:I |
| |
31 | ····invoke-virtual·{v0,·v1},·Landroid/content/res/Resources;->getInteger(I)I | 31 | ····invoke-virtual·{v0,·v1},·Landroid/content/res/Resources;->getInteger(I)I |
| |
32 | ····move-result·v0 | 32 | ····move-result·v0 |
| |
33 | ····iput·v0,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mInitialDelay:I | 33 | ····iput·v0,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mInitialDelay:I |
| |
34 | ····.line·70 | 34 | ····.line·67 |
35 | ····invoke-virtual·{p1},·Landroid/content/Context;->getResources()Landroid/content/res/Resources; | 35 | ····invoke-virtual·{p1},·Landroid/content/Context;->getResources()Landroid/content/res/Resources; |
| |
36 | ····move-result-object·p1 | 36 | ····move-result-object·p1 |
| |
37 | ····sget·v0,·Lcom/android/car/ui/R$integer;->car_ui_scrollbar_longpress_repeat_interval:I | 37 | ····sget·v0,·Lcom/android/car/ui/R$integer;->car_ui_scrollbar_longpress_repeat_interval:I |
| |
38 | ····invoke-virtual·{p1,·v0},·Landroid/content/res/Resources;->getInteger(I)I | 38 | ····invoke-virtual·{p1,·v0},·Landroid/content/res/Resources;->getInteger(I)I |
| |
39 | ····move-result·p1 | 39 | ····move-result·p1 |
| |
40 | ····iput·p1,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mRepeatInterval:I | 40 | ····iput·p1,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mRepeatInterval:I |
| |
41 | ····.line·73 | 41 | ····.line·70 |
42 | ····iget·v0,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mInitialDelay:I | 42 | ····iget·v0,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mInitialDelay:I |
| |
43 | ····if-ltz·v0,·:cond_0 | 43 | ····if-ltz·v0,·:cond_0 |
| |
44 | ····if-ltz·p1,·:cond_0 | 44 | ····if-ltz·p1,·:cond_0 |
| |
45 | ····.line·76 | 45 | ····.line·73 |
46 | ····iput-object·p2,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mOnClickListener:Landroid/view/View$OnClickListener; | 46 | ····iput-object·p2,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mOnClickListener:Landroid/view/View$OnClickListener; |
| |
47 | ····return-void | 47 | ····return-void |
| |
48 | ····.line·74 | 48 | ····.line·71 |
49 | ····:cond_0 | 49 | ····:cond_0 |
50 | ····new-instance·p1,·Ljava/lang/IllegalArgumentException; | 50 | ····new-instance·p1,·Ljava/lang/IllegalArgumentException; |
| |
51 | ····const-string·p2,·"negative·intervals·are·not·allowed" | 51 | ····const-string·p2,·"negative·intervals·are·not·allowed" |
| |
52 | ····invoke-direct·{p1,·p2},·Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V | 52 | ····invoke-direct·{p1,·p2},·Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V |
| |
Offset 135, 21 lines modified | Offset 135, 39 lines modified |
135 | ····iput-boolean·p1,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mIsLongPressed:Z | 135 | ····iput-boolean·p1,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mIsLongPressed:Z |
| |
136 | ····return·p1 | 136 | ····return·p1 |
137 | .end·method | 137 | .end·method |
| |
| |
138 | #·virtual·methods | 138 | #·virtual·methods |
| 139 | .method·public·cancelPendingScroll()V |
| 140 | ····.locals·2 |
| |
| 141 | ····.line·81 |
| 142 | ····iget-object·v0,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mHandler:Landroid/os/Handler; |
| |
| 143 | ····iget-object·v1,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mPeriodicRunnable:Ljava/lang/Runnable; |
| |
| 144 | ····invoke-virtual·{v0,·v1},·Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V |
| |
| 145 | ····const/4·v0,·0x0 |
| |
| 146 | ····.line·82 |
| 147 | ····iput-boolean·v0,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mIsLongPressed:Z |
| |
| 148 | ····return-void |
| 149 | .end·method |
| |
139 | .method·public·onTouch(Landroid/view/View;Landroid/view/MotionEvent;)Z | 150 | .method·public·onTouch(Landroid/view/View;Landroid/view/MotionEvent;)Z |
140 | ····.locals·3 | 151 | ····.locals·3 |
| |
141 | ····.line·81 | 152 | ····.line·87 |
142 | ····iput-object·p1,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mTouchedView:Landroid/view/View; | 153 | ····iput-object·p1,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mTouchedView:Landroid/view/View; |
| |
143 | ····.line·82 | 154 | ····.line·88 |
144 | ····invoke-virtual·{p2},·Landroid/view/MotionEvent;->getAction()I | 155 | ····invoke-virtual·{p2},·Landroid/view/MotionEvent;->getAction()I |
| |
145 | ····move-result·p2 | 156 | ····move-result·p2 |
| |
146 | ····const/4·v0,·0x1 | 157 | ····const/4·v0,·0x1 |
| |
147 | ····if-eqz·p2,·:cond_2 | 158 | ····if-eqz·p2,·:cond_2 |
Offset 160, 62 lines modified | Offset 178, 62 lines modified |
| |
160 | ····const/4·v2,·0x3 | 178 | ····const/4·v2,·0x3 |
| |
161 | ····if-eq·p2,·v2,·:cond_0 | 179 | ····if-eq·p2,·v2,·:cond_0 |
| |
162 | ····return·v1 | 180 | ····return·v1 |
| |
163 | ····.line·90 | 181 | ····.line·96 |
164 | ····:cond_0 | 182 | ····:cond_0 |
165 | ····iget-boolean·p2,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mIsLongPressed:Z | 183 | ····iget-boolean·p2,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mIsLongPressed:Z |
| |
166 | ····if-nez·p2,·:cond_1 | 184 | ····if-nez·p2,·:cond_1 |
| |
167 | ····.line·91 | 185 | ····.line·97 |
168 | ····iget-object·p2,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mOnClickListener:Landroid/view/View$OnClickListener; | 186 | ····iget-object·p2,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mOnClickListener:Landroid/view/View$OnClickListener; |
| |
169 | ····invoke-interface·{p2,·p1},·Landroid/view/View$OnClickListener;->onClick(Landroid/view/View;)V | 187 | ····invoke-interface·{p2,·p1},·Landroid/view/View$OnClickListener;->onClick(Landroid/view/View;)V |
| |
170 | ····.line·93 | 188 | ····.line·99 |
171 | ····:cond_1 | 189 | ····:cond_1 |
172 | ····iget-object·p1,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mHandler:Landroid/os/Handler; | 190 | ····iget-object·p1,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mHandler:Landroid/os/Handler; |
| |
173 | ····iget-object·p2,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mPeriodicRunnable:Ljava/lang/Runnable; | 191 | ····iget-object·p2,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mPeriodicRunnable:Ljava/lang/Runnable; |
| |
174 | ····invoke-virtual·{p1,·p2},·Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V | 192 | ····invoke-virtual·{p1,·p2},·Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V |
| |
175 | ····.line·94 | 193 | ····.line·100 |
176 | ····iget-object·p1,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mTouchedView:Landroid/view/View; | 194 | ····iget-object·p1,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mTouchedView:Landroid/view/View; |
| |
177 | ····invoke-virtual·{p1,·v1},·Landroid/view/View;->setPressed(Z)V | 195 | ····invoke-virtual·{p1,·v1},·Landroid/view/View;->setPressed(Z)V |
| |
178 | ····.line·95 | 196 | ····.line·101 |
179 | ····iput-boolean·v1,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mIsLongPressed:Z | 197 | ····iput-boolean·v1,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mIsLongPressed:Z |
| |
180 | ····return·v0 | 198 | ····return·v0 |
| |
181 | ····.line·84 | 199 | ····.line·90 |
182 | ····:cond_2 | 200 | ····:cond_2 |
183 | ····iget-object·p1,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mHandler:Landroid/os/Handler; | 201 | ····iget-object·p1,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mHandler:Landroid/os/Handler; |
| |
184 | ····iget-object·p2,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mPeriodicRunnable:Ljava/lang/Runnable; | 202 | ····iget-object·p2,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mPeriodicRunnable:Ljava/lang/Runnable; |
| |
185 | ····invoke-virtual·{p1,·p2},·Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V | 203 | ····invoke-virtual·{p1,·p2},·Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V |
| |
186 | ····.line·85 | 204 | ····.line·91 |
187 | ····iget-object·p1,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mHandler:Landroid/os/Handler; | 205 | ····iget-object·p1,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mHandler:Landroid/os/Handler; |
| |
188 | ····iget-object·p2,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mPeriodicRunnable:Ljava/lang/Runnable; | 206 | ····iget-object·p2,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mPeriodicRunnable:Ljava/lang/Runnable; |
| |
189 | ····iget·v1,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mInitialDelay:I | 207 | ····iget·v1,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mInitialDelay:I |
| |
190 | ····int-to-long·v1,·v1 | 208 | ····int-to-long·v1,·v1 |
| |
191 | ····invoke-virtual·{p1,·p2,·v1,·v2},·Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z | 209 | ····invoke-virtual·{p1,·p2,·v1,·v2},·Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z |
| |
192 | ····.line·86 | 210 | ····.line·92 |
193 | ····iget-object·p1,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mTouchedView:Landroid/view/View; | 211 | ····iget-object·p1,·p0,·Lcom/android/car/ui/recyclerview/OnContinuousScrollListener;->mTouchedView:Landroid/view/View; |
| |
194 | ····invoke-virtual·{p1,·v0},·Landroid/view/View;->setPressed(Z)V | 212 | ····invoke-virtual·{p1,·v0},·Landroid/view/View;->setPressed(Z)V |
| |
195 | ····return·v0 | 213 | ····return·v0 |
196 | .end·method | 214 | .end·method |