Offset 2, 619 lines modifiedOffset 2, 693 lines modified
2 .super·Landroidx/fragment/app/Fragment;2 .super·Landroidx/fragment/app/Fragment;
3 .source·"ListPreferenceFragment.java"3 .source·"ListPreferenceFragment.java"
  
4 #·interfaces4 #·interfaces
5 .implements·Lcom/android/car/ui/baselayout/InsetsChangedListener;5 .implements·Lcom/android/car/ui/baselayout/InsetsChangedListener;
  
  
 6 #·static·fields
 7 .field·private·static·final·ARG_FULLSCREEN:Ljava/lang/String;·=·"fullscreen"
  
  
6 #·instance·fields8 #·instance·fields
7 .field·private·final·mOnBackListener:Lcom/android/car/ui/toolbar/Toolbar$OnBackListener;9 .field·private·mFullScreen:Z
  
8 .field·private·mPreference:Landroidx/preference/ListPreference;10 .field·private·mPreference:Landroidx/preference/ListPreference;
  
9 .field·private·mSelectedIndex:I11 .field·private·mSelectedIndex:I
  
10 .field·private·mSelectedItem:Lcom/android/car/ui/recyclerview/CarUiContentListItem;12 .field·private·mSelectedItem:Lcom/android/car/ui/recyclerview/CarUiContentListItem;
  
11 .field·private·mToolbar:Lcom/android/car/ui/toolbar/ToolbarController;13 .field·private·mUseInstantPreferenceChangeCallback:Z
  
  
12 #·direct·methods14 #·direct·methods
13 .method·public·constructor·<init>()V15 .method·public·constructor·<init>()V
14 ····.locals·116 ····.locals·1
  
15 ····.line·5217 ····.line·53
16 ····invoke-direct·{p0},·Landroidx/fragment/app/Fragment;-><init>()V18 ····invoke-direct·{p0},·Landroidx/fragment/app/Fragment;-><init>()V
  
17 ····const/4·v0,·-0x119 ····const/4·v0,·-0x1
  
18 ····.line·5720 ····.line·59
19 ····iput·v0,·p0,·Lcom/android/car/ui/preference/ListPreferenceFragment;->mSelectedIndex:I21 ····iput·v0,·p0,·Lcom/android/car/ui/preference/ListPreferenceFragment;->mSelectedIndex:I
  
20 ····.line·58 
21 ····new-instance·v0,·Lcom/android/car/ui/preference/-$$Lambda$ListPreferenceFragment$KUM9qDPaNdW2nYJyt8LojXF22gM; 
  
22 ····invoke-direct·{v0,·p0},·Lcom/android/car/ui/preference/-$$Lambda$ListPreferenceFragment$KUM9qDPaNdW2nYJyt8LojXF22gM;-><init>(Lcom/android/car/ui/preference/ListPreferenceFragment;)V 
  
23 ····iput-object·v0,·p0,·Lcom/android/car/ui/preference/ListPreferenceFragment;->mOnBackListener:Lcom/android/car/ui/toolbar/Toolbar$OnBackListener; 
  
24 ····return-void22 ····return-void
25 .end·method23 .end·method
  
26 .method·private·getListPreference()Landroidx/preference/ListPreference;24 .method·private·getListPreference()Landroidx/preference/ListPreference;
27 ····.locals·225 ····.locals·2
  
28 ····.line·18326 ····.line·211
29 ····invoke-virtual·{p0},·Landroidx/fragment/app/Fragment;->getArguments()Landroid/os/Bundle;27 ····invoke-virtual·{p0},·Landroidx/fragment/app/Fragment;->requireArguments()Landroid/os/Bundle;
  
30 ····move-result-object·v0 
  
31 ····if-eqz·v0,·:cond_3 
  
32 ····.line·187 
33 ····invoke-virtual·{p0},·Landroidx/fragment/app/Fragment;->getArguments()Landroid/os/Bundle; 
  
34 ····move-result-object·v028 ····move-result-object·v0
  
35 ····const-string·v1,·"key"29 ····const-string·v1,·"key"
  
36 ····invoke-virtual·{v0,·v1},·Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;30 ····invoke-virtual·{v0,·v1},·Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
  
37 ····move-result-object·v031 ····move-result-object·v0
  
38 ····.line·18932 ····.line·213
39 ····invoke-virtual·{p0},·Landroidx/fragment/app/Fragment;->getTargetFragment()Landroidx/fragment/app/Fragment;33 ····invoke-virtual·{p0},·Landroidx/fragment/app/Fragment;->getTargetFragment()Landroidx/fragment/app/Fragment;
  
