| | | |
Offset 1, 60 lines modified | Offset 1, 37 lines modified |
1 | .class·final·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl; | 1 | .class·public·final·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl; |
2 | .super·Ljava/lang/Object; | 2 | .super·Ljava/lang/Object; |
3 | .source·"ModelFileManager.java" | 3 | .source·"ModelFileManager.java" |
| |
4 | #·interfaces | 4 | #·interfaces |
5 | .implements·Ljava/util/function/Supplier; | 5 | .implements·Ljava/util/function/Supplier; |
| |
| |
6 | #·annotations | 6 | #·annotations |
7 | .annotation·system·Ldalvik/annotation/EnclosingClass; | 7 | .annotation·system·Ldalvik/annotation/EnclosingClass; |
8 | ····value·=·Lcom/android/textclassifier/ModelFileManager; | 8 | ····value·=·Lcom/android/textclassifier/ModelFileManager; |
9 | .end·annotation | 9 | .end·annotation |
| |
10 | .annotation·system·Ldalvik/annotation/InnerClass; | 10 | .annotation·system·Ldalvik/annotation/InnerClass; |
11 | ····accessFlags·=·0x18 | 11 | ····accessFlags·=·0x19 |
12 | ····name·=·"ModelFileSupplierImpl" | 12 | ····name·=·"ModelFileSupplierImpl" |
13 | .end·annotation | 13 | .end·annotation |
| |
14 | .annotation·system·Ldalvik/annotation/MemberClasses; | |
15 | ····value·=·{ | |
16 | ········Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl$ModelFileInfo; | |
17 | ····} | |
18 | .end·annotation | |
| |
19 | .annotation·system·Ldalvik/annotation/Signature; | 14 | .annotation·system·Ldalvik/annotation/Signature; |
20 | ····value·=·{ | 15 | ····value·=·{ |
21 | ········"Ljava/lang/Object;", | 16 | ········"Ljava/lang/Object;", |
22 | ········"Ljava/util/function/Supplier<", | 17 | ········"Ljava/util/function/Supplier<", |
23 | ········"Lcom/google/common/collect/ImmutableList<", | 18 | ········"Lcom/google/common/collect/ImmutableList<", |
24 | ········"Lcom/android/textclassifier/ModelFileManager$ModelFile;", | 19 | ········"Lcom/android/textclassifier/ModelFileManager$ModelFile;", |
25 | ········">;>;" | 20 | ········">;>;" |
26 | ····} | 21 | ····} |
27 | .end·annotation | 22 | .end·annotation |
| |
| |
28 | #·static·fields | |
29 | .field·private·static·final·MODEL_FILE_INFO_MAP:Lcom/google/common/collect/ImmutableMap; | |
30 | ····.annotation·system·Ldalvik/annotation/Signature; | |
31 | ········value·=·{ | |
32 | ············"Lcom/google/common/collect/ImmutableMap<", | |
33 | ············"Ljava/lang/String;", | |
34 | ············"Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl$ModelFileInfo;", | |
35 | ············">;" | |
36 | ········} | |
37 | ····.end·annotation | |
38 | .end·field | |
| |
| |
39 | #·instance·fields | 23 | #·instance·fields |
40 | .field·private·final·configUpdaterModelFile:Ljava/io/File; | |
| |
41 | .field·private·final·downloaderModelDir:Ljava/io/File; | |
| |
42 | .field·private·final·factoryModelDir:Ljava/io/File; | 24 | .field·private·final·factoryModelDir:Ljava/io/File; |
| |
43 | .field·private·factoryModels:Lcom/google/common/collect/ImmutableList; | 25 | .field·private·factoryModels:Lcom/google/common/collect/ImmutableList; |
44 | ····.annotation·system·Ldalvik/annotation/Signature; | 26 | ····.annotation·system·Ldalvik/annotation/Signature; |
45 | ········value·=·{ | 27 | ········value·=·{ |
46 | ············"Lcom/google/common/collect/ImmutableList<", | 28 | ············"Lcom/google/common/collect/ImmutableList<", |
47 | ············"Lcom/android/textclassifier/ModelFileManager$ModelFile;", | 29 | ············"Lcom/android/textclassifier/ModelFileManager$ModelFile;", |
Offset 63, 374 lines modified | Offset 40, 193 lines modified |
63 | ····.end·annotation | 40 | ····.end·annotation |
64 | .end·field | 41 | .end·field |
| |
65 | .field·private·final·lock:Ljava/lang/Object; | 42 | .field·private·final·lock:Ljava/lang/Object; |
| |
66 | .field·private·final·modelFilenamePattern:Ljava/util/regex/Pattern; | 43 | .field·private·final·modelFilenamePattern:Ljava/util/regex/Pattern; |
| |
67 | .field·private·final·modelType:Ljava/lang/String; | |
| |
68 | .field·private·final·settings:Lcom/android/textclassifier/TextClassifierSettings; | |
| |
69 | .field·private·final·supportedLocalesSupplier:Ljava/util/function/Function; | 44 | .field·private·final·supportedLocalesSupplier:Ljava/util/function/Function; |
70 | ····.annotation·system·Ldalvik/annotation/Signature; | 45 | ····.annotation·system·Ldalvik/annotation/Signature; |
71 | ········value·=·{ | 46 | ········value·=·{ |
72 | ············"Ljava/util/function/Function<", | 47 | ············"Ljava/util/function/Function<", |
73 | ············"Ljava/lang/Integer;", | 48 | ············"Ljava/lang/Integer;", |
74 | ············"Ljava/lang/String;", | 49 | ············"Ljava/lang/String;", |
75 | ············">;" | 50 | ············">;" |
76 | ········} | 51 | ········} |
77 | ····.end·annotation | 52 | ····.end·annotation |
78 | .end·field | 53 | .end·field |
| |
| 54 | .field·private·final·updatedModelFile:Ljava/io/File; |
| |
79 | .field·private·final·versionSupplier:Ljava/util/function/Function; | 55 | .field·private·final·versionSupplier:Ljava/util/function/Function; |
80 | ····.annotation·system·Ldalvik/annotation/Signature; | 56 | ····.annotation·system·Ldalvik/annotation/Signature; |
81 | ········value·=·{ | 57 | ········value·=·{ |
82 | ············"Ljava/util/function/Function<", | 58 | ············"Ljava/util/function/Function<", |
83 | ············"Ljava/lang/Integer;", | 59 | ············"Ljava/lang/Integer;", |
84 | ············"Ljava/lang/Integer;", | 60 | ············"Ljava/lang/Integer;", |
85 | ············">;" | 61 | ············">;" |
86 | ········} | 62 | ········} |
87 | ····.end·annotation | 63 | ····.end·annotation |
88 | .end·field | 64 | .end·field |
| |
| |
89 | #·direct·methods | 65 | #·direct·methods |
90 | .method·static·constructor·<clinit>()V | 66 | .method·public·constructor·<init>(Ljava/io/File;Ljava/lang/String;Ljava/io/File;Ljava/util/function/Function;Ljava/util/function/Function;)V |
91 | ····.locals·6 | |
| |
92 | ····.line·206 | |
93 | ····invoke-static·{},·Lcom/google/common/collect/ImmutableMap;->builder()Lcom/google/common/collect/ImmutableMap$Builder; | |
| |
94 | ····move-result-object·v0 | |
| |
95 | ····new-instance·v1,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl$ModelFileInfo; | |
| |
96 | ····sget-object·v2,·Lcom/android/textclassifier/-$$Lambda$jJq8RXuVdjYF3lPq-77PEw1NJLM;->INSTANCE:Lcom/android/textclassifier/-$$Lambda$jJq8RXuVdjYF3lPq-77PEw1NJLM; | |
| |
97 | ····sget-object·v3,·Lcom/android/textclassifier/-$$Lambda$NxwbyZSxofZ4Z5SQhfXmtLQ1nxk;->INSTANCE:Lcom/android/textclassifier/-$$Lambda$NxwbyZSxofZ4Z5SQhfXmtLQ1nxk; | |
| |
98 | ····const-string·v4,·"(annotator|textclassifier)\\.(.*)\\.model" | |
| |
99 | ····const-string·v5,·"/data/misc/textclassifier/textclassifier.model" | |
| |
100 | ····invoke-direct·{v1,·v4,·v5,·v2,·v3},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl$ModelFileInfo;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/util/function/Function;Ljava/util/function/Function;)V | |
| |
101 | ····const-string·v2,·"annotator" | |
| |
102 | ····.line·207 | |
103 | ····invoke-virtual·{v0,·v2,·v1},·Lcom/google/common/collect/ImmutableMap$Builder;->put(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap$Builder; | |
| |
104 | ····move-result-object·v0 | |
| |
105 | ····new-instance·v1,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl$ModelFileInfo; | |
| |
106 | ····sget-object·v2,·Lcom/android/textclassifier/-$$Lambda$0biFK4yZBmWN1EO2wtnXskzuEcE;->INSTANCE:Lcom/android/textclassifier/-$$Lambda$0biFK4yZBmWN1EO2wtnXskzuEcE; | |
| |
107 | ····sget-object·v3,·Lcom/android/textclassifier/-$$Lambda$ModelFileManager$ModelFileSupplierImpl$fMYSxifD0V8sHsS4KyfvDE-HosE;->INSTANCE:Lcom/android/textclassifier/-$$Lambda$ModelFileManager$ModelFileSupplierImpl$fMYSxifD0V8sHsS4KyfvDE-HosE; | |
| |
108 | ····const-string·v4,·"lang_id.model" | |
| |
109 | ····const-string·v5,·"/data/misc/textclassifier/lang_id.model" | |
| |
110 | ····invoke-direct·{v1,·v4,·v5,·v2,·v3},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl$ModelFileInfo;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/util/function/Function;Ljava/util/function/Function;)V | |
| |
111 | ····const-string·v2,·"lang_id" | |
| |
112 | ····.line·214 | |
113 | ····invoke-virtual·{v0,·v2,·v1},·Lcom/google/common/collect/ImmutableMap$Builder;->put(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap$Builder; | |
| |
114 | ····move-result-object·v0 | |
| |
115 | ····new-instance·v1,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl$ModelFileInfo; | |
| |
116 | ····sget-object·v2,·Lcom/android/textclassifier/-$$Lambda$9N8WImc0VBjy2oxI_Gk5_Pbye_A;->INSTANCE:Lcom/android/textclassifier/-$$Lambda$9N8WImc0VBjy2oxI_Gk5_Pbye_A; | |
| |
117 | ····sget-object·v3,·Lcom/android/textclassifier/-$$Lambda$XeE_KI7QgMKzF9vYRSoFWAolyuA;->INSTANCE:Lcom/android/textclassifier/-$$Lambda$XeE_KI7QgMKzF9vYRSoFWAolyuA; | |
| |
118 | ····const-string·v4,·"actions_suggestions\\.(.*)\\.model" | |
| |
119 | ····const-string·v5,·"/data/misc/textclassifier/actions_suggestions.model" | |
| |
120 | ····invoke-direct·{v1,·v4,·v5,·v2,·v3},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl$ModelFileInfo;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/util/function/Function;Ljava/util/function/Function;)V | |
| |
121 | ····const-string·v2,·"actions_suggestions" | |
| |
122 | ····.line·221 | |
123 | ····invoke-virtual·{v0,·v2,·v1},·Lcom/google/common/collect/ImmutableMap$Builder;->put(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap$Builder; | |
| |
124 | ····move-result-object·v0 | |
| |
125 | ····.line·228 | |
126 | ····invoke-virtual·{v0},·Lcom/google/common/collect/ImmutableMap$Builder;->build()Lcom/google/common/collect/ImmutableMap; | |
| |
127 | ····move-result-object·v0 | |
| |
128 | ····sput-object·v0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->MODEL_FILE_INFO_MAP:Lcom/google/common/collect/ImmutableMap; | |
| |
129 | ····return-void | |
130 | .end·method | |
| |
131 | .method·public·constructor·<init>(Lcom/android/textclassifier/TextClassifierSettings;Ljava/lang/String;Ljava/io/File;)V | |
132 | ····.locals·9 | |
| |
133 | ····.line·247 | |
134 | ····new-instance·v3,·Ljava/io/File; | |
| |
135 | ····const-string·v0,·"/etc/textclassifier/" | |
| |
136 | ····invoke-direct·{v3,·v0},·Ljava/io/File;-><init>(Ljava/lang/String;)V | |
| |
137 | ····sget-object·v0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->MODEL_FILE_INFO_MAP:Lcom/google/common/collect/ImmutableMap; | |
| |
138 | ····.line·251 | |
139 | ····invoke-virtual·{v0,·p2},·Lcom/google/common/collect/ImmutableMap;->get(Ljava/lang/Object;)Ljava/lang/Object; | |
| |
140 | ····move-result-object·v0 | |
| |
141 | ····check-cast·v0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl$ModelFileInfo; | |
| |
142 | ····invoke-virtual·{v0},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl$ModelFileInfo;->getModelNameRegex()Ljava/lang/String; | |
| |
143 | ····move-result-object·v4 | |
| |
144 | ····new-instance·v5,·Ljava/io/File; | |
| |
145 | ····sget-object·v0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->MODEL_FILE_INFO_MAP:Lcom/google/common/collect/ImmutableMap; | |
| |
146 | ····.line·252 | |
147 | ····invoke-virtual·{v0,·p2},·Lcom/google/common/collect/ImmutableMap;->get(Ljava/lang/Object;)Ljava/lang/Object; | |
| |
148 | ····move-result-object·v0 | |
| |
149 | ····check-cast·v0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl$ModelFileInfo; | |
| |
150 | ····invoke-virtual·{v0},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl$ModelFileInfo;->getConfigUpdaterModelPath()Ljava/lang/String; | |
| |
151 | ····move-result-object·v0 | |
| |
152 | ····invoke-direct·{v5,·v0},·Ljava/io/File;-><init>(Ljava/lang/String;)V | |
| |
153 | ····sget-object·v0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->MODEL_FILE_INFO_MAP:Lcom/google/common/collect/ImmutableMap; | |
| |
154 | ····.line·254 | |
155 | ····invoke-virtual·{v0,·p2},·Lcom/google/common/collect/ImmutableMap;->get(Ljava/lang/Object;)Ljava/lang/Object; | |
| |
156 | ····move-result-object·v0 | |
| |
157 | ····check-cast·v0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl$ModelFileInfo; | |
| |
158 | ····invoke-virtual·{v0},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl$ModelFileInfo;->getVersionSupplier()Ljava/util/function/Function; | |
| |
159 | ····move-result-object·v7 | |
| |
160 | ····sget-object·v0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->MODEL_FILE_INFO_MAP:Lcom/google/common/collect/ImmutableMap; | |
| |
161 | ····.line·255 | |
162 | ····invoke-virtual·{v0,·p2},·Lcom/google/common/collect/ImmutableMap;->get(Ljava/lang/Object;)Ljava/lang/Object; | |
| |
163 | ····move-result-object·v0 | |
| |
164 | ····check-cast·v0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl$ModelFileInfo; | |
| |
165 | ····invoke-virtual·{v0},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl$ModelFileInfo;->getSupportedLocalesSupplier()Ljava/util/function/Function; | |
| |
166 | ····move-result-object·v8 | |
| |
167 | ····move-object·v0,·p0 | |
| |
168 | ····move-object·v1,·p1 | |
| |
169 | ····move-object·v2,·p2 | |
| |
170 | ····move-object·v6,·p3 | |
| |
171 | ····.line·247 | |
172 | ····invoke-direct/range·{v0·..·v8},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;-><init>(Lcom/android/textclassifier/TextClassifierSettings;Ljava/lang/String;Ljava/io/File;Ljava/lang/String;Ljava/io/File;Ljava/io/File;Ljava/util/function/Function;Ljava/util/function/Function;)V | |
| |
173 | ····return-void | |
174 | .end·method | |
| |
175 | .method·constructor·<init>(Lcom/android/textclassifier/TextClassifierSettings;Ljava/lang/String;Ljava/io/File;Ljava/lang/String;Ljava/io/File;Ljava/io/File;Ljava/util/function/Function;Ljava/util/function/Function;)V | |
176 | ····.locals·1 | 67 | ····.locals·1 |
177 | ····.annotation·system·Ldalvik/annotation/Signature; | 68 | ····.annotation·system·Ldalvik/annotation/Signature; |
178 | ········value·=·{ | 69 | ········value·=·{ |
179 | ············"(", | 70 | ············"(", |
180 | ············"Lcom/android/textclassifier/TextClassifierSettings;", | |
181 | ············"Ljava/lang/String;", | |
182 | ············"Ljava/io/File;", | 71 | ············"Ljava/io/File;", |
183 | ············"Ljava/lang/String;", | 72 | ············"Ljava/lang/String;", |
184 | ············"Ljava/io/File;", | 73 | ············"Ljava/io/File;", |
185 | ············"Ljava/io/File;", | |
186 | ············"Ljava/util/function/Function<", | 74 | ············"Ljava/util/function/Function<", |
187 | ············"Ljava/lang/Integer;", | 75 | ············"Ljava/lang/Integer;", |
188 | ············"Ljava/lang/Integer;", | 76 | ············"Ljava/lang/Integer;", |
189 | ············">;", | 77 | ············">;", |
190 | ············"Ljava/util/function/Function<", | 78 | ············"Ljava/util/function/Function<", |
191 | ············"Ljava/lang/Integer;", | 79 | ············"Ljava/lang/Integer;", |
192 | ············"Ljava/lang/String;", | 80 | ············"Ljava/lang/String;", |
193 | ············">;)V" | 81 | ············">;)V" |
194 | ········} | 82 | ········} |
195 | ····.end·annotation | 83 | ····.end·annotation |
| |
196 | ····.line·267 | 84 | ····.line·100 |
197 | ····invoke-direct·{p0},·Ljava/lang/Object;-><init>()V | 85 | ····invoke-direct·{p0},·Ljava/lang/Object;-><init>()V |
| |
198 | ····.line·238 | 86 | ····.line·90 |
199 | ····new-instance·v0,·Ljava/lang/Object; | 87 | ····new-instance·v0,·Ljava/lang/Object; |
| |
200 | ····invoke-direct·{v0},·Ljava/lang/Object;-><init>()V | 88 | ····invoke-direct·{v0},·Ljava/lang/Object;-><init>()V |
| |
201 | ····iput-object·v0,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->lock:Ljava/lang/Object; | 89 | ····iput-object·v0,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->lock:Ljava/lang/Object; |
| |
202 | ····.line·268 | 90 | ····.line·101 |
203 | ····invoke-static·{p1},·Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; | |
| |
204 | ····check-cast·p1,·Lcom/android/textclassifier/TextClassifierSettings; | |
| |
205 | ····iput-object·p1,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->settings:Lcom/android/textclassifier/TextClassifierSettings; | |
| |
206 | ····.line·269 | |
207 | ····invoke-static·{p2},·Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; | |
| |
208 | ····check-cast·p2,·Ljava/lang/String; | |
| |
209 | ····iput-object·p2,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->modelType:Ljava/lang/String; | |
| |
210 | ····.line·270 | |
211 | ····invoke-static·{p3},·Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; | 91 | ····invoke-static·{p3},·Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
| |
212 | ····check-cast·p3,·Ljava/io/File; | 92 | ····check-cast·p3,·Ljava/io/File; |
| |
213 | ····iput-object·p3,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->factoryModelDir:Ljava/io/File; | 93 | ····iput-object·p3,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->updatedModelFile:Ljava/io/File; |
| |
214 | ····.line·271 | |
215 | ····invoke-static·{p4},·Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; | |
| |
216 | ····check-cast·p4,·Ljava/lang/String; | |
| |
217 | ····invoke-static·{p4},·Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern; | |
| |
218 | ····move-result-object·p1 | 94 | ····.line·102 |
| 95 | ····invoke-static·{p1},·Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
| |
219 | ····iput-object·p1,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->modelFilenamePattern:Ljava/util/regex/Pattern; | 96 | ····check-cast·p1,·Ljava/io/File; |
| |
220 | ····.line·272 | 97 | ····iput-object·p1,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->factoryModelDir:Ljava/io/File; |
221 | ····invoke-static·{p5},·Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; | |
| |
222 | ····check-cast·p5,·Ljava/io/File; | 98 | ····.line·103 |
| 99 | ····invoke-static·{p2},·Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
| |
223 | ····iput-object·p5,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->configUpdaterModelFile:Ljava/io/File; | 100 | ····check-cast·p2,·Ljava/lang/String; |
| |
224 | ····.line·273 | 101 | ····invoke-static·{p2},·Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern; |
225 | ····invoke-static·{p6},·Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; | |
| |
226 | ····check-cast·p6,·Ljava/io/File; | 102 | ····move-result-object·p1 |
| |
227 | ····iput-object·p6,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->downloaderModelDir:Ljava/io/File; | 103 | ····iput-object·p1,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->modelFilenamePattern:Ljava/util/regex/Pattern; |
| |
228 | ····.line·274 | 104 | ····.line·104 |
229 | ····invoke-static·{p7},·Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; | 105 | ····invoke-static·{p4},·Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
| |
230 | ····check-cast·p7,·Ljava/util/function/Function; | 106 | ····check-cast·p4,·Ljava/util/function/Function; |
| |
231 | ····iput-object·p7,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->versionSupplier:Ljava/util/function/Function; | 107 | ····iput-object·p4,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->versionSupplier:Ljava/util/function/Function; |
| |
232 | ····.line·275 | 108 | ····.line·105 |
233 | ····invoke-static·{p8},·Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; | 109 | ····invoke-static·{p5},·Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
| |
234 | ····check-cast·p8,·Ljava/util/function/Function; | 110 | ····check-cast·p5,·Ljava/util/function/Function; |
| |
235 | ····iput-object·p8,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->supportedLocalesSupplier:Ljava/util/function/Function; | 111 | ····iput-object·p5,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->supportedLocalesSupplier:Ljava/util/function/Function; |
| |
236 | ····return-void | 112 | ····return-void |
237 | .end·method | 113 | .end·method |
| |
238 | .method·private·createModelFile(Ljava/io/File;)Lcom/android/textclassifier/ModelFileManager$ModelFile; | 114 | .method·private·createModelFile(Ljava/io/File;)Lcom/android/textclassifier/ModelFileManager$ModelFile; |
239 | ····.locals·12 | 115 | ····.locals·11 |
| |
240 | ····const-string·v0,·"ModelFileManager" | 116 | ····const-string·v0,·"ModelFileManager" |
| |
241 | ····.line·321 | 117 | ····.line·148 |
242 | ····invoke-virtual·{p1},·Ljava/io/File;->exists()Z | 118 | ····invoke-virtual·{p1},·Ljava/io/File;->exists()Z |
| |
243 | ····move-result·v1 | 119 | ····move-result·v1 |
| |
244 | ····const/4·v2,·0x0 | 120 | ····const/4·v2,·0x0 |
| |
245 | ····if-nez·v1,·:cond_0 | 121 | ····if-nez·v1,·:cond_0 |
| |
246 | ····return-object·v2 | 122 | ····return-object·v2 |
| |
247 | ····:cond_0 | 123 | ····:cond_0 |
248 | ····const/high16·v1,·0x10000000 | 124 | ····const/high16·v1,·0x10000000 |
| |
249 | ····.line·326 | 125 | ····.line·153 |
250 | ····:try_start_0 | 126 | ····:try_start_0 |
251 | ····invoke-static·{p1,·v1},·Landroid/os/ParcelFileDescriptor;->open(Ljava/io/File;I)Landroid/os/ParcelFileDescriptor; | 127 | ····invoke-static·{p1,·v1},·Landroid/os/ParcelFileDescriptor;->open(Ljava/io/File;I)Landroid/os/ParcelFileDescriptor; |
| |
252 | ····move-result-object·v1 | 128 | ····move-result-object·v1 |
253 | ····:try_end_0 | 129 | ····:try_end_0 |
254 | ····.catch·Ljava/io/FileNotFoundException;·{:try_start_0·..·:try_end_0}·:catch_1 | 130 | ····.catch·Ljava/io/FileNotFoundException;·{:try_start_0·..·:try_end_0}·:catch_1 |
255 | ····.catchall·{:try_start_0·..·:try_end_0}·:catchall_1 | 131 | ····.catchall·{:try_start_0·..·:try_end_0}·:catchall_1 |
| |
256 | ····if-nez·v1,·:cond_1 | 132 | ····if-nez·v1,·:cond_1 |
| |
257 | ····.line·352 | 133 | ····.line·178 |
258 | ····invoke-static·{v1},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->maybeCloseAndLogError(Landroid/os/ParcelFileDescriptor;)V | 134 | ····invoke-static·{v1},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->maybeCloseAndLogError(Landroid/os/ParcelFileDescriptor;)V |
| |
259 | ····return-object·v2 | 135 | ····return-object·v2 |
| |
260 | ····.line·330 | 136 | ····.line·157 |
261 | ····:cond_1 | 137 | ····:cond_1 |
262 | ····:try_start_1 | 138 | ····:try_start_1 |
263 | ····invoke-virtual·{v1},·Landroid/os/ParcelFileDescriptor;->getFd()I | 139 | ····invoke-virtual·{v1},·Landroid/os/ParcelFileDescriptor;->getFd()I |
| |
264 | ····move-result·v3 | 140 | ····move-result·v3 |
| |
265 | ····.line·331 | 141 | ····.line·158 |
266 | ····iget-object·v4,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->versionSupplier:Ljava/util/function/Function; | 142 | ····iget-object·v4,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->versionSupplier:Ljava/util/function/Function; |
| |
267 | ····invoke-static·{v3},·Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; | 143 | ····invoke-static·{v3},·Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; |
| |
268 | ····move-result-object·v5 | 144 | ····move-result-object·v5 |
| |
269 | ····invoke-interface·{v4,·v5},·Ljava/util/function/Function;->apply(Ljava/lang/Object;)Ljava/lang/Object; | 145 | ····invoke-interface·{v4,·v5},·Ljava/util/function/Function;->apply(Ljava/lang/Object;)Ljava/lang/Object; |
| |
270 | ····move-result-object·v4 | 146 | ····move-result-object·v4 |
| |
271 | ····check-cast·v4,·Ljava/lang/Integer; | 147 | ····check-cast·v4,·Ljava/lang/Integer; |
| |
272 | ····invoke-virtual·{v4},·Ljava/lang/Integer;->intValue()I | 148 | ····invoke-virtual·{v4},·Ljava/lang/Integer;->intValue()I |
| |
273 | ····move-result·v8 | 149 | ····move-result·v7 |
| |
274 | ····.line·332 | 150 | ····.line·159 |
275 | ····iget-object·v4,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->supportedLocalesSupplier:Ljava/util/function/Function; | 151 | ····iget-object·p0,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->supportedLocalesSupplier:Ljava/util/function/Function; |
| |
276 | ····invoke-static·{v3},·Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; | 152 | ····invoke-static·{v3},·Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; |
| |
277 | ····move-result-object·v3 | 153 | ····move-result-object·v3 |
| |
278 | ····invoke-interface·{v4,·v3},·Ljava/util/function/Function;->apply(Ljava/lang/Object;)Ljava/lang/Object; | 154 | ····invoke-interface·{p0,·v3},·Ljava/util/function/Function;->apply(Ljava/lang/Object;)Ljava/lang/Object; |
| |
279 | ····move-result-object·v3 | 155 | ····move-result-object·p0 |
| |
280 | ····move-object·v10,·v3 | 156 | ····move-object·v9,·p0 |
| |
281 | ····check-cast·v10,·Ljava/lang/String; | 157 | ····check-cast·v9,·Ljava/lang/String; |
| |
282 | ····.line·333 | 158 | ····.line·160 |
283 | ····invoke-virtual·{v10},·Ljava/lang/String;->isEmpty()Z | 159 | ····invoke-virtual·{v9},·Ljava/lang/String;->isEmpty()Z |
| |
284 | ····move-result·v3 | 160 | ····move-result·p0 |
| |
285 | ····if-eqz·v3,·:cond_2 | 161 | ····if-eqz·p0,·:cond_2 |
| |
286 | ····.line·334 | 162 | ····.line·161 |
287 | ····new-instance·p0,·Ljava/lang/StringBuilder; | 163 | ····new-instance·p0,·Ljava/lang/StringBuilder; |
| |
288 | ····invoke-direct·{p0},·Ljava/lang/StringBuilder;-><init>()V | 164 | ····invoke-direct·{p0},·Ljava/lang/StringBuilder;-><init>()V |
| |
289 | ····const-string·v3,·"Ignoring·" | 165 | ····const-string·v3,·"Ignoring·" |
| |
290 | ····invoke-virtual·{p0,·v3},·Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; | 166 | ····invoke-virtual·{p0,·v3},·Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
Offset 446, 89 lines modified | Offset 242, 87 lines modified |
446 | ····move-result-object·p0 | 242 | ····move-result-object·p0 |
| |
447 | ····invoke-static·{v0,·p0},·Lcom/android/textclassifier/common/base/TcLog;->d(Ljava/lang/String;Ljava/lang/String;)V | 243 | ····invoke-static·{v0,·p0},·Lcom/android/textclassifier/common/base/TcLog;->d(Ljava/lang/String;Ljava/lang/String;)V |
448 | ····:try_end_1 | 244 | ····:try_end_1 |
449 | ····.catch·Ljava/io/FileNotFoundException;·{:try_start_1·..·:try_end_1}·:catch_0 | 245 | ····.catch·Ljava/io/FileNotFoundException;·{:try_start_1·..·:try_end_1}·:catch_0 |
450 | ····.catchall·{:try_start_1·..·:try_end_1}·:catchall_0 | 246 | ····.catchall·{:try_start_1·..·:try_end_1}·:catchall_0 |
| |
451 | ····.line·352 | 247 | ····.line·178 |
452 | ····invoke-static·{v1},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->maybeCloseAndLogError(Landroid/os/ParcelFileDescriptor;)V | 248 | ····invoke-static·{v1},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->maybeCloseAndLogError(Landroid/os/ParcelFileDescriptor;)V |
| |
453 | ····return-object·v2 | 249 | ····return-object·v2 |
| |
454 | ····.line·337 | 250 | ····.line·164 |
455 | ····:cond_2 | 251 | ····:cond_2 |
456 | ····:try_start_2 | 252 | ····:try_start_2 |
457 | ····new-instance·v9,·Ljava/util/ArrayList; | 253 | ····new-instance·v8,·Ljava/util/ArrayList; |
| |
458 | ····invoke-direct·{v9},·Ljava/util/ArrayList;-><init>()V | 254 | ····invoke-direct·{v8},·Ljava/util/ArrayList;-><init>()V |
| |
459 | ····const/16·v3,·0x2c | 255 | ····const/16·p0,·0x2c |
| |
460 | ····.line·338 | 256 | ····.line·165 |
461 | ····invoke-static·{v3},·Lcom/google/common/base/Splitter;->on(C)Lcom/google/common/base/Splitter; | 257 | ····invoke-static·{p0},·Lcom/google/common/base/Splitter;->on(C)Lcom/google/common/base/Splitter; |
| |
462 | ····move-result-object·v3 | 258 | ····move-result-object·p0 |
| |
463 | ····invoke-virtual·{v3,·v10},·Lcom/google/common/base/Splitter;->split(Ljava/lang/CharSequence;)Ljava/lang/Iterable; | 259 | ····invoke-virtual·{p0,·v9},·Lcom/google/common/base/Splitter;->split(Ljava/lang/CharSequence;)Ljava/lang/Iterable; |
| |
464 | ····move-result-object·v3 | 260 | ····move-result-object·p0 |
| |
465 | ····invoke-interface·{v3},·Ljava/lang/Iterable;->iterator()Ljava/util/Iterator; | 261 | ····invoke-interface·{p0},·Ljava/lang/Iterable;->iterator()Ljava/util/Iterator; |
| |
466 | ····move-result-object·v3 | 262 | ····move-result-object·p0 |
| |
467 | ····:goto_0 | 263 | ····:goto_0 |
468 | ····invoke-interface·{v3},·Ljava/util/Iterator;->hasNext()Z | 264 | ····invoke-interface·{p0},·Ljava/util/Iterator;->hasNext()Z |
| |
469 | ····move-result·v4 | 265 | ····move-result·v3 |
| |
470 | ····if-eqz·v4,·:cond_3 | 266 | ····if-eqz·v3,·:cond_3 |
| |
471 | ····invoke-interface·{v3},·Ljava/util/Iterator;->next()Ljava/lang/Object; | 267 | ····invoke-interface·{p0},·Ljava/util/Iterator;->next()Ljava/lang/Object; |
| |
472 | ····move-result-object·v4 | 268 | ····move-result-object·v3 |
| |
473 | ····check-cast·v4,·Ljava/lang/String; | 269 | ····check-cast·v3,·Ljava/lang/String; |
| |
474 | ····.line·339 | 270 | ····.line·166 |
475 | ····invoke-static·{v4},·Ljava/util/Locale;->forLanguageTag(Ljava/lang/String;)Ljava/util/Locale; | 271 | ····invoke-static·{v3},·Ljava/util/Locale;->forLanguageTag(Ljava/lang/String;)Ljava/util/Locale; |
| |
476 | ····move-result-object·v4 | 272 | ····move-result-object·v3 |
| |
477 | ····invoke-interface·{v9,·v4},·Ljava/util/List;->add(Ljava/lang/Object;)Z | 273 | ····invoke-interface·{v8,·v3},·Ljava/util/List;->add(Ljava/lang/Object;)Z |
| |
478 | ····goto·:goto_0 | 274 | ····goto·:goto_0 |
| |
479 | ····.line·341 | 275 | ····.line·168 |
480 | ····:cond_3 | 276 | ····:cond_3 |
481 | ····new-instance·v3,·Lcom/android/textclassifier/ModelFileManager$ModelFile; | 277 | ····new-instance·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFile; |
| |
482 | ····iget-object·v6,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->modelType:Ljava/lang/String; | |
| |
483 | ····const-string·p0,·"*" | 278 | ····const-string·v3,·"*" |
| |
484 | ····.line·347 | 279 | ····.line·173 |
485 | ····invoke-virtual·{p0,·v10},·Ljava/lang/String;->equals(Ljava/lang/Object;)Z | 280 | ····invoke-virtual·{v3,·v9},·Ljava/lang/String;->equals(Ljava/lang/Object;)Z |
| |
486 | ····move-result·v11 | 281 | ····move-result·v10 |
| |
487 | ····move-object·v5,·v3 | 282 | ····move-object·v5,·p0 |
| |
488 | ····move-object·v7,·p1 | 283 | ····move-object·v6,·p1 |
| |
489 | ····invoke-direct/range·{v5·..·v11},·Lcom/android/textclassifier/ModelFileManager$ModelFile;-><init>(Ljava/lang/String;Ljava/io/File;ILjava/util/List;Ljava/lang/String;Z)V | 284 | ····invoke-direct/range·{v5·..·v10},·Lcom/android/textclassifier/ModelFileManager$ModelFile;-><init>(Ljava/io/File;ILjava/util/List;Ljava/lang/String;Z)V |
490 | ····:try_end_2 | 285 | ····:try_end_2 |
491 | ····.catch·Ljava/io/FileNotFoundException;·{:try_start_2·..·:try_end_2}·:catch_0 | 286 | ····.catch·Ljava/io/FileNotFoundException;·{:try_start_2·..·:try_end_2}·:catch_0 |
492 | ····.catchall·{:try_start_2·..·:try_end_2}·:catchall_0 | 287 | ····.catchall·{:try_start_2·..·:try_end_2}·:catchall_0 |
| |
493 | ····.line·352 | 288 | ····.line·178 |
494 | ····invoke-static·{v1},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->maybeCloseAndLogError(Landroid/os/ParcelFileDescriptor;)V | 289 | ····invoke-static·{v1},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->maybeCloseAndLogError(Landroid/os/ParcelFileDescriptor;)V |
| |
495 | ····return-object·v3 | 290 | ····return-object·p0 |
| |
496 | ····:catchall_0 | 291 | ····:catchall_0 |
497 | ····move-exception·p0 | 292 | ····move-exception·p0 |
| |
498 | ····move-object·v2,·v1 | 293 | ····move-object·v2,·v1 |
| |
499 | ····goto·:goto_2 | 294 | ····goto·:goto_2 |
Offset 544, 15 lines modified | Offset 338, 15 lines modified |
544 | ····goto·:goto_2 | 338 | ····goto·:goto_2 |
| |
545 | ····:catch_1 | 339 | ····:catch_1 |
546 | ····move-exception·p0 | 340 | ····move-exception·p0 |
| |
547 | ····move-object·v1,·v2 | 341 | ····move-object·v1,·v2 |
| |
548 | ····.line·349 | 342 | ····.line·175 |
549 | ····:goto_1 | 343 | ····:goto_1 |
550 | ····:try_start_3 | 344 | ····:try_start_3 |
551 | ····new-instance·v3,·Ljava/lang/StringBuilder; | 345 | ····new-instance·v3,·Ljava/lang/StringBuilder; |
| |
552 | ····invoke-direct·{v3},·Ljava/lang/StringBuilder;-><init>()V | 346 | ····invoke-direct·{v3},·Ljava/lang/StringBuilder;-><init>()V |
| |
553 | ····const-string·v4,·"Failed·to·find·" | 347 | ····const-string·v4,·"Failed·to·find·" |
Offset 569, 136 lines modified | Offset 363, 132 lines modified |
| |
569 | ····move-result-object·p1 | 363 | ····move-result-object·p1 |
| |
570 | ····invoke-static·{v0,·p1,·p0},·Lcom/android/textclassifier/common/base/TcLog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V | 364 | ····invoke-static·{v0,·p1,·p0},·Lcom/android/textclassifier/common/base/TcLog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V |
571 | ····:try_end_3 | 365 | ····:try_end_3 |
572 | ····.catchall·{:try_start_3·..·:try_end_3}·:catchall_0 | 366 | ····.catchall·{:try_start_3·..·:try_end_3}·:catchall_0 |
| |
573 | ····.line·352 | 367 | ····.line·178 |
574 | ····invoke-static·{v1},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->maybeCloseAndLogError(Landroid/os/ParcelFileDescriptor;)V | 368 | ····invoke-static·{v1},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->maybeCloseAndLogError(Landroid/os/ParcelFileDescriptor;)V |
| |
575 | ····return-object·v2 | 369 | ····return-object·v2 |
| |
576 | ····:goto_2 | 370 | ····:goto_2 |
577 | ····invoke-static·{v2},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->maybeCloseAndLogError(Landroid/os/ParcelFileDescriptor;)V | 371 | ····invoke-static·{v2},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->maybeCloseAndLogError(Landroid/os/ParcelFileDescriptor;)V |
| |
578 | ····.line·353 | 372 | ····.line·179 |
579 | ····throw·p0 | 373 | ····throw·p0 |
580 | .end·method | 374 | .end·method |
| |
581 | .method·private·getMatchedModelFiles(Ljava/io/File;)Lcom/google/common/collect/ImmutableList; | 375 | .method·private·getFactoryModels()Lcom/google/common/collect/ImmutableList; |
582 | ····.locals·6 | 376 | ····.locals·7 |
583 | ····.annotation·system·Ldalvik/annotation/Signature; | 377 | ····.annotation·system·Ldalvik/annotation/Signature; |
584 | ········value·=·{ | 378 | ········value·=·{ |
585 | ············"(", | 379 | ············"()", |
586 | ············"Ljava/io/File;", | |
587 | ············")", | |
588 | ············"Lcom/google/common/collect/ImmutableList<", | 380 | ············"Lcom/google/common/collect/ImmutableList<", |
589 | ············"Lcom/android/textclassifier/ModelFileManager$ModelFile;", | 381 | ············"Lcom/android/textclassifier/ModelFileManager$ModelFile;", |
590 | ············">;" | 382 | ············">;" |
591 | ········} | 383 | ········} |
592 | ····.end·annotation | 384 | ····.end·annotation |
| |
593 | ····.line·302 | 385 | ····.line·129 |
594 | ····invoke-static·{},·Lcom/google/common/collect/ImmutableList;->builder()Lcom/google/common/collect/ImmutableList$Builder; | 386 | ····new-instance·v0,·Ljava/util/ArrayList; |
| |
595 | ····move-result-object·v0 | 387 | ····invoke-direct·{v0},·Ljava/util/ArrayList;-><init>()V |
| |
596 | ····.line·303 | 388 | ····.line·130 |
597 | ····invoke-virtual·{p1},·Ljava/io/File;->exists()Z | 389 | ····iget-object·v1,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->factoryModelDir:Ljava/io/File; |
| |
| 390 | ····invoke-virtual·{v1},·Ljava/io/File;->exists()Z |
| |
598 | ····move-result·v1 | 391 | ····move-result·v1 |
| |
599 | ····if-eqz·v1,·:cond_1 | 392 | ····if-eqz·v1,·:cond_1 |
| |
600 | ····invoke-virtual·{p1},·Ljava/io/File;->isDirectory()Z | 393 | ····iget-object·v1,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->factoryModelDir:Ljava/io/File; |
| |
| 394 | ····invoke-virtual·{v1},·Ljava/io/File;->isDirectory()Z |
| |
601 | ····move-result·v1 | 395 | ····move-result·v1 |
| |
602 | ····if-eqz·v1,·:cond_1 | 396 | ····if-eqz·v1,·:cond_1 |
| |
603 | ····.line·304 | 397 | ····.line·131 |
604 | ····invoke-virtual·{p1},·Ljava/io/File;->listFiles()[Ljava/io/File; | 398 | ····iget-object·v1,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->factoryModelDir:Ljava/io/File; |
| |
605 | ····move-result-object·p1 | 399 | ····invoke-virtual·{v1},·Ljava/io/File;->listFiles()[Ljava/io/File; |
| |
606 | ····.line·305 | 400 | ····move-result-object·v1 |
607 | ····array-length·v1,·p1 | |
| |
608 | ····const/4·v2,·0x0 | 401 | ····.line·132 |
| 402 | ····array-length·v2,·v1 |
| |
| 403 | ····const/4·v3,·0x0 |
| |
609 | ····:goto_0 | 404 | ····:goto_0 |
610 | ····if-ge·v2,·v1,·:cond_1 | 405 | ····if-ge·v3,·v2,·:cond_1 |
| |
611 | ····aget-object·v3,·p1,·v2 | 406 | ····aget-object·v4,·v1,·v3 |
| |
612 | ····.line·306 | 407 | ····.line·133 |
613 | ····iget-object·v4,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->modelFilenamePattern:Ljava/util/regex/Pattern; | 408 | ····iget-object·v5,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->modelFilenamePattern:Ljava/util/regex/Pattern; |
| |
614 | ····invoke-virtual·{v3},·Ljava/io/File;->getName()Ljava/lang/String; | 409 | ····invoke-virtual·{v4},·Ljava/io/File;->getName()Ljava/lang/String; |
| |
615 | ····move-result-object·v5 | 410 | ····move-result-object·v6 |
| |
616 | ····invoke-virtual·{v4,·v5},·Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; | 411 | ····invoke-virtual·{v5,·v6},·Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; |
| |
617 | ····move-result-object·v4 | 412 | ····move-result-object·v5 |
| |
618 | ····.line·307 | 413 | ····.line·134 |
619 | ····invoke-virtual·{v4},·Ljava/util/regex/Matcher;->matches()Z | 414 | ····invoke-virtual·{v5},·Ljava/util/regex/Matcher;->matches()Z |
| |
620 | ····move-result·v4 | 415 | ····move-result·v5 |
| |
621 | ····if-eqz·v4,·:cond_0 | 416 | ····if-eqz·v5,·:cond_0 |
| |
622 | ····invoke-virtual·{v3},·Ljava/io/File;->isFile()Z | 417 | ····invoke-virtual·{v4},·Ljava/io/File;->isFile()Z |
| |
623 | ····move-result·v4 | 418 | ····move-result·v5 |
| |
624 | ····if-eqz·v4,·:cond_0 | 419 | ····if-eqz·v5,·:cond_0 |
| |
625 | ····.line·308 | 420 | ····.line·135 |
626 | ····invoke-direct·{p0,·v3},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->createModelFile(Ljava/io/File;)Lcom/android/textclassifier/ModelFileManager$ModelFile; | 421 | ····invoke-direct·{p0,·v4},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->createModelFile(Ljava/io/File;)Lcom/android/textclassifier/ModelFileManager$ModelFile; |
| |
627 | ····move-result-object·v3 | 422 | ····move-result-object·v4 |
| |
628 | ····if-eqz·v3,·:cond_0 | 423 | ····if-eqz·v4,·:cond_0 |
| |
629 | ····.line·310 | 424 | ····.line·137 |
630 | ····invoke-virtual·{v0,·v3},·Lcom/google/common/collect/ImmutableList$Builder;->add(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableList$Builder; | 425 | ····invoke-interface·{v0,·v4},·Ljava/util/List;->add(Ljava/lang/Object;)Z |
| |
631 | ····:cond_0 | 426 | ····:cond_0 |
632 | ····add-int/lit8·v2,·v2,·0x1 | 427 | ····add-int/lit8·v3,·v3,·0x1 |
| |
633 | ····goto·:goto_0 | 428 | ····goto·:goto_0 |
| |
634 | ····.line·315 | 429 | ····.line·142 |
635 | ····:cond_1 | 430 | ····:cond_1 |
636 | ····invoke-virtual·{v0},·Lcom/google/common/collect/ImmutableList$Builder;->build()Lcom/google/common/collect/ImmutableList; | 431 | ····invoke-static·{v0},·Lcom/google/common/collect/ImmutableList;->copyOf(Ljava/util/Collection;)Lcom/google/common/collect/ImmutableList; |
| |
637 | ····move-result-object·p0 | 432 | ····move-result-object·p0 |
| |
638 | ····return-object·p0 | 433 | ····return-object·p0 |
639 | .end·method | 434 | .end·method |
| |
640 | .method·static·synthetic·lambda$static$0(Ljava/lang/Integer;)Ljava/lang/String; | |
641 | ····.locals·0 | |
| |
642 | ····const-string·p0,·"*" | |
| |
643 | ····return-object·p0 | |
644 | .end·method | |
| |
645 | .method·private·static·maybeCloseAndLogError(Landroid/os/ParcelFileDescriptor;)V | 435 | .method·private·static·maybeCloseAndLogError(Landroid/os/ParcelFileDescriptor;)V |
646 | ····.locals·2 | 436 | ····.locals·2 |
| |
647 | ····if-nez·p0,·:cond_0 | 437 | ····if-nez·p0,·:cond_0 |
| |
648 | ····return-void | 438 | ····return-void |
| |
649 | ····.line·362 | 439 | ····.line·188 |
650 | ····:cond_0 | 440 | ····:cond_0 |
651 | ····:try_start_0 | 441 | ····:try_start_0 |
652 | ····invoke-virtual·{p0},·Landroid/os/ParcelFileDescriptor;->close()V | 442 | ····invoke-virtual·{p0},·Landroid/os/ParcelFileDescriptor;->close()V |
653 | ····:try_end_0 | 443 | ····:try_end_0 |
654 | ····.catch·Ljava/io/IOException;·{:try_start_0·..·:try_end_0}·:catch_0 | 444 | ····.catch·Ljava/io/IOException;·{:try_start_0·..·:try_end_0}·:catch_0 |
| |
655 | ····goto·:goto_0 | 445 | ····goto·:goto_0 |
Offset 706, 15 lines modified | Offset 496, 15 lines modified |
706 | ····:catch_0 | 496 | ····:catch_0 |
707 | ····move-exception·p0 | 497 | ····move-exception·p0 |
| |
708 | ····const-string·v0,·"ModelFileManager" | 498 | ····const-string·v0,·"ModelFileManager" |
| |
709 | ····const-string·v1,·"Error·closing·file." | 499 | ····const-string·v1,·"Error·closing·file." |
| |
710 | ····.line·364 | 500 | ····.line·190 |
711 | ····invoke-static·{v0,·v1,·p0},·Lcom/android/textclassifier/common/base/TcLog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V | 501 | ····invoke-static·{v0,·v1,·p0},·Lcom/android/textclassifier/common/base/TcLog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V |
| |
712 | ····:goto_0 | 502 | ····:goto_0 |
713 | ····return-void | 503 | ····return-void |
714 | .end·method | 504 | .end·method |
| |
| |
Offset 726, 121 lines modified | Offset 516, 92 lines modified |
726 | ············"()", | 516 | ············"()", |
727 | ············"Lcom/google/common/collect/ImmutableList<", | 517 | ············"Lcom/google/common/collect/ImmutableList<", |
728 | ············"Lcom/android/textclassifier/ModelFileManager$ModelFile;", | 518 | ············"Lcom/android/textclassifier/ModelFileManager$ModelFile;", |
729 | ············">;" | 519 | ············">;" |
730 | ········} | 520 | ········} |
731 | ····.end·annotation | 521 | ····.end·annotation |
| |
732 | ····.line·280 | 522 | ····.line·110 |
733 | ····new-instance·v0,·Ljava/util/ArrayList; | 523 | ····new-instance·v0,·Ljava/util/ArrayList; |
| |
734 | ····invoke-direct·{v0},·Ljava/util/ArrayList;-><init>()V | 524 | ····invoke-direct·{v0},·Ljava/util/ArrayList;-><init>()V |
| |
735 | ····.line·282 | 525 | ····.line·112 |
736 | ····iget-object·v1,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->downloaderModelDir:Ljava/io/File; | 526 | ····iget-object·v1,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->updatedModelFile:Ljava/io/File; |
| |
737 | ····invoke-virtual·{v1},·Ljava/io/File;->exists()Z | 527 | ····invoke-virtual·{v1},·Ljava/io/File;->exists()Z |
| |
738 | ····move-result·v1 | 528 | ····move-result·v1 |
| |
739 | ····if-eqz·v1,·:cond_0 | 529 | ····if-eqz·v1,·:cond_0 |
| |
740 | ····iget-object·v1,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->settings:Lcom/android/textclassifier/TextClassifierSettings; | 530 | ····.line·113 |
| 531 | ····iget-object·v1,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->updatedModelFile:Ljava/io/File; |
741 | ····invoke-virtual·{v1},·Lcom/android/textclassifier/TextClassifierSettings;->isModelDownloadManagerEnabled()Z | |
| |
742 | ····move-result·v1 | |
| |
743 | ····if-eqz·v1,·:cond_0 | |
| |
744 | ····.line·283 | |
745 | ····iget-object·v1,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->downloaderModelDir:Ljava/io/File; | |
| |
746 | ····invoke-direct·{p0,·v1},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->getMatchedModelFiles(Ljava/io/File;)Lcom/google/common/collect/ImmutableList; | |
| |
747 | ····move-result-object·v1 | |
| |
748 | ····invoke-interface·{v0,·v1},·Ljava/util/List;->addAll(Ljava/util/Collection;)Z | |
| |
749 | ····.line·285 | |
750 | ····:cond_0 | |
751 | ····iget-object·v1,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->configUpdaterModelFile:Ljava/io/File; | |
| |
752 | ····invoke-virtual·{v1},·Ljava/io/File;->exists()Z | |
| |
753 | ····move-result·v1 | |
| |
754 | ····if-eqz·v1,·:cond_1 | |
| |
755 | ····.line·286 | |
756 | ····iget-object·v1,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->configUpdaterModelFile:Ljava/io/File; | |
| |
757 | ····invoke-direct·{p0,·v1},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->createModelFile(Ljava/io/File;)Lcom/android/textclassifier/ModelFileManager$ModelFile; | 532 | ····invoke-direct·{p0,·v1},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->createModelFile(Ljava/io/File;)Lcom/android/textclassifier/ModelFileManager$ModelFile; |
| |
758 | ····move-result-object·v1 | 533 | ····move-result-object·v1 |
| |
759 | ····if-eqz·v1,·:cond_1 | 534 | ····if-eqz·v1,·:cond_0 |
| |
760 | ····.line·288 | 535 | ····.line·115 |
761 | ····invoke-interface·{v0,·v1},·Ljava/util/List;->add(Ljava/lang/Object;)Z | 536 | ····invoke-interface·{v0,·v1},·Ljava/util/List;->add(Ljava/lang/Object;)Z |
| |
762 | ····.line·292 | 537 | ····.line·119 |
763 | ····:cond_1 | 538 | ····:cond_0 |
764 | ····iget-object·v1,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->lock:Ljava/lang/Object; | 539 | ····iget-object·v1,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->lock:Ljava/lang/Object; |
| |
765 | ····monitor-enter·v1 | 540 | ····monitor-enter·v1 |
| |
766 | ····.line·293 | 541 | ····.line·120 |
767 | ····:try_start_0 | 542 | ····:try_start_0 |
768 | ····iget-object·v2,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->factoryModels:Lcom/google/common/collect/ImmutableList; | 543 | ····iget-object·v2,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->factoryModels:Lcom/google/common/collect/ImmutableList; |
| |
769 | ····if-nez·v2,·:cond_2 | 544 | ····if-nez·v2,·:cond_1 |
| |
770 | ····.line·294 | |
771 | ····iget-object·v2,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->factoryModelDir:Ljava/io/File; | |
| |
772 | ····invoke-direct·{p0,·v2},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->getMatchedModelFiles(Ljava/io/File;)Lcom/google/common/collect/ImmutableList; | 545 | ····.line·121 |
| 546 | ····invoke-direct·{p0},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->getFactoryModels()Lcom/google/common/collect/ImmutableList; |
| |
773 | ····move-result-object·v2 | 547 | ····move-result-object·v2 |
| |
774 | ····iput-object·v2,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->factoryModels:Lcom/google/common/collect/ImmutableList; | 548 | ····iput-object·v2,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->factoryModels:Lcom/google/common/collect/ImmutableList; |
| |
775 | ····.line·296 | 549 | ····.line·123 |
776 | ····:cond_2 | 550 | ····:cond_1 |
777 | ····iget-object·p0,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->factoryModels:Lcom/google/common/collect/ImmutableList; | 551 | ····iget-object·p0,·p0,·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->factoryModels:Lcom/google/common/collect/ImmutableList; |
| |
778 | ····invoke-interface·{v0,·p0},·Ljava/util/List;->addAll(Ljava/util/Collection;)Z | 552 | ····invoke-interface·{v0,·p0},·Ljava/util/List;->addAll(Ljava/util/Collection;)Z |
| |
779 | ····.line·297 | 553 | ····.line·124 |
780 | ····monitor-exit·v1 | 554 | ····monitor-exit·v1 |
781 | ····:try_end_0 | 555 | ····:try_end_0 |
782 | ····.catchall·{:try_start_0·..·:try_end_0}·:catchall_0 | 556 | ····.catchall·{:try_start_0·..·:try_end_0}·:catchall_0 |
| |
783 | ····.line·298 | 557 | ····.line·125 |
784 | ····invoke-static·{v0},·Lcom/google/common/collect/ImmutableList;->copyOf(Ljava/util/Collection;)Lcom/google/common/collect/ImmutableList; | 558 | ····invoke-static·{v0},·Lcom/google/common/collect/ImmutableList;->copyOf(Ljava/util/Collection;)Lcom/google/common/collect/ImmutableList; |
| |
785 | ····move-result-object·p0 | 559 | ····move-result-object·p0 |
| |
786 | ····return-object·p0 | 560 | ····return-object·p0 |
| |
787 | ····:catchall_0 | 561 | ····:catchall_0 |
788 | ····move-exception·p0 | 562 | ····move-exception·p0 |
| |
789 | ····.line·297 | 563 | ····.line·124 |
790 | ····:try_start_1 | 564 | ····:try_start_1 |
791 | ····monitor-exit·v1 | 565 | ····monitor-exit·v1 |
792 | ····:try_end_1 | 566 | ····:try_end_1 |
793 | ····.catchall·{:try_start_1·..·:try_end_1}·:catchall_0 | 567 | ····.catchall·{:try_start_1·..·:try_end_1}·:catchall_0 |
| |
794 | ····throw·p0 | 568 | ····throw·p0 |
795 | .end·method | 569 | .end·method |
| |
796 | .method·public·bridge·synthetic·get()Ljava/lang/Object; | 570 | .method·public·bridge·synthetic·get()Ljava/lang/Object; |
797 | ····.locals·0 | 571 | ····.locals·0 |
| |
798 | ····.line·167 | 572 | ····.line·84 |
799 | ····invoke-virtual·{p0},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->get()Lcom/google/common/collect/ImmutableList; | 573 | ····invoke-virtual·{p0},·Lcom/android/textclassifier/ModelFileManager$ModelFileSupplierImpl;->get()Lcom/google/common/collect/ImmutableList; |
| |
800 | ····move-result-object·p0 | 574 | ····move-result-object·p0 |
| |
801 | ····return-object·p0 | 575 | ····return-object·p0 |
802 | .end·method | 576 | .end·method |