| | | |
Offset 1, 13 lines modified | Offset 1, 13 lines modified |
1 | .class·public·Lcom/android/textclassifier/ModelFileManager$AssetFilePatternMatchLister; | 1 | .class·public·Lcom/android/textclassifier/common/ModelFileManager$AssetFilePatternMatchLister; |
2 | .super·Ljava/lang/Object; | 2 | .super·Ljava/lang/Object; |
3 | .source·"ModelFileManager.java" | 3 | .source·"ModelFileManager.java" |
| |
4 | #·interfaces | 4 | #·interfaces |
5 | .implements·Lcom/android/textclassifier/ModelFileManager$ModelFileLister; | 5 | .implements·Lcom/android/textclassifier/common/ModelFileManager$ModelFileLister; |
| |
| |
6 | #·instance·fields | 6 | #·instance·fields |
7 | .field·private·final·assetManager:Landroid/content/res/AssetManager; | 7 | .field·private·final·assetManager:Landroid/content/res/AssetManager; |
| |
8 | .field·private·final·fileNamePattern:Ljava/util/regex/Pattern; | 8 | .field·private·final·fileNamePattern:Ljava/util/regex/Pattern; |
| |
Offset 30, 55 lines modified | Offset 30, 55 lines modified |
30 | ····invoke-direct·{p0},·Ljava/lang/Object;-><init>()V | 30 | ····invoke-direct·{p0},·Ljava/lang/Object;-><init>()V |
| |
31 | ····.line·2 | 31 | ····.line·2 |
32 | ····new-instance·v0,·Ljava/lang/Object; | 32 | ····new-instance·v0,·Ljava/lang/Object; |
| |
33 | ····invoke-direct·{v0},·Ljava/lang/Object;-><init>()V | 33 | ····invoke-direct·{v0},·Ljava/lang/Object;-><init>()V |
| |
34 | ····iput-object·v0,·p0,·Lcom/android/textclassifier/ModelFileManager$AssetFilePatternMatchLister;->lock:Ljava/lang/Object; | 34 | ····iput-object·v0,·p0,·Lcom/android/textclassifier/common/ModelFileManager$AssetFilePatternMatchLister;->lock:Ljava/lang/Object; |
| |
35 | ····.line·3 | 35 | ····.line·3 |
36 | ····invoke-static·{p1},·Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object; | 36 | ····invoke-static·{p1},·Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object; |
| |
37 | ····.line·4 | 37 | ····.line·4 |
38 | ····iput-object·p1,·p0,·Lcom/android/textclassifier/ModelFileManager$AssetFilePatternMatchLister;->assetManager:Landroid/content/res/AssetManager; | 38 | ····iput-object·p1,·p0,·Lcom/android/textclassifier/common/ModelFileManager$AssetFilePatternMatchLister;->assetManager:Landroid/content/res/AssetManager; |
| |
39 | ····.line·5 | 39 | ····.line·5 |
40 | ····iput-object·p2,·p0,·Lcom/android/textclassifier/ModelFileManager$AssetFilePatternMatchLister;->modelType:Ljava/lang/String; | 40 | ····iput-object·p2,·p0,·Lcom/android/textclassifier/common/ModelFileManager$AssetFilePatternMatchLister;->modelType:Ljava/lang/String; |
| |
41 | ····.line·6 | 41 | ····.line·6 |
42 | ····iput-object·p3,·p0,·Lcom/android/textclassifier/ModelFileManager$AssetFilePatternMatchLister;->pathToList:Ljava/lang/String; | 42 | ····iput-object·p3,·p0,·Lcom/android/textclassifier/common/ModelFileManager$AssetFilePatternMatchLister;->pathToList:Ljava/lang/String; |
| |
43 | ····.line·7 | 43 | ····.line·7 |
44 | ····invoke-static·{p4},·Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern; | 44 | ····invoke-static·{p4},·Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern; |
| |
45 | ····move-result-object·p1 | 45 | ····move-result-object·p1 |
| |
46 | ····iput-object·p1,·p0,·Lcom/android/textclassifier/ModelFileManager$AssetFilePatternMatchLister;->fileNamePattern:Ljava/util/regex/Pattern; | 46 | ····iput-object·p1,·p0,·Lcom/android/textclassifier/common/ModelFileManager$AssetFilePatternMatchLister;->fileNamePattern:Ljava/util/regex/Pattern; |
| |
47 | ····.line·8 | 47 | ····.line·8 |
48 | ····iput-object·p5,·p0,·Lcom/android/textclassifier/ModelFileManager$AssetFilePatternMatchLister;->isEnabled:Lcom/google/common/base/Supplier; | 48 | ····iput-object·p5,·p0,·Lcom/android/textclassifier/common/ModelFileManager$AssetFilePatternMatchLister;->isEnabled:Lcom/google/common/base/Supplier; |
| |
49 | ····.line·9 | 49 | ····.line·9 |
50 | ····new-instance·p1,·Landroidx/collection/ArrayMap; | 50 | ····new-instance·p1,·Landroidx/collection/ArrayMap; |
| |
51 | ····invoke-direct·{p1},·Landroidx/collection/ArrayMap;-><init>()V | 51 | ····invoke-direct·{p1},·Landroidx/collection/ArrayMap;-><init>()V |
| |
52 | ····iput-object·p1,·p0,·Lcom/android/textclassifier/ModelFileManager$AssetFilePatternMatchLister;->resultCache:Ljava/util/Map; | 52 | ····iput-object·p1,·p0,·Lcom/android/textclassifier/common/ModelFileManager$AssetFilePatternMatchLister;->resultCache:Ljava/util/Map; |
| |
53 | ····return-void | 53 | ····return-void |
54 | .end·method | 54 | .end·method |
| |
| |
55 | #·virtual·methods | 55 | #·virtual·methods |
56 | .method·public·list(Ljava/lang/String;)Ljava/util/List; | 56 | .method·public·list(Ljava/lang/String;)Ljava/util/List; |
57 | ····.locals·8 | 57 | ····.locals·8 |
| |
58 | ····.line·1 | 58 | ····.line·1 |
59 | ····iget-object·v0,·p0,·Lcom/android/textclassifier/ModelFileManager$AssetFilePatternMatchLister;->modelType:Ljava/lang/String; | 59 | ····iget-object·v0,·p0,·Lcom/android/textclassifier/common/ModelFileManager$AssetFilePatternMatchLister;->modelType:Ljava/lang/String; |
| |
60 | ····invoke-virtual·{v0,·p1},·Ljava/lang/String;->equals(Ljava/lang/Object;)Z | 60 | ····invoke-virtual·{v0,·p1},·Ljava/lang/String;->equals(Ljava/lang/Object;)Z |
| |
61 | ····move-result·v0 | 61 | ····move-result·v0 |
| |
62 | ····if-nez·v0,·:cond_0 | 62 | ····if-nez·v0,·:cond_0 |
| |
Offset 87, 15 lines modified | Offset 87, 15 lines modified |
| |
87 | ····move-result-object·p0 | 87 | ····move-result-object·p0 |
| |
88 | ····goto/16·:goto_3 | 88 | ····goto/16·:goto_3 |
| |
89 | ····.line·3 | 89 | ····.line·3 |
90 | ····:cond_0 | 90 | ····:cond_0 |
91 | ····iget-object·v0,·p0,·Lcom/android/textclassifier/ModelFileManager$AssetFilePatternMatchLister;->isEnabled:Lcom/google/common/base/Supplier; | 91 | ····iget-object·v0,·p0,·Lcom/android/textclassifier/common/ModelFileManager$AssetFilePatternMatchLister;->isEnabled:Lcom/google/common/base/Supplier; |
| |
92 | ····invoke-interface·{v0},·Lcom/google/common/base/Supplier;->get()Ljava/lang/Object; | 92 | ····invoke-interface·{v0},·Lcom/google/common/base/Supplier;->get()Ljava/lang/Object; |
| |
93 | ····move-result-object·v0 | 93 | ····move-result-object·v0 |
| |
94 | ····check-cast·v0,·Ljava/lang/Boolean; | 94 | ····check-cast·v0,·Ljava/lang/Boolean; |
| |
Offset 110, 30 lines modified | Offset 110, 30 lines modified |
| |
110 | ····move-result-object·p0 | 110 | ····move-result-object·p0 |
| |
111 | ····goto/16·:goto_3 | 111 | ····goto/16·:goto_3 |
| |
112 | ····.line·5 | 112 | ····.line·5 |
113 | ····:cond_1 | 113 | ····:cond_1 |
114 | ····iget-object·v0,·p0,·Lcom/android/textclassifier/ModelFileManager$AssetFilePatternMatchLister;->lock:Ljava/lang/Object; | 114 | ····iget-object·v0,·p0,·Lcom/android/textclassifier/common/ModelFileManager$AssetFilePatternMatchLister;->lock:Ljava/lang/Object; |
| |
115 | ····monitor-enter·v0 | 115 | ····monitor-enter·v0 |
| |
116 | ····.line·6 | 116 | ····.line·6 |
117 | ····:try_start_0 | 117 | ····:try_start_0 |
118 | ····iget-object·v1,·p0,·Lcom/android/textclassifier/ModelFileManager$AssetFilePatternMatchLister;->resultCache:Ljava/util/Map; | 118 | ····iget-object·v1,·p0,·Lcom/android/textclassifier/common/ModelFileManager$AssetFilePatternMatchLister;->resultCache:Ljava/util/Map; |
| |
119 | ····invoke-interface·{v1,·p1},·Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; | 119 | ····invoke-interface·{v1,·p1},·Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; |
| |
120 | ····move-result-object·v1 | 120 | ····move-result-object·v1 |
| |
121 | ····if-eqz·v1,·:cond_2 | 121 | ····if-eqz·v1,·:cond_2 |
| |
122 | ····.line·7 | 122 | ····.line·7 |
123 | ····iget-object·p0,·p0,·Lcom/android/textclassifier/ModelFileManager$AssetFilePatternMatchLister;->resultCache:Ljava/util/Map; | 123 | ····iget-object·p0,·p0,·Lcom/android/textclassifier/common/ModelFileManager$AssetFilePatternMatchLister;->resultCache:Ljava/util/Map; |
| |
124 | ····invoke-interface·{p0,·p1},·Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; | 124 | ····invoke-interface·{p0,·p1},·Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; |
| |
125 | ····move-result-object·p0 | 125 | ····move-result-object·p0 |
| |
126 | ····check-cast·p0,·Lcom/google/common/collect/ImmutableList; | 126 | ····check-cast·p0,·Lcom/google/common/collect/ImmutableList; |
| |
Offset 144, 17 lines modified | Offset 144, 17 lines modified |
144 | ····goto/16·:goto_3 | 144 | ····goto/16·:goto_3 |
| |
145 | ····:cond_2 | 145 | ····:cond_2 |
146 | ····const/4·v1,·0x0 | 146 | ····const/4·v1,·0x0 |
| |
147 | ····.line·8 | 147 | ····.line·8 |
148 | ····:try_start_1 | 148 | ····:try_start_1 |
149 | ····iget-object·v2,·p0,·Lcom/android/textclassifier/ModelFileManager$AssetFilePatternMatchLister;->assetManager:Landroid/content/res/AssetManager; | 149 | ····iget-object·v2,·p0,·Lcom/android/textclassifier/common/ModelFileManager$AssetFilePatternMatchLister;->assetManager:Landroid/content/res/AssetManager; |
| |
150 | ····iget-object·v3,·p0,·Lcom/android/textclassifier/ModelFileManager$AssetFilePatternMatchLister;->pathToList:Ljava/lang/String; | 150 | ····iget-object·v3,·p0,·Lcom/android/textclassifier/common/ModelFileManager$AssetFilePatternMatchLister;->pathToList:Ljava/lang/String; |
| |
151 | ····invoke-virtual·{v2,·v3},·Landroid/content/res/AssetManager;->list(Ljava/lang/String;)[Ljava/lang/String; | 151 | ····invoke-virtual·{v2,·v3},·Landroid/content/res/AssetManager;->list(Ljava/lang/String;)[Ljava/lang/String; |
| |
152 | ····move-result-object·v1 | 152 | ····move-result-object·v1 |
153 | ····:try_end_1 | 153 | ····:try_end_1 |
154 | ····.catch·Ljava/io/IOException;·{:try_start_1·..·:try_end_1}·:catch_0 | 154 | ····.catch·Ljava/io/IOException;·{:try_start_1·..·:try_end_1}·:catch_0 |
155 | ····.catchall·{:try_start_1·..·:try_end_1}·:catchall_0 | 155 | ····.catchall·{:try_start_1·..·:try_end_1}·:catchall_0 |
Offset 203, 15 lines modified | Offset 203, 15 lines modified |
| |
203 | ····:goto_1 | 203 | ····:goto_1 |
204 | ····if-ge·v4,·v3,·:cond_5 | 204 | ····if-ge·v4,·v3,·:cond_5 |
| |
205 | ····aget-object·v5,·v1,·v4 | 205 | ····aget-object·v5,·v1,·v4 |
| |
206 | ····.line·15 | 206 | ····.line·15 |
207 | ····iget-object·v6,·p0,·Lcom/android/textclassifier/ModelFileManager$AssetFilePatternMatchLister;->fileNamePattern:Ljava/util/regex/Pattern; | 207 | ····iget-object·v6,·p0,·Lcom/android/textclassifier/common/ModelFileManager$AssetFilePatternMatchLister;->fileNamePattern:Ljava/util/regex/Pattern; |
| |
208 | ····invoke-virtual·{v6,·v5},·Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; | 208 | ····invoke-virtual·{v6,·v5},·Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; |
| |
209 | ····move-result-object·v6 | 209 | ····move-result-object·v6 |
| |
210 | ····.line·16 | 210 | ····.line·16 |
211 | ····invoke-virtual·{v6},·Ljava/util/regex/Matcher;->matches()Z | 211 | ····invoke-virtual·{v6},·Ljava/util/regex/Matcher;->matches()Z |
Offset 222, 15 lines modified | Offset 222, 15 lines modified |
| |
222 | ····goto·:goto_2 | 222 | ····goto·:goto_2 |
| |
223 | ····.line·17 | 223 | ····.line·17 |
224 | ····:cond_4 | 224 | ····:cond_4 |
225 | ····new-instance·v6,·Ljava/lang/StringBuilder; | 225 | ····new-instance·v6,·Ljava/lang/StringBuilder; |
| |
226 | ····iget-object·v7,·p0,·Lcom/android/textclassifier/ModelFileManager$AssetFilePatternMatchLister;->pathToList:Ljava/lang/String; | 226 | ····iget-object·v7,·p0,·Lcom/android/textclassifier/common/ModelFileManager$AssetFilePatternMatchLister;->pathToList:Ljava/lang/String; |
| |
227 | ····invoke-direct·{v6,·v7},·Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V | 227 | ····invoke-direct·{v6,·v7},·Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V |
| |
228 | ····const/16·v7,·0x2f | 228 | ····const/16·v7,·0x2f |
| |
229 | ····.line·18 | 229 | ····.line·18 |
230 | ····invoke-virtual·{v6,·v7},·Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder; | 230 | ····invoke-virtual·{v6,·v7},·Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder; |
Offset 241, 17 lines modified | Offset 241, 17 lines modified |
| |
241 | ····move-result-object·v5 | 241 | ····move-result-object·v5 |
242 | ····:try_end_2 | 242 | ····:try_end_2 |
243 | ····.catchall·{:try_start_2·..·:try_end_2}·:catchall_0 | 243 | ····.catchall·{:try_start_2·..·:try_end_2}·:catchall_0 |
| |
244 | ····.line·19 | 244 | ····.line·19 |
245 | ····:try_start_3 | 245 | ····:try_start_3 |
246 | ····iget-object·v6,·p0,·Lcom/android/textclassifier/ModelFileManager$AssetFilePatternMatchLister;->assetManager:Landroid/content/res/AssetManager; | 246 | ····iget-object·v6,·p0,·Lcom/android/textclassifier/common/ModelFileManager$AssetFilePatternMatchLister;->assetManager:Landroid/content/res/AssetManager; |
| |
247 | ····invoke-static·{v6,·v5,·p1},·Lcom/android/textclassifier/ModelFileManager$ModelFile;->createFromAsset(Landroid/content/res/AssetManager;Ljava/lang/String;Ljava/lang/String;)Lcom/android/textclassifier/ModelFileManager$ModelFile; | 247 | ····invoke-static·{v6,·v5,·p1},·Lcom/android/textclassifier/common/ModelFileManager$ModelFile;->createFromAsset(Landroid/content/res/AssetManager;Ljava/lang/String;Ljava/lang/String;)Lcom/android/textclassifier/common/ModelFileManager$ModelFile; |
| |
248 | ····move-result-object·v6 | 248 | ····move-result-object·v6 |
| |
249 | ····invoke-virtual·{v2,·v6},·Lcom/google/common/collect/ImmutableList$Builder;->add(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableList$Builder; | 249 | ····invoke-virtual·{v2,·v6},·Lcom/google/common/collect/ImmutableList$Builder;->add(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableList$Builder; |
250 | ····:try_end_3 | 250 | ····:try_end_3 |
251 | ····.catch·Ljava/io/IOException;·{:try_start_3·..·:try_end_3}·:catch_1 | 251 | ····.catch·Ljava/io/IOException;·{:try_start_3·..·:try_end_3}·:catch_1 |
252 | ····.catchall·{:try_start_3·..·:try_end_3}·:catchall_0 | 252 | ····.catchall·{:try_start_3·..·:try_end_3}·:catchall_0 |
Offset 290, 15 lines modified | Offset 290, 15 lines modified |
290 | ····.line·22 | 290 | ····.line·22 |
291 | ····:cond_5 | 291 | ····:cond_5 |
292 | ····invoke-virtual·{v2},·Lcom/google/common/collect/ImmutableList$Builder;->build()Lcom/google/common/collect/ImmutableList; | 292 | ····invoke-virtual·{v2},·Lcom/google/common/collect/ImmutableList$Builder;->build()Lcom/google/common/collect/ImmutableList; |
| |
293 | ····move-result-object·v1 | 293 | ····move-result-object·v1 |
| |
294 | ····.line·23 | 294 | ····.line·23 |
295 | ····iget-object·p0,·p0,·Lcom/android/textclassifier/ModelFileManager$AssetFilePatternMatchLister;->resultCache:Ljava/util/Map; | 295 | ····iget-object·p0,·p0,·Lcom/android/textclassifier/common/ModelFileManager$AssetFilePatternMatchLister;->resultCache:Ljava/util/Map; |
| |
296 | ····invoke-interface·{p0,·p1,·v1},·Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; | 296 | ····invoke-interface·{p0,·p1,·v1},·Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; |
| |
297 | ····.line·24 | 297 | ····.line·24 |
298 | ····monitor-exit·v0 | 298 | ····monitor-exit·v0 |
| |
299 | ····move-object·p0,·v1 | 299 | ····move-object·p0,·v1 |