Offset 1, 156 lines modifiedOffset 1, 515 lines modified
1 .class·public·Lcom/android/car/ui/FocusParkingView;1 .class·public·Lcom/android/car/ui/FocusParkingView;
2 .super·Landroid/view/View;2 .super·Landroid/view/View;
3 .source·"FocusParkingView.java"3 .source·"FocusParkingView.java"
  
  
 4 #·instance·fields
 5 .field·private·mFocusedView:Landroid/view/View;
  
 6 .field·mScrollableContainer:Landroid/view/ViewGroup;
  
 7 .field·private·mShouldRestoreFocus:Z
  
  
4 #·direct·methods8 #·direct·methods
5 .method·public·constructor·<init>(Landroid/content/Context;)V9 .method·public·constructor·<init>(Landroid/content/Context;)V
6 ····.locals·010 ····.locals·1
  
7 ····.line·5411 ····.line·88
8 ····invoke-direct·{p0,·p1},·Landroid/view/View;-><init>(Landroid/content/Context;)V12 ····invoke-direct·{p0,·p1},·Landroid/view/View;-><init>(Landroid/content/Context;)V
  
 13 ····const/4·v0,·0x0
  
9 ····.line·5514 ····.line·89
10 ····invoke-direct·{p0},·Lcom/android/car/ui/FocusParkingView;->init()V15 ····invoke-direct·{p0,·p1,·v0},·Lcom/android/car/ui/FocusParkingView;->init(Landroid/content/Context;Landroid/util/AttributeSet;)V
  
11 ····return-void16 ····return-void
12 .end·method17 .end·method
  
13 .method·public·constructor·<init>(Landroid/content/Context;Landroid/util/AttributeSet;)V18 .method·public·constructor·<init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
14 ····.locals·019 ····.locals·0
  
15 ····.line·5920 ····.line·93
16 ····invoke-direct·{p0,·p1,·p2},·Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V21 ····invoke-direct·{p0,·p1,·p2},·Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
  
17 ····.line·6022 ····.line·94
18 ····invoke-direct·{p0},·Lcom/android/car/ui/FocusParkingView;->init()V23 ····invoke-direct·{p0,·p1,·p2},·Lcom/android/car/ui/FocusParkingView;->init(Landroid/content/Context;Landroid/util/AttributeSet;)V
  
19 ····return-void24 ····return-void
20 .end·method25 .end·method
  
21 .method·public·constructor·<init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V26 .method·public·constructor·<init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
22 ····.locals·027 ····.locals·0
  
23 ····.line·6428 ····.line·98
24 ····invoke-direct·{p0,·p1,·p2,·p3},·Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V29 ····invoke-direct·{p0,·p1,·p2,·p3},·Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
  
25 ····.line·6530 ····.line·99
26 ····invoke-direct·{p0},·Lcom/android/car/ui/FocusParkingView;->init()V31 ····invoke-direct·{p0,·p1,·p2},·Lcom/android/car/ui/FocusParkingView;->init(Landroid/content/Context;Landroid/util/AttributeSet;)V
  
27 ····return-void32 ····return-void
28 .end·method33 .end·method
  
29 .method·public·constructor·<init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V34 .method·public·constructor·<init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V
30 ····.locals·035 ····.locals·0
  
31 ····.line·7036 ····.line·104
32 ····invoke-direct·{p0,·p1,·p2,·p3,·p4},·Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V37 ····invoke-direct·{p0,·p1,·p2,·p3,·p4},·Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V
  
33 ····.line·7138 ····.line·105
34 ····invoke-direct·{p0},·Lcom/android/car/ui/FocusParkingView;->init()V39 ····invoke-direct·{p0,·p1,·p2},·Lcom/android/car/ui/FocusParkingView;->init(Landroid/content/Context;Landroid/util/AttributeSet;)V
  
35 ····return-void40 ····return-void
36 .end·method41 .end·method
  
37 .method·private·init()V42 .method·private·init(Landroid/content/Context;Landroid/util/AttributeSet;)V
38 ····.locals·243 ····.locals·2
  