40 ····move-result-object·v134 ····move-result-object·v1
  
41 ····check-cast·v1,·Landroidx/preference/DialogPreference$TargetFragment;35 ····check-cast·v1,·Landroidx/preference/DialogPreference$TargetFragment;
  
42 ····if-eqz·v0,·:cond_236 ····if-eqz·v0,·:cond_2
  
43 ····if-eqz·v1,·:cond_137 ····if-eqz·v1,·:cond_1
  
44 ····.line·20238 ····.line·226
45 ····invoke-interface·{v1,·v0},·Landroidx/preference/DialogPreference$TargetFragment;->findPreference(Ljava/lang/CharSequence;)Landroidx/preference/Preference;39 ····invoke-interface·{v1,·v0},·Landroidx/preference/DialogPreference$TargetFragment;->findPreference(Ljava/lang/CharSequence;)Landroidx/preference/Preference;
  
46 ····move-result-object·v040 ····move-result-object·v0
  
47 ····.line·20441 ····.line·228
48 ····instance-of·v1,·v0,·Landroidx/preference/ListPreference;42 ····instance-of·v1,·v0,·Landroidx/preference/ListPreference;
  
49 ····if-eqz·v1,·:cond_043 ····if-eqz·v1,·:cond_0
  
50 ····.line·21044 ····.line·234
51 ····check-cast·v0,·Landroidx/preference/ListPreference;45 ····check-cast·v0,·Landroidx/preference/ListPreference;
  
52 ····return-object·v046 ····return-object·v0
  
53 ····.line·20547 ····.line·229
54 ····:cond_048 ····:cond_0
55 ····new-instance·v0,·Ljava/lang/IllegalStateException;49 ····new-instance·v0,·Ljava/lang/IllegalStateException;
  
56 ····const-string·v1,·"Cannot·use·ListPreferenceFragment·with·a·preference·that·is·not·of·type·ListPreference"50 ····const-string·v1,·"Cannot·use·ListPreferenceFragment·with·a·preference·that·is·not·of·type·ListPreference"
  
57 ····invoke-direct·{v0,·v1},·Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V51 ····invoke-direct·{v0,·v1},·Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
  
58 ····throw·v052 ····throw·v0
  
59 ····.line·19753 ····.line·221
60 ····:cond_154 ····:cond_1
61 ····new-instance·v0,·Ljava/lang/IllegalStateException;55 ····new-instance·v0,·Ljava/lang/IllegalStateException;
  
62 ····const-string·v1,·"Target·fragment·must·be·registered·before·displaying·ListPreference·screen."56 ····const-string·v1,·"Target·fragment·must·be·registered·before·displaying·ListPreference·screen."
  
63 ····invoke-direct·{v0,·v1},·Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V57 ····invoke-direct·{v0,·v1},·Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
  
64 ····throw·v058 ····throw·v0
  
65 ····.line·19259 ····.line·216
66 ····:cond_260 ····:cond_2
67 ····new-instance·v0,·Ljava/lang/IllegalStateException;61 ····new-instance·v0,·Ljava/lang/IllegalStateException;
  
68 ····const-string·v1,·"ListPreference·key·not·found·in·Fragment·arguments"62 ····const-string·v1,·"ListPreference·key·not·found·in·Fragment·arguments"
  
69 ····invoke-direct·{v0,·v1},·Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V63 ····invoke-direct·{v0,·v1},·Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
  
70 ····throw·v064 ····throw·v0
  
71 ····.line·184 
72 ····:cond_3 
73 ····new-instance·v0,·Ljava/lang/IllegalStateException; 
  
74 ····const-string·v1,·"Preference·arguments·cannot·be·null" 
  
75 ····invoke-direct·{v0,·v1},·Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V 
  
76 ····throw·v0 
77 .end·method65 .end·method
  
78 .method·private·synthetic·lambda$new$0()Z66 .method·static·synthetic·lambda$onViewCreated$0(Lcom/android/car/ui/recyclerview/CarUiRecyclerView;Landroid/view/View;I)V
79 ····.locals·267 ····.locals·2
  
80 ····.line·5968 ····.line·106
81 ····iget·v0,·p0,·Lcom/android/car/ui/preference/ListPreferenceFragment;->mSelectedIndex:I69 ····invoke-virtual·{p0},·Landroid/view/ViewGroup;->getPaddingTop()I
  