39 ····const/4·v0,·0x144 ····const/4·v0,·0x1
  
 45 ····if-eqz·p2,·:cond_0
  
 46 ····.line·110
 47 ····sget-object·v1,·Lcom/android/car/ui/R$styleable;->FocusParkingView:[I
  
 48 ····invoke-virtual·{p1,·p2,·v1},·Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;
  
 49 ····move-result-object·p1
  
 50 ····.line·111
 51 ····sget·p2,·Lcom/android/car/ui/R$styleable;->FocusParkingView_shouldRestoreFocus:I
  
 52 ····invoke-virtual·{p1,·p2,·v0},·Landroid/content/res/TypedArray;->getBoolean(IZ)Z
  
 53 ····move-result·p1
  
 54 ····iput-boolean·p1,·p0,·Lcom/android/car/ui/FocusParkingView;->mShouldRestoreFocus:Z
  
40 ····.line·7655 ····.line·116
 56 ····:cond_0
41 ····invoke-virtual·{p0,·v0},·Landroid/view/View;->setFocusable(I)V57 ····invoke-virtual·{p0,·v0},·Landroid/view/View;->setFocusable(I)V
  
42 ····const/4·v1,·0x058 ····const/4·p1,·0x0
  
43 ····.line·7759 ····.line·117
44 ····invoke-virtual·{p0,·v1},·Landroid/view/View;->setVisibility(I)V60 ····invoke-virtual·{p0,·p1},·Landroid/view/View;->setVisibility(I)V
  
45 ····.line·7861 ····.line·118
46 ····invoke-virtual·{p0,·v0},·Landroid/view/View;->setEnabled(Z)V62 ····invoke-virtual·{p0,·v0},·Landroid/view/View;->setEnabled(Z)V
  
47 ····.line·8263 ····.line·122
48 ····invoke-virtual·{p0,·v1},·Landroid/view/View;->setClickable(Z)V64 ····invoke-virtual·{p0,·p1},·Landroid/view/View;->setClickable(Z)V
  
49 ····const/4·v0,·0x065 ····const/4·p2,·0x0
  
 66 ····.line·125
 67 ····invoke-virtual·{p0,·p2},·Landroid/view/View;->setAlpha(F)V
  
50 ····.line·8568 ····.line·128
51 ····invoke-virtual·{p0,·v0},·Landroid/view/View;->setAlpha(F)V69 ····invoke-virtual·{p0,·p1},·Landroid/view/View;->setDefaultFocusHighlightEnabled(Z)V
  
52 ····.line·8870 ····.line·131
53 ····invoke-virtual·{p0,·v1},·Landroid/view/View;->setDefaultFocusHighlightEnabled(Z)V71 ····invoke-virtual·{p0},·Landroid/view/View;->getViewTreeObserver()Landroid/view/ViewTreeObserver;
  
 72 ····move-result-object·p1
  
 73 ····new-instance·p2,·Lcom/android/car/ui/-$$Lambda$FocusParkingView$MzDKoOQQO5vfiynbg4DKSNThxoI;
  
 74 ····invoke-direct·{p2,·p0},·Lcom/android/car/ui/-$$Lambda$FocusParkingView$MzDKoOQQO5vfiynbg4DKSNThxoI;-><init>(Lcom/android/car/ui/FocusParkingView;)V
  
 75 ····invoke-virtual·{p1,·p2},·Landroid/view/ViewTreeObserver;->addOnGlobalFocusChangeListener(Landroid/view/ViewTreeObserver$OnGlobalFocusChangeListener;)V
  
 76 ····return-void
 77 .end·method
  
 78 .method·private·synthetic·lambda$init$0(Landroid/view/View;Landroid/view/View;)V
 79 ····.locals·0
  
 80 ····.line·132
 81 ····instance-of·p1,·p2,·Lcom/android/car/ui/FocusParkingView;
  
 82 ····if-eqz·p1,·:cond_0
  
 83 ····const/4·p2,·0x0
  
 84 ····:cond_0
 85 ····iput-object·p2,·p0,·Lcom/android/car/ui/FocusParkingView;->mFocusedView:Landroid/view/View;
  
 86 ····.line·133
 87 ····invoke-static·{p2},·Lcom/android/car/ui/utils/ViewUtils;->getAncestorScrollableContainer(Landroid/view/View;)Landroid/view/ViewGroup;
  
 88 ····move-result-object·p1
  
 89 ····iput-object·p1,·p0,·Lcom/android/car/ui/FocusParkingView;->mScrollableContainer:Landroid/view/ViewGroup;
  
54 ····return-void90 ····return-void
55 .end·method91 .end·method
  
 92 .method·private·maybeFocusOnScrollableContainer()Z
 93 ····.locals·3
  
 94 ····.line·247
 95 ····iget-object·v0,·p0,·Lcom/android/car/ui/FocusParkingView;->mFocusedView:Landroid/view/View;
  
 96 ····if-eqz·v0,·:cond_2
  
 97 ····invoke-virtual·{v0},·Landroid/view/View;->isAttachedToWindow()Z
  
 98 ····move-result·v0
  
 99 ····if-nez·v0,·:cond_2
  
 100 ····iget-object·v0,·p0,·Lcom/android/car/ui/FocusParkingView;->mFocusedView:Landroid/view/View;
  
 101 ····.line·248
 102 ····invoke-virtual·{v0},·Landroid/view/View;->getParent()Landroid/view/ViewParent;
  
 103 ····move-result-object·v0
  
 104 ····if-eqz·v0,·:cond_2
  
 105 ····iget-object·v0,·p0,·Lcom/android/car/ui/FocusParkingView;->mScrollableContainer:Landroid/view/ViewGroup;
  
 106 ····if-eqz·v0,·:cond_2
  
 107 ····.line·249
 108 ····invoke-virtual·{v0},·Landroid/view/ViewGroup;->isAttachedToWindow()Z
  
 109 ····move-result·v0
  
 110 ····if-eqz·v0,·:cond_2
  
 111 ····iget-object·v0,·p0,·Lcom/android/car/ui/FocusParkingView;->mScrollableContainer:Landroid/view/ViewGroup;
  
 112 ····invoke-virtual·{v0},·Landroid/view/ViewGroup;->isShown()Z
  
 113 ····move-result·v0
  
 114 ····if-eqz·v0,·:cond_2
  
 115 ····.line·250
 116 ····iget-object·v0,·p0,·Lcom/android/car/ui/FocusParkingView;->mScrollableContainer:Landroid/view/ViewGroup;
  
 117 ····instance-of·v1,·v0,·Landroidx/recyclerview/widget/RecyclerView;
  
 118 ····if-eqz·v1,·:cond_0
  
 119 ····.line·251
 120 ····check-cast·v0,·Landroidx/recyclerview/widget/RecyclerView;
  
 121 ····goto·:goto_0
  
 122 ····:cond_0
 123 ····const/4·v0,·0x0
  
 124 ····.line·253
 125 ····:goto_0
 126 ····iget-object·v1,·p0,·Lcom/android/car/ui/FocusParkingView;->mScrollableContainer:Landroid/view/ViewGroup;
  
 127 ····invoke-virtual·{v1},·Landroid/view/ViewGroup;->requestFocus()Z
  
 128 ····move-result·v1
  
 129 ····if-eqz·v1,·:cond_2
  
 130 ····if-eqz·v0,·:cond_1
  
 131 ····.line·254
 132 ····invoke-virtual·{v0},·Landroidx/recyclerview/widget/RecyclerView;->isComputingLayout()Z
  
 133 ····move-result·v1
  
 134 ····if-eqz·v1,·:cond_1
  
 135 ····.line·258
 136 ····invoke-virtual·{p0},·Landroid/view/View;->getViewTreeObserver()Landroid/view/ViewTreeObserver;
  
 137 ····move-result-object·v1
  
 138 ····new-instance·v2,·Lcom/android/car/ui/FocusParkingView$1;
  
 139 ····invoke-direct·{v2,·p0,·v0},·Lcom/android/car/ui/FocusParkingView$1;-><init>(Lcom/android/car/ui/FocusParkingView;Landroidx/recyclerview/widget/RecyclerView;)V
  
 140 ····invoke-virtual·{v1,·v2},·Landroid/view/ViewTreeObserver;->addOnGlobalLayoutListener(Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;)V
  
 141 ····:cond_1
 142 ····const/4·v0,·0x1
  
 143 ····return·v0
  
 144 ····:cond_2
 145 ····const/4·v0,·0x0
  
 146 ····return·v0
 147 .end·method
  
 148 .method·private·restoreFocusInRoot(Z)Z
 149 ····.locals·2
  
 150 ····if-eqz·p1,·:cond_0
  
 151 ····.line·223
 152 ····invoke-virtual·{p0},·Landroid/view/View;->isInTouchMode()Z
  
 153 ····move-result·p1
  
 154 ····if-eqz·p1,·:cond_0
  
 155 ····const/4·p1,·0x0
  
 156 ····return·p1
  
 157 ····.line·229
 158 ····:cond_0
 159 ····invoke-direct·{p0},·Lcom/android/car/ui/FocusParkingView;->maybeFocusOnScrollableContainer()Z
  
 160 ····move-result·p1
  
 161 ····const/4·v0,·0x1
  
 162 ····if-eqz·p1,·:cond_1
  
 163 ····return·v0
  
 164 ····.line·233
 165 ····:cond_1
 166 ····invoke-virtual·{p0},·Landroid/view/View;->getRootView()Landroid/view/View;
  
 167 ····move-result-object·p1
  
 168 ····const/4·v1,·0x0
  
 169 ····invoke-static·{p1,·v1},·Lcom/android/car/ui/utils/ViewUtils;->adjustFocus(Landroid/view/View;Landroid/view/View;)Z
  
 170 ····move-result·p1
  
 171 ····if-eqz·p1,·:cond_2
  
 172 ····return·v0
  
 173 ····:cond_2
 174 ····const/16·p1,·0x82
  
 175 ····.line·238
 176 ····invoke-super·{p0,·p1,·v1},·Landroid/view/View;->requestFocus(ILandroid/graphics/Rect;)Z
  
 177 ····move-result·p1
  
 178 ····return·p1
 179 .end·method
  
  
56 #·virtual·methods180 #·virtual·methods
57 .method·public·getAccessibilityClassName()Ljava/lang/CharSequence;181 .method·public·getAccessibilityClassName()Ljava/lang/CharSequence;
58 ····.locals·1182 ····.locals·1
  
59 ····.line·114183 ····.line·169
60 ····const-class·v0,·Lcom/android/car/ui/FocusParkingView;184 ····const-class·v0,·Lcom/android/car/ui/FocusParkingView;
  
61 ····invoke-virtual·{v0},·Ljava/lang/Class;->getName()Ljava/lang/String;185 ····invoke-virtual·{v0},·Ljava/lang/Class;->getName()Ljava/lang/String;
  
62 ····move-result-object·v0186 ····move-result-object·v0
  
63 ····return-object·v0187 ····return-object·v0
64 .end·method188 .end·method
  
 189 .method·public·synthetic·lambda$init$0$FocusParkingView(Landroid/view/View;Landroid/view/View;)V
 190 ····.locals·0
  
 191 ····invoke-direct·{p0,·p1,·p2},·Lcom/android/car/ui/FocusParkingView;->lambda$init$0(Landroid/view/View;Landroid/view/View;)V
  
 192 ····return-void
 193 .end·method
  
65 .method·protected·onMeasure(II)V194 .method·protected·onMeasure(II)V
66 ····.locals·0195 ····.locals·0
  
67 ····const/4·p1,·0x1196 ····const/4·p1,·0x1
  
68 ····.line·96197 ····.line·142
69 ····invoke-virtual·{p0,·p1,·p1},·Landroid/view/View;->setMeasuredDimension(II)V198 ····invoke-virtual·{p0,·p1,·p1},·Landroid/view/View;->setMeasuredDimension(II)V
  
70 ····return-void199 ····return-void
71 .end·method200 .end·method
  
72 .method·public·onWindowFocusChanged(Z)V201 .method·public·onWindowFocusChanged(Z)V
73 ····.locals·0202 ····.locals·2
  
74 ····if-nez·p1,·:cond_0203 ····if-nez·p1,·:cond_0
  
 204 ····const/16·v0,·0x82
  
 205 ····const/4·v1,·0x0
  
 206 ····.line·153
 207 ····invoke-super·{p0,·v0,·v1},·Landroid/view/View;->requestFocus(ILandroid/graphics/Rect;)Z
  
75 ····.line·107208 ····.line·157
76 ····invoke-virtual·{p0},·Landroid/view/View;->requestFocus()Z209 ····iput-object·v1,·p0,·Lcom/android/car/ui/FocusParkingView;->mFocusedView:Landroid/view/View;
  
 210 ····.line·158
 211 ····iput-object·v1,·p0,·Lcom/android/car/ui/FocusParkingView;->mScrollableContainer:Landroid/view/ViewGroup;
  
 212 ····goto·:goto_0
  
77 ····.line·109213 ····.line·159
78 ····:cond_0214 ····:cond_0
 215 ····invoke-virtual·{p0},·Landroid/view/View;->isFocused()Z
  
 216 ····move-result·v0
  
 217 ····if-eqz·v0,·:cond_1
  
 218 ····const/4·v0,·0x1
  
 219 ····.line·162
 220 ····invoke-direct·{p0,·v0},·Lcom/android/car/ui/FocusParkingView;->restoreFocusInRoot(Z)Z
  
 221 ····.line·164
 222 ····:cond_1
 223 ····:goto_0
79 ····invoke-super·{p0,·p1},·Landroid/view/View;->onWindowFocusChanged(Z)V224 ····invoke-super·{p0,·p1},·Landroid/view/View;->onWindowFocusChanged(Z)V
  
80 ····return-void225 ····return-void
81 .end·method226 .end·method
  
82 .method·public·performAccessibilityAction(ILandroid/os/Bundle;)Z227 .method·public·performAccessibilityAction(ILandroid/os/Bundle;)Z
83 ····.locals·1228 ····.locals·2
  
84 ····const/high16·v0,·0x100000229 ····const/4·v0,·0x1
  
85 ····if-ne·p1,·v0,·:cond_0230 ····const/4·v1,·0x0
  
 231 ····if-eq·p1,·v0,·:cond_2
  
 232 ····const/high16·v0,·0x4000000
  
 233 ····if-eq·p1,·v0,·:cond_1
  
 234 ····const/high16·v0,·0x8000000
  
 235 ····if-eq·p1,·v0,·:cond_0
  
86 ····.line·121236 ····.line·189
 237 ····invoke-super·{p0,·p1,·p2},·Landroid/view/View;->performAccessibilityAction(ILandroid/os/Bundle;)Z
  
 238 ····move-result·p1
  
 239 ····return·p1
  
 240 ····.line·179
 241 ····:cond_0
87 ····invoke-virtual·{p0},·Landroid/view/View;->getRootView()Landroid/view/View;242 ····invoke-virtual·{p0},·Landroid/view/View;->getContext()Landroid/content/Context;
  
88 ····move-result-object·p1243 ····move-result-object·p1
  
89 ····invoke-virtual·{p1},·Landroid/view/View;->restoreDefaultFocus()Z244 ····const-class·p2,·Landroid/view/inputmethod/InputMethodManager;
  
 245 ····invoke-virtual·{p1,·p2},·Landroid/content/Context;->getSystemService(Ljava/lang/Class;)Ljava/lang/Object;
  
 246 ····move-result-object·p1
  
 247 ····check-cast·p1,·Landroid/view/inputmethod/InputMethodManager;
  
90 ····.line·123248 ····.line·180
91 ····invoke-virtual·{p0},·Landroid/view/View;->isFocused()Z249 ····invoke-virtual·{p0},·Landroid/view/View;->getWindowToken()Landroid/os/IBinder;
  
 250 ····move-result-object·p2
  
 251 ····invoke-virtual·{p1,·p2,·v1},·Landroid/view/inputmethod/InputMethodManager;->hideSoftInputFromWindow(Landroid/os/IBinder;I)Z
  
92 ····move-result·p1252 ····move-result·p1
  
93 ····xor-int/lit8·p1,·p1,·0x1253 ····return·p1
  
 254 ····.line·176
 255 ····:cond_1
 256 ····invoke-direct·{p0,·v1},·Lcom/android/car/ui/FocusParkingView;->restoreFocusInRoot(Z)Z
  
 257 ····move-result·p1
  
 258 ····return·p1
  
 259 ····.line·184
 260 ····:cond_2
 261 ····invoke-virtual·{p0},·Landroid/view/View;->hasFocus()Z
  
 262 ····move-result·p1
  
 263 ····if-nez·p1,·:cond_3
  
 264 ····const/16·p1,·0x82
  
 265 ····const/4·p2,·0x0
  
 266 ····.line·185
 267 ····invoke-super·{p0,·p1,·p2},·Landroid/view/View;->requestFocus(ILandroid/graphics/Rect;)Z
  
 268 ····move-result·p1
  
 269 ····return·p1
  
 270 ····:cond_3
 271 ····return·v1
 272 .end·method
  
 273 .method·public·requestFocus(ILandroid/graphics/Rect;)Z
 274 ····.locals·1
  
 275 ····.line·194
 276 ····iget-boolean·v0,·p0,·Lcom/android/car/ui/FocusParkingView;->mShouldRestoreFocus:Z
  
 277 ····if-nez·v0,·:cond_0
  
 278 ····.line·195
 279 ····invoke-super·{p0,·p1,·p2},·Landroid/view/View;->requestFocus(ILandroid/graphics/Rect;)Z
  
 280 ····move-result·p1
  
94 ····return·p1281 ····return·p1
  
95 ····.line·125 
96 ····:cond_0282 ····:cond_0
97 ····invoke-super·{p0,·p1,·p2},·Landroid/view/View;->performAccessibilityAction(ILandroid/os/Bundle;)Z283 ····const/4·p1,·0x1
  
 284 ····.line·199
 285 ····invoke-direct·{p0,·p1},·Lcom/android/car/ui/FocusParkingView;->restoreFocusInRoot(Z)Z
  
98 ····move-result·p1286 ····move-result·p1
  
99 ····return·p1287 ····return·p1
100 .end·method288 .end·method
  
 289 .method·public·restoreDefaultFocus()Z
 290 ····.locals·1
  
 291 ····.line·204
 292 ····iget-boolean·v0,·p0,·Lcom/android/car/ui/FocusParkingView;->mShouldRestoreFocus:Z
  
 293 ····if-nez·v0,·:cond_0
  
 294 ····.line·205
 295 ····invoke-super·{p0},·Landroid/view/View;->restoreDefaultFocus()Z
  
 296 ····move-result·v0
  
 297 ····return·v0
  
 298 ····:cond_0
 299 ····const/4·v0,·0x1
  
 300 ····.line·209
 301 ····invoke-direct·{p0,·v0},·Lcom/android/car/ui/FocusParkingView;->restoreFocusInRoot(Z)Z
  
 302 ····move-result·v0
  
 303 ····return·v0
 304 .end·method
  
 305 .method·public·setShouldRestoreFocus(Z)V
 306 ····.locals·0
  
 307 ····.line·218
 308 ····iput-boolean·p1,·p0,·Lcom/android/car/ui/FocusParkingView;->mShouldRestoreFocus:Z
  
 309 ····return-void
 310 .end·method