82 ····if-ltz·v0,·:cond_070 ····move-result·v0
  
83 ····iget-object·v0,·p0,·Lcom/android/car/ui/preference/ListPreferenceFragment;->mPreference:Landroidx/preference/ListPreference;71 ····if-ne·v0,·p2,·:cond_0
  
84 ····if-eqz·v0,·:cond_072 ····return-void
  
85 ····.line·6073 ····.line·110
86 ····invoke-virtual·{v0},·Landroidx/preference/ListPreference;->getEntryValues()[Ljava/lang/CharSequence;74 ····:cond_0
 75 ····invoke-virtual·{p0},·Landroid/view/ViewGroup;->getPaddingTop()I
  
87 ····move-result-object·v076 ····move-result·v0
  
88 ····iget·v1,·p0,·Lcom/android/car/ui/preference/ListPreferenceFragment;->mSelectedIndex:I77 ····const/4·v1,·0x0
  
89 ····aget-object·v0,·v0,·v178 ····.line·111
 79 ····invoke-virtual·{p0,·v1,·p2,·v1,·v1},·Lcom/android/car/ui/recyclerview/CarUiRecyclerView;->setPadding(IIII)V
  
90 ····invoke-interface·{v0},·Ljava/lang/CharSequence;->toString()Ljava/lang/String;80 ····sub-int/2addr·v0,·p2
  
91 ····move-result-object·v081 ····.line·112
 82 ····invoke-virtual·{p0,·v1,·v0},·Landroidx/recyclerview/widget/RecyclerView;->scrollBy(II)V
  
92 ····.line·6283 ····.line·114
93 ····iget-object·v1,·p0,·Lcom/android/car/ui/preference/ListPreferenceFragment;->mPreference:Landroidx/preference/ListPreference;84 ····sget·p0,·Lcom/android/car/ui/R$id;->car_ui_focus_area:I
  
94 ····invoke-virtual·{v1,·v0},·Landroidx/preference/Preference;->callChangeListener(Ljava/lang/Object;)Z85 ····invoke-virtual·{p1,·p0},·Landroid/view/View;->findViewById(I)Landroid/view/View;
  
95 ····move-result·v186 ····move-result-object·p0
  
96 ····if-eqz·v1,·:cond_087 ····check-cast·p0,·Lcom/android/car/ui/FocusArea;
  
 88 ····if-eqz·p0,·:cond_1
97 ····.line·63 
98 ····iget-object·v1,·p0,·Lcom/android/car/ui/preference/ListPreferenceFragment;->mPreference:Landroidx/preference/ListPreference; 
  
99 ····invoke-virtual·{v1,·v0},·Landroidx/preference/ListPreference;->setValue(Ljava/lang/String;)V89 ····.line·116
 90 ····invoke-virtual·{p0,·v1,·p2,·v1,·v1},·Lcom/android/car/ui/FocusArea;->setHighlightPadding(IIII)V
  
100 ····:cond_0 
101 ····const/4·v0,·0x091 ····.line·117
 92 ····invoke-virtual·{p0,·v1,·p2,·v1,·v1},·Lcom/android/car/ui/FocusArea;->setBoundsOffset(IIII)V
  
 93 ····:cond_1
102 ····return·v094 ····return-void
103 .end·method95 .end·method
  
104 .method·static·synthetic·lambda$onViewCreated$1(Lcom/android/car/ui/recyclerview/CarUiRecyclerView;I)V96 .method·private·synthetic·lambda$onViewCreated$1(Lcom/android/car/ui/recyclerview/CarUiListItemAdapter;Ljava/util/List;Lcom/android/car/ui/recyclerview/CarUiContentListItem;Z)V
105 ····.locals·297 ····.locals·1
  
106 ····.line·108 
107 ····invoke-virtual·{p0},·Landroid/view/ViewGroup;->getPaddingTop()I 
  
108 ····move-result·v0 
  
109 ····if-ne·v0,·p1,·:cond_098 ····if-nez·p4,·:cond_0
  
110 ····return-void99 ····return-void
  
111 ····.line·112100 ····.line·164
112 ····:cond_0101 ····:cond_0
113 ····invoke-virtual·{p0},·Landroid/view/ViewGroup;->getPaddingTop()I 
  
114 ····move-result·v0 
  
115 ····const/4·v1,·0x0 
  
116 ····.line·113 
117 ····invoke-virtual·{p0,·v1,·p1,·v1,·v1},·Lcom/android/car/ui/recyclerview/CarUiRecyclerView;->setPadding(IIII)V 
  
118 ····sub-int/2addr·v0,·p1 
  
119 ····.line·114 
120 ····invoke-virtual·{p0,·v1,·v0},·Landroidx/recyclerview/widget/RecyclerView;->scrollBy(II)V 
  
121 ····return-void 
122 .end·method 
  
123 .method·private·synthetic·lambda$onViewCreated$2(Lcom/android/car/ui/recyclerview/CarUiListItemAdapter;Ljava/util/List;Lcom/android/car/ui/recyclerview/CarUiContentListItem;Z)V 
124 ····.locals·1 
  
125 ····.line·152 
126 ····iget-object·p4,·p0,·Lcom/android/car/ui/preference/ListPreferenceFragment;->mSelectedItem:Lcom/android/car/ui/recyclerview/CarUiContentListItem;102 ····iget-object·p4,·p0,·Lcom/android/car/ui/preference/ListPreferenceFragment;->mSelectedItem:Lcom/android/car/ui/recyclerview/CarUiContentListItem;
  
127 ····if-eqz·p4,·:cond_0103 ····if-eqz·p4,·:cond_1
  
128 ····const/4·v0,·0x0104 ····const/4·v0,·0x0
  
129 ····.line·153105 ····.line·165
130 ····invoke-virtual·{p4,·v0},·Lcom/android/car/ui/recyclerview/CarUiContentListItem;->setChecked(Z)V106 ····invoke-virtual·{p4,·v0},·Lcom/android/car/ui/recyclerview/CarUiContentListItem;->setChecked(Z)V
  
131 ····.line·154107 ····.line·166
132 ····iget-object·p4,·p0,·Lcom/android/car/ui/preference/ListPreferenceFragment;->mSelectedItem:Lcom/android/car/ui/recyclerview/CarUiContentListItem;108 ····iget-object·p4,·p0,·Lcom/android/car/ui/preference/ListPreferenceFragment;->mSelectedItem:Lcom/android/car/ui/recyclerview/CarUiContentListItem;
  
133 ····invoke-interface·{p2,·p4},·Ljava/util/List;->indexOf(Ljava/lang/Object;)I109 ····invoke-interface·{p2,·p4},·Ljava/util/List;->indexOf(Ljava/lang/Object;)I
  
134 ····move-result·p4110 ····move-result·p4
  
135 ····invoke-virtual·{p1,·p4},·Landroidx/recyclerview/widget/RecyclerView$Adapter;->notifyItemChanged(I)V111 ····invoke-virtual·{p1,·p4},·Landroidx/recyclerview/widget/RecyclerView$Adapter;->notifyItemChanged(I)V
  
136 ····.line·156112 ····.line·168
137 ····:cond_0113 ····:cond_1
138 ····iput-object·p3,·p0,·Lcom/android/car/ui/preference/ListPreferenceFragment;->mSelectedItem:Lcom/android/car/ui/recyclerview/CarUiContentListItem;114 ····iput-object·p3,·p0,·Lcom/android/car/ui/preference/ListPreferenceFragment;->mSelectedItem:Lcom/android/car/ui/recyclerview/CarUiContentListItem;
  
139 ····.line·157115 ····.line·169
140 ····invoke-interface·{p2,·p3},·Ljava/util/List;->indexOf(Ljava/lang/Object;)I116 ····invoke-interface·{p2,·p3},·Ljava/util/List;->indexOf(Ljava/lang/Object;)I
  
141 ····move-result·p1117 ····move-result·p1
  
142 ····iput·p1,·p0,·Lcom/android/car/ui/preference/ListPreferenceFragment;->mSelectedIndex:I118 ····iput·p1,·p0,·Lcom/android/car/ui/preference/ListPreferenceFragment;->mSelectedIndex:I
  
 119 ····.line·171
 120 ····iget-boolean·p1,·p0,·Lcom/android/car/ui/preference/ListPreferenceFragment;->mUseInstantPreferenceChangeCallback:Z
  
 121 ····if-eqz·p1,·:cond_2
  
 122 ····.line·172
 123 ····invoke-direct·{p0},·Lcom/android/car/ui/preference/ListPreferenceFragment;->updatePreference()V
  
 124 ····:cond_2
143 ····return-void125 ····return-void
144 .end·method126 .end·method
  
145 .method·static·newInstance(Ljava/lang/String;)Lcom/android/car/ui/preference/ListPreferenceFragment;127 .method·static·newInstance(Ljava/lang/String;Z)Lcom/android/car/ui/preference/ListPreferenceFragment;
146 ····.locals·3128 ····.locals·3
  
147 ····.line·76129 ····.line·69
148 ····new-instance·v0,·Lcom/android/car/ui/preference/ListPreferenceFragment;130 ····new-instance·v0,·Lcom/android/car/ui/preference/ListPreferenceFragment;
  
149 ····invoke-direct·{v0},·Lcom/android/car/ui/preference/ListPreferenceFragment;-><init>()V131 ····invoke-direct·{v0},·Lcom/android/car/ui/preference/ListPreferenceFragment;-><init>()V
  
150 ····.line·77132 ····.line·70
151 ····new-instance·v1,·Landroid/os/Bundle;133 ····new-instance·v1,·Landroid/os/Bundle;
  
152 ····const/4·v2,·0x1134 ····const/4·v2,·0x1
  
153 ····invoke-direct·{v1,·v2},·Landroid/os/Bundle;-><init>(I)V135 ····invoke-direct·{v1,·v2},·Landroid/os/Bundle;-><init>(I)V
  
154 ····const-string·v2,·"key"136 ····const-string·v2,·"key"
  
155 ····.line·78137 ····.line·71
156 ····invoke-virtual·{v1,·v2,·p0},·Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V138 ····invoke-virtual·{v1,·v2,·p0},·Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
  
 139 ····const-string·p0,·"fullscreen"
  
157 ····.line·79140 ····.line·72
 141 ····invoke-virtual·{v1,·p0,·p1},·Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V
  
 142 ····.line·73
158 ····invoke-virtual·{v0,·v1},·Landroidx/fragment/app/Fragment;->setArguments(Landroid/os/Bundle;)V143 ····invoke-virtual·{v0,·v1},·Landroidx/fragment/app/Fragment;->setArguments(Landroid/os/Bundle;)V
  
159 ····return-object·v0144 ····return-object·v0
160 .end·method145 .end·method
  
 146 .method·private·updatePreference()V
 147 ····.locals·2
  
 148 ····.line·201
 149 ····iget·v0,·p0,·Lcom/android/car/ui/preference/ListPreferenceFragment;->mSelectedIndex:I
161 #·virtual·methods 
162 .method·public·synthetic·lambda$new$0$ListPreferenceFragment()Z 
163 ····.locals·1 
  
164 ····invoke-direct·{p0},·Lcom/android/car/ui/preference/ListPreferenceFragment;->lambda$new$0()Z150 ····if-ltz·v0,·:cond_0
  
 151 ····iget-object·v0,·p0,·Lcom/android/car/ui/preference/ListPreferenceFragment;->mPreference:Landroidx/preference/ListPreference;
  
 152 ····if-eqz·v0,·:cond_0
  
 153 ····.line·202
 154 ····invoke-virtual·{v0},·Landroidx/preference/ListPreference;->getEntryValues()[Ljava/lang/CharSequence;
  
 155 ····move-result-object·v0
  
 156 ····iget·v1,·p0,·Lcom/android/car/ui/preference/ListPreferenceFragment;->mSelectedIndex:I
  
 157 ····aget-object·v0,·v0,·v1
  
 158 ····invoke-interface·{v0},·Ljava/lang/CharSequence;->toString()Ljava/lang/String;
  
 159 ····move-result-object·v0
  
 160 ····.line·204
 161 ····iget-object·v1,·p0,·Lcom/android/car/ui/preference/ListPreferenceFragment;->mPreference:Landroidx/preference/ListPreference;
  
 162 ····invoke-virtual·{v1,·v0},·Landroidx/preference/Preference;->callChangeListener(Ljava/lang/Object;)Z
  
165 ····move-result·v0163 ····move-result·v1
  
 164 ····if-eqz·v1,·:cond_0
  
 165 ····.line·205
 166 ····iget-object·v1,·p0,·Lcom/android/car/ui/preference/ListPreferenceFragment;->mPreference:Landroidx/preference/ListPreference;
  
 167 ····invoke-virtual·{v1,·v0},·Landroidx/preference/ListPreference;->setValue(Ljava/lang/String;)V
  
 168 ····:cond_0
166 ····return·v0169 ····return-void
167 .end·method170 .end·method
Max report size reached; 19469/31482 bytes (61.84%) of diff not shown.