Offset 1, 243 lines modifiedOffset 1, 360 lines modified
  
1 package·com.android.textclassifier;1 package·com.android.textclassifier;
  
2 import·java.util.Collection; 
3 import·java.io.IOException;2 import·java.io.IOException;
4 import·com.google.common.collect.ImmutableList$Builder; 
5 import·java.util.Iterator; 
6 import·java.io.FileNotFoundException; 
7 import·java.util.List; 
8 import·com.google.common.base.Splitter; 
9 import·java.util.Locale; 
10 import·java.util.ArrayList; 
11 import·com.android.textclassifier.common.base.TcLog;3 import·com.android.textclassifier.common.base.TcLog;
12 import·android.os.ParcelFileDescriptor;4 import·android.os.ParcelFileDescriptor;
 5 import·java.util.Collection;
 6 import·java.util.ArrayList;
13 import·com.google.common.base.Preconditions;7 import·com.google.common.base.Preconditions;
14 import·java.util.function.Function;8 import·java.util.function.Function;
15 import·java.util.regex.Pattern;9 import·java.util.regex.Pattern;
16 import·com.google.common.collect.ImmutableList;10 import·com.google.common.collect.ImmutableList;
17 import·java.io.File;11 import·java.io.File;
18 import·com.google.common.collect.ImmutableMap; 
19 import·java.util.function.Supplier;12 import·java.util.function.Supplier;
  
20 final·class·ModelFileManager$ModelFileSupplierImpl·implements·Supplier13 public·final·class·ModelFileManager$ModelFileSupplierImpl·implements·Supplier
21 {14 {
22 ····private·static·final·ImmutableMap·MODEL_FILE_INFO_MAP; 
23 ····private·final·File·configUpdaterModelFile; 
24 ····private·final·File·downloaderModelDir; 
25 ····private·final·File·factoryModelDir;15 ····private·final·File·factoryModelDir;
26 ····private·ImmutableList·factoryModels;16 ····private·ImmutableList·factoryModels;
27 ····private·final·Object·lock;17 ····private·final·Object·lock;
28 ····private·final·Pattern·modelFilenamePattern;18 ····private·final·Pattern·modelFilenamePattern;
29 ····private·final·String·modelType; 
30 ····private·final·TextClassifierSettings·settings; 
31 ····private·final·Function·supportedLocalesSupplier;19 ····private·final·Function·supportedLocalesSupplier;
 20 ····private·final·File·updatedModelFile;
32 ····private·final·Function·versionSupplier;21 ····private·final·Function·versionSupplier;
33 ····22 ····
34 ····static·{23 ····public·ModelFileManager$ModelFileSupplierImpl(File·factoryModelDir,·final·String·s,·File·updatedModelFile,·Function·versionSupplier,·Function·supportedLocalesSupplier)·{
35 ········MODEL_FILE_INFO_MAP·=·ImmutableMap.builder().put((Object)"annotator",·(Object)new·ModelFileManager$ModelFileSupplierImpl$ModelFileInfo("(annotator|textclassifier)\\.(.*)\\.model",·"/data/misc/textclassifier/textclassifier.model",·(Function)-$$Lambda$jJq8RXuVdjYF3lPq-77PEw1NJLM.INSTANCE,·(Function)-$$Lambda$NxwbyZSxofZ4Z5SQhfXmtLQ1nxk.INSTANCE)).put((Object)"lang_id",·(Object)new·ModelFileManager$ModelFileSupplierImpl$ModelFileInfo("lang_id.model",·"/data/misc/textclassifier/lang_id.model",·(Function)-$$Lambda$0biFK4yZBmWN1EO2wtnXskzuEcE.INSTANCE,·(Function)-$$Lambda$ModelFileManager$ModelFileSupplierImpl$fMYSxifD0V8sHsS4KyfvDE-HosE.INSTANCE)).put((Object)"actions_suggestions",·(Object)new·ModelFileManager$ModelFileSupplierImpl$ModelFileInfo("actions_suggestions\\.(.*)\\.model",·"/data/misc/textclassifier/actions_suggestions.model",·(Function)-$$Lambda$9N8WImc0VBjy2oxI_Gk5_Pbye_A.INSTANCE,·(Function)-$$Lambda$XeE_KI7QgMKzF9vYRSoFWAolyuA.INSTANCE)).build(); 
36 ····} 
37 ···· 
38 ····public·ModelFileManager$ModelFileSupplierImpl(final·TextClassifierSettings·textClassifierSettings,·final·String·s,·final·File·file)·{ 
39 ········this(textClassifierSettings,·s,·new·File("/etc/textclassifier/"),·((ModelFileManager$ModelFileSupplierImpl$ModelFileInfo)ModelFileManager$ModelFileSupplierImpl.MODEL_FILE_INFO_MAP.get((Object)s)).getModelNameRegex(),·new·File(((ModelFileManager$ModelFileSupplierImpl$ModelFileInfo)ModelFileManager$ModelFileSupplierImpl.MODEL_FILE_INFO_MAP.get((Object)s)).getConfigUpdaterModelPath()),·file,·((ModelFileManager$ModelFileSupplierImpl$ModelFileInfo)ModelFileManager$ModelFileSupplierImpl.MODEL_FILE_INFO_MAP.get((Object)s)).getVersionSupplier(),·((ModelFileManager$ModelFileSupplierImpl$ModelFileInfo)ModelFileManager$ModelFileSupplierImpl.MODEL_FILE_INFO_MAP.get((Object)s)).getSupportedLocalesSupplier()); 
40 ····} 
41 ···· 
42 ····ModelFileManager$ModelFileSupplierImpl(TextClassifierSettings·settings,·String·modelType,·File·factoryModelDir,·final·String·s,·File·configUpdaterModelFile,·File·downloaderModelDir,·Function·versionSupplier,·Function·supportedLocalesSupplier)·{ 
43 ········this.lock·=·new·Object();24 ········this.lock·=·new·Object();
44 ········Preconditions.checkNotNull((Object)settings);25 ········Preconditions.checkNotNull((Object)updatedModelFile);
45 ········settings·=·settings;26 ········updatedModelFile·=·updatedModelFile;
46 ········this.settings·=·settings;27 ········this.updatedModelFile·=·updatedModelFile;
47 ········Preconditions.checkNotNull((Object)modelType); 
48 ········modelType·=·modelType; 
49 ········this.modelType·=·modelType; 
50 ········Preconditions.checkNotNull((Object)factoryModelDir);28 ········Preconditions.checkNotNull((Object)factoryModelDir);
51 ········factoryModelDir·=·factoryModelDir;29 ········factoryModelDir·=·factoryModelDir;
52 ········this.factoryModelDir·=·factoryModelDir;30 ········this.factoryModelDir·=·factoryModelDir;
53 ········Preconditions.checkNotNull((Object)s);31 ········Preconditions.checkNotNull((Object)s);
54 ········this.modelFilenamePattern·=·Pattern.compile(s);32 ········this.modelFilenamePattern·=·Pattern.compile(s);
55 ········Preconditions.checkNotNull((Object)configUpdaterModelFile); 
56 ········configUpdaterModelFile·=·configUpdaterModelFile; 
57 ········this.configUpdaterModelFile·=·configUpdaterModelFile; 
58 ········Preconditions.checkNotNull((Object)downloaderModelDir); 
59 ········downloaderModelDir·=·downloaderModelDir; 
60 ········this.downloaderModelDir·=·downloaderModelDir; 
61 ········Preconditions.checkNotNull((Object)versionSupplier);33 ········Preconditions.checkNotNull((Object)versionSupplier);
62 ········versionSupplier·=·versionSupplier;34 ········versionSupplier·=·versionSupplier;
63 ········this.versionSupplier·=·versionSupplier;35 ········this.versionSupplier·=·versionSupplier;
64 ········Preconditions.checkNotNull((Object)supportedLocalesSupplier);36 ········Preconditions.checkNotNull((Object)supportedLocalesSupplier);
65 ········supportedLocalesSupplier·=·supportedLocalesSupplier;37 ········supportedLocalesSupplier·=·supportedLocalesSupplier;
66 ········this.supportedLocalesSupplier·=·supportedLocalesSupplier;38 ········this.supportedLocalesSupplier·=·supportedLocalesSupplier;
67 ····}39 ····}
68 ····40 ····
69 ····private·ModelFileManager$ModelFile·createModelFile(final·File·file)·{41 ····private·ModelFileManager$ModelFile·createModelFile(final·File·p0)·{
70 ········final·String·s·=·"ModelFileManager";42 ········//·
71 ········final·boolean·exists·=·file.exists();43 ········//·This·method·could·not·be·decompiled.
72 ········final·ParcelFileDescriptor·parcelFileDescriptor·=·null;44 ········//·
73 ········if·(!exists)·{45 ········//·Original·Bytecode:
74 ············return·null;46 ········//·
75 ········}47 ········//·····2:·astore_2·······
76 ········final·int·n·=·268435456;48 ········//·····3:·aload_1········
77 ········Label_0396:·{49 ········//·····4:·invokevirtual···java/io/File.exists:()Z
78 ············ParcelFileDescriptor·open;50 ········//·····7:·istore_3·······
79 ············try·{51 ········//·····8:·aconst_null····
80 ················open·=·ParcelFileDescriptor.open(file,·n);52 ········//·····9:·astore··········4
81 ················if·(open·==·null)·{53 ········//····11:·iload_3········
82 ····················maybeCloseAndLogError(open);54 ········//····12:·ifne············17
83 ····················return·null;55 ········//····15:·aconst_null····
84 ················}56 ········//····16:·areturn········
85 ················int·intValue·=·0;57 ········//····17:·ldc·············268435456
86 ················String·s2·=·null;58 ········//····19:·istore_3·······
87 ················ArrayList<Locale>·list·=·null;59 ········//····20:·aload_1········
88 ················ModelFileManager$ModelFile·modelFileManager$ModelFile·=·null;60 ········//····21:·iload_3········
89 ················try·{61 ········//····22:·invokestatic····android/os/ParcelFileDescriptor.open:(Ljava/io/File;I)Landroid/os/ParcelFileDescriptor;
90 ····················final·int·fd·=·open.getFd();62 ········//····25:·astore··········5
91 ····················try·{63 ········//····27:·aload···········5
92 ························final·Function·versionSupplier·=·this.versionSupplier;64 ········//····29:·ifnonnull·······39
93 ························try·{65 ········//····32:·aload···········5
94 ····························final·Integer·apply·=·versionSupplier.apply(fd);66 ········//····34:·invokestatic····com/android/textclassifier/ModelFileManager$ModelFileSupplierImpl.maybeCloseAndLogError:(Landroid/os/ParcelFileDescriptor;)V
95 ····························try·{67 ········//····37:·aconst_null····
96 ································final·Integer·n2·=·(Integer)apply;68 ········//····38:·areturn········
97 ································try·{69 ········//····39:·aload···········5
98 ····································intValue·=·n2;70 ········//····41:·invokevirtual···android/os/ParcelFileDescriptor.getFd:()I
99 ····································try·{71 ········//····44:·istore··········6
100 ········································final·Function·supportedLocalesSupplier·=·this.supportedLocalesSupplier;72 ········//····46:·aload_0········
101 ········································try·{73 ········//····47:·getfield········com/android/textclassifier/ModelFileManager$ModelFileSupplierImpl.versionSupplier:Ljava/util/function/Function;
102 ············································s2·=·supportedLocalesSupplier.apply(fd);74 ········//····50:·astore··········7
103 ············································try·{75 ········//····52:·iload···········6
104 ················································Label_0180:·{76 ········//····54:·invokestatic····java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
105 ····················································if·(!s2.isEmpty())·{77 ········//····57:·astore··········8
106 ························································break·Label_0180;78 ········//····59:·aload···········7
107 ····················································}79 ········//····61:·aload···········8
108 ····················································try·{80 ········//····63:·invokeinterface·java/util/function/Function.apply:(Ljava/lang/Object;)Ljava/lang/Object;
109 ························································final·StringBuilder·sb·=·new·StringBuilder();81 ········//····68:·astore··········7
110 ························································sb.append("Ignoring·");82 ········//····70:·aload···········7
111 ························································sb.append(file.getAbsolutePath());83 ········//····72:·checkcast·······Ljava/lang/Integer;
112 ························································TcLog.d(s,·sb.toString());84 ········//····75:·astore··········7
113 ························································maybeCloseAndLogError(open);85 ········//····77:·aload···········7
114 ························································return·null;86 ········//····79:·invokevirtual···java/lang/Integer.intValue:()I
115 ························································try·{87 ········//····82:·istore··········9
116 ····························································list·=·new·ArrayList<Locale>();88 ········//····84:·aload_0········
117 ····························································final·Iterable·split·=·Splitter.on(',').split((CharSequence)s2);89 ········//····85:·getfield········com/android/textclassifier/ModelFileManager$ModelFileSupplierImpl.supportedLocalesSupplier:Ljava/util/function/Function;
118 ····························································try·{90 ········//····88:·astore_0·······
119 ································································final·Iterator<String>·iterator·=·split.iterator();91 ········//····89:·iload···········6
120 ································································try·{92 ········//····91:·invokestatic····java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
121 ····································································while·(true)·{93 ········//····94:·astore··········10
122 ········································································Label_0269:·{94 ········//····96:·aload_0········
123 ············································································if·(!iterator.hasNext())·{95 ········//····97:·aload···········10
124 ················································································break·Label_0269;96 ········//····99:·invokeinterface·java/util/function/Function.apply:(Ljava/lang/Object;)Ljava/lang/Object;
125 ············································································}97 ········//···104:·astore_0·······
126 ············································································final·String·next·=·iterator.next();98 ········//···105:·aload_0········
127 ············································································try·{99 ········//···106:·astore··········11
128 ················································································final·String·s3·=·(String)next;100 ········//···108:·aload_0········
129 ················································································try·{101 ········//···109:·checkcast·······Ljava/lang/String;
130 ····················································································list.add(Locale.forLanguageTag(s3));102 ········//···112:·astore··········11
131 ····················································································continue;103 ········//···114:·aload···········11
132 ····················································································modelFileManager$ModelFile·=·new(com.android.textclassifier.ModelFileManager$ModelFile.class);104 ········//···116:·invokevirtual···java/lang/String.isEmpty:()Z
133 ····················································································final·ModelFileManager$ModelFileSupplierImpl·modelFileManager$ModelFileSupplierImpl·=·this;105 ········//···119:·istore··········12
134 ····················································································final·String·s4·=·modelFileManager$ModelFileSupplierImpl.modelType;106 ········//···121:·iload···········12
135 ····················································································final·String·s5·=·"*";107 ········//···123:·ifeq············175
136 ····················································································final·String·s6·=·s5;108 ········//···126:·new·············Ljava/lang/StringBuilder;
137 ····················································································final·String·s7·=·s2;109 ········//···129:·astore_0·······
138 ····················································································final·boolean·b·=·s6.equals(s7);110 ········//···130:·aload_0········
139 ····················································································final·ModelFileManager$ModelFile·modelFileManager$ModelFile2·=·modelFileManager$ModelFile;111 ········//···131:·invokespecial···java/lang/StringBuilder.<init>:()V
140 ····················································································final·String·s8·=·s4;112 ········//···134:·ldc·············"Ignoring·"
141 ····················································································final·File·file2·=·file;113 ········//···136:·astore··········10
142 ····················································································final·int·n3·=·intValue;114 ········//···138:·aload_0········
143 ····················································································final·ArrayList<Locale>·list2·=·list;115 ········//···139:·aload···········10
144 ····················································································final·String·s9·=·s2;116 ········//···141:·invokevirtual···java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
145 ····················································································final·boolean·b2·=·b;117 ········//···144:·pop············
146 ····················································································new·ModelFileManager$ModelFile(s8,·file2,·n3,·(List)list2,·s9,·b2);118 ········//···145:·aload_1········
147 ····················································································final·ParcelFileDescriptor·parcelFileDescriptor2·=·open;119 ········//···146:·invokevirtual···java/io/File.getAbsolutePath:()Ljava/lang/String;
148 ····················································································maybeCloseAndLogError(parcelFileDescriptor2);120 ········//···149:·astore··········10
149 ····················································································return·modelFileManager$ModelFile;121 ········//···151:·aload_0········
150 ················································································}122 ········//···152:·aload···········10
151 ················································································catch·(FileNotFoundException·ex2)·{}123 ········//···154:·invokevirtual···java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
152 ············································································}124 ········//···157:·pop············
153 ············································································catch·(FileNotFoundException·ex3)·{}125 ········//···158:·aload_0········
154 ········································································}126 ········//···159:·invokevirtual···java/lang/StringBuilder.toString:()Ljava/lang/String;
155 ····································································}127 ········//···162:·astore_0·······
156 ································································}128 ········//···163:·aload_2········
157 ································································catch·(FileNotFoundException·ex4)·{}129 ········//···164:·aload_0········
158 ····························································}130 ········//···165:·invokestatic····com/android/textclassifier/common/base/TcLog.d:(Ljava/lang/String;Ljava/lang/String;)V
159 ····························································catch·(FileNotFoundException·ex5)·{}131 ········//···168:·aload···········5
160 ························································}132 ········//···170:·invokestatic····com/android/textclassifier/ModelFileManager$ModelFileSupplierImpl.maybeCloseAndLogError:(Landroid/os/ParcelFileDescriptor;)V
161 ························································catch·(FileNotFoundException·ex6)·{}133 ········//···173:·aconst_null····
162 ····················································}134 ········//···174:·areturn········
163 ····················································catch·(FileNotFoundException·ex7)·{}135 ········//···175:·new·············Ljava/util/ArrayList;
164 ················································}136 ········//···178:·astore··········13
165 ············································}137 ········//···180:·aload···········13
166 ············································catch·(FileNotFoundException·ex8)·{}138 ········//···182:·invokespecial···java/util/ArrayList.<init>:()V
167 ········································}139 ········//···185:·bipush··········44
168 ········································catch·(FileNotFoundException·ex9)·{}140 ········//···187:·istore··········12
169 ····································}141 ········//···189:·iload···········12
170 ····································catch·(FileNotFoundException·ex10)·{}142 ········//···191:·invokestatic····com/google/common/base/Splitter.on:(C)Lcom/google/common/base/Splitter;
171 ································}143 ········//···194:·astore_0·······
172 ································catch·(FileNotFoundException·ex11)·{}144 ········//···195:·aload_0········
173 ····························}145 ········//···196:·aload···········11
174 ····························catch·(FileNotFoundException·ex12)·{}146 ········//···198:·invokevirtual···com/google/common/base/Splitter.split:(Ljava/lang/CharSequence;)Ljava/lang/Iterable;
175 ························}147 ········//···201:·astore_0·······
176 ························catch·(FileNotFoundException·ex13)·{}148 ········//···202:·aload_0········
177 ····················}149 ········//···203:·invokeinterface·java/lang/Iterable.iterator:()Ljava/util/Iterator;
178 ····················catch·(FileNotFoundException·ex14)·{}150 ········//···208:·astore_0·······
179 ················}151 ········//···209:·aload_0········
180 ················catch·(FileNotFoundException·ex15)·{}152 ········//···210:·invokeinterface·java/util/Iterator.hasNext:()Z
181 ················try·{153 ········//···215:·istore··········6
182 ····················final·ModelFileManager$ModelFileSupplierImpl·modelFileManager$ModelFileSupplierImpl·=·this;154 ········//···217:·iload···········6
183 ····················final·String·s4·=·modelFileManager$ModelFileSupplierImpl.modelType;155 ········//···219:·ifeq············257
184 ····················final·String·s6;156 ········//···222:·aload_0········
185 ····················final·String·s5·=·s6·=·"*";157 ········//···223:·invokeinterface·java/util/Iterator.next:()Ljava/lang/Object;
186 ····················final·String·s7·=·s2;158 ········//···228:·astore··········10
187 ····················final·boolean·b·=·s6.equals(s7);159 ········//···230:·aload···········10
188 ····················final·ModelFileManager$ModelFile·modelFileManager$ModelFile2·=·modelFileManager$ModelFile;160 ········//···232:·checkcast·······Ljava/lang/String;
189 ····················final·String·s8·=·s4;161 ········//···235:·astore··········10
190 ····················final·File·file2·=·file;162 ········//···237:·aload···········10
191 ····················final·int·n3·=·intValue;163 ········//···239:·invokestatic····java/util/Locale.forLanguageTag:(Ljava/lang/String;)Ljava/util/Locale;
192 ····················final·ArrayList<Locale>·list2·=·list;164 ········//···242:·astore··········10
193 ····················final·String·s9·=·s2;165 ········//···244:·aload···········13
194 ····················final·boolean·b2·=·b;166 ········//···246:·aload···········10
195 ····················new·ModelFileManager$ModelFile(s8,·file2,·n3,·(List)list2,·s9,·b2);167 ········//···248:·invokeinterface·java/util/List.add:(Ljava/lang/Object;)Z
196 ····················final·ParcelFileDescriptor·parcelFileDescriptor2·=·open;168 ········//···253:·pop············
197 ····················maybeCloseAndLogError(parcelFileDescriptor2);169 ········//···254:·goto············209
198 ····················return·modelFileManager$ModelFile;170 ········//···257:·new·············Lcom/android/textclassifier/ModelFileManager$ModelFile;
199 ················}171 ········//···260:·astore_0·······
200 ················catch·(FileNotFoundException·ex16)·{}172 ········//···261:·ldc·············"*"
201 ············}173 ········//···263:·astore··········10
202 ············catch·(FileNotFoundException·ex)·{174 ········//···265:·aload···········10
203 ················open·=·null;175 ········//···267:·aload···········11
204 ············}176 ········//···269:·invokevirtual···java/lang/String.equals:(Ljava/lang/Object;)Z
205 ············finally·{177 ········//···272:·istore··········14
206 ················break·Label_0396;178 ········//···274:·aload_0········
207 ············}179 ········//···275:·astore··········8
208 ············final·StringBuilder·sb2·=·new·StringBuilder();180 ········//···277:·aload_0········
209 ············sb2.append("Failed·to·find·");181 ········//···278:·aload_1········
210 ············sb2.append(file.getAbsolutePath());182 ········//···279:·iload···········9
211 ············final·FileNotFoundException·ex;183 ········//···281:·aload···········13
212 ············TcLog.e(s,·sb2.toString(),·(Throwable)ex);184 ········//···283:·aload···········11
213 ············maybeCloseAndLogError(open);185 ········//···285:·iload···········14
214 ············return·null;186 ········//···287:·invokespecial···com/android/textclassifier/ModelFileManager$ModelFile.<init>:(Ljava/io/File;ILjava/util/List;Ljava/lang/String;Z)V
215 ········}187 ········//···290:·aload···········5
216 ········maybeCloseAndLogError(parcelFileDescriptor);188 ········//···292:·invokestatic····com/android/textclassifier/ModelFileManager$ModelFileSupplierImpl.maybeCloseAndLogError:(Landroid/os/ParcelFileDescriptor;)V
 189 ········//···295:·aload_0········
 190 ········//···296:·areturn········
 191 ········//···297:·astore_0·······
 192 ········//···298:·aload···········5
 193 ········//···300:·astore··········4
 194 ········//···302:·goto············372
 195 ········//···305:·astore_0·······
 196 ········//···306:·goto············319
 197 ········//···309:·astore_0·······
 198 ········//···310:·goto············372
 199 ········//···313:·astore_0·······
 200 ········//···314:·iconst_0·······
 201 ········//···315:·istore_3·······
 202 ········//···316:·aconst_null····
 203 ········//···317:·astore··········5
 204 ········//···319:·new·············Ljava/lang/StringBuilder;
 205 ········//···322:·astore··········10
 206 ········//···324:·aload···········10
 207 ········//···326:·invokespecial···java/lang/StringBuilder.<init>:()V
 208 ········//···329:·ldc·············"Failed·to·find·"
 209 ········//···331:·astore··········7
 210 ········//···333:·aload···········10
 211 ········//···335:·aload···········7
 212 ········//···337:·invokevirtual···java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
 213 ········//···340:·pop············
 214 ········//···341:·aload_1········
 215 ········//···342:·invokevirtual···java/io/File.getAbsolutePath:()Ljava/lang/String;
 216 ········//···345:·astore_1·······
 217 ········//···346:·aload···········10
 218 ········//···348:·aload_1········
 219 ········//···349:·invokevirtual···java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
 220 ········//···352:·pop············
 221 ········//···353:·aload···········10
 222 ········//···355:·invokevirtual···java/lang/StringBuilder.toString:()Ljava/lang/String;
 223 ········//···358:·astore_1·······
 224 ········//···359:·aload_2········
 225 ········//···360:·aload_1········
 226 ········//···361:·aload_0········
 227 ········//···362:·invokestatic····com/android/textclassifier/common/base/TcLog.e:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
 228 ········//···365:·aload···········5
 229 ········//···367:·invokestatic····com/android/textclassifier/ModelFileManager$ModelFileSupplierImpl.maybeCloseAndLogError:(Landroid/os/ParcelFileDescriptor;)V
 230 ········//···370:·aconst_null····
 231 ········//···371:·areturn········
 232 ········//···372:·aload···········4
 233 ········//···374:·invokestatic····com/android/textclassifier/ModelFileManager$ModelFileSupplierImpl.maybeCloseAndLogError:(Landroid/os/ParcelFileDescriptor;)V
 234 ········//···377:·aload_0········
 235 ········//···378:·athrow·········
 236 ········//····Exceptions:
 237 ········//··Try···········Handler
 238 ········//··Start··End····Start··End····Type···························
 239 ········//··-----··-----··-----··-----··-------------------------------
 240 ········//··21·····25·····313····319····Ljava/io/FileNotFoundException;
 241 ········//··21·····25·····309····313····Any
 242 ········//··39·····44·····305····309····Ljava/io/FileNotFoundException;
 243 ········//··39·····44·····297····305····Any
 244 ········//··46·····50·····305····309····Ljava/io/FileNotFoundException;
 245 ········//··46·····50·····297····305····Any
 246 ········//··52·····57·····305····309····Ljava/io/FileNotFoundException;
 247 ········//··52·····57·····297····305····Any
 248 ········//··61·····68·····305····309····Ljava/io/FileNotFoundException;
 249 ········//··61·····68·····297····305····Any
 250 ········//··70·····75·····305····309····Ljava/io/FileNotFoundException;
 251 ········//··70·····75·····297····305····Any
 252 ········//··77·····82·····305····309····Ljava/io/FileNotFoundException;
 253 ········//··77·····82·····297····305····Any
 254 ········//··84·····88·····305····309····Ljava/io/FileNotFoundException;
 255 ········//··84·····88·····297····305····Any
 256 ········//··89·····94·····305····309····Ljava/io/FileNotFoundException;
 257 ········//··89·····94·····297····305····Any
 258 ········//··97·····104····305····309····Ljava/io/FileNotFoundException;
 259 ········//··97·····104····297····305····Any
 260 ········//··108····112····305····309····Ljava/io/FileNotFoundException;
 261 ········//··108····112····297····305····Any
 262 ········//··114····119····305····309····Ljava/io/FileNotFoundException;
 263 ········//··114····119····297····305····Any
 264 ········//··126····129····305····309····Ljava/io/FileNotFoundException;
 265 ········//··126····129····297····305····Any
 266 ········//··130····134····305····309····Ljava/io/FileNotFoundException;
 267 ········//··130····134····297····305····Any
 268 ········//··139····145····305····309····Ljava/io/FileNotFoundException;
 269 ········//··139····145····297····305····Any
 270 ········//··145····149····305····309····Ljava/io/FileNotFoundException;
 271 ········//··145····149····297····305····Any
 272 ········//··152····158····305····309····Ljava/io/FileNotFoundException;
 273 ········//··152····158····297····305····Any
 274 ········//··158····162····305····309····Ljava/io/FileNotFoundException;
 275 ········//··158····162····297····305····Any
 276 ········//··164····168····305····309····Ljava/io/FileNotFoundException;
 277 ········//··164····168····297····305····Any
 278 ········//··175····178····305····309····Ljava/io/FileNotFoundException;
 279 ········//··175····178····297····305····Any
 280 ········//··180····185····305····309····Ljava/io/FileNotFoundException;
 281 ········//··180····185····297····305····Any
 282 ········//··189····194····305····309····Ljava/io/FileNotFoundException;
 283 ········//··189····194····297····305····Any
 284 ········//··196····201····305····309····Ljava/io/FileNotFoundException;
 285 ········//··196····201····297····305····Any
 286 ········//··202····208····305····309····Ljava/io/FileNotFoundException;
 287 ········//··202····208····297····305····Any
 288 ········//··209····215····305····309····Ljava/io/FileNotFoundException;
 289 ········//··209····215····297····305····Any
 290 ········//··222····228····305····309····Ljava/io/FileNotFoundException;
 291 ········//··222····228····297····305····Any
 292 ········//··230····235····305····309····Ljava/io/FileNotFoundException;
 293 ········//··230····235····297····305····Any
 294 ········//··237····242····305····309····Ljava/io/FileNotFoundException;
 295 ········//··237····242····297····305····Any
 296 ········//··246····254····305····309····Ljava/io/FileNotFoundException;
 297 ········//··246····254····297····305····Any
 298 ········//··257····260····305····309····Ljava/io/FileNotFoundException;
 299 ········//··257····260····297····305····Any
 300 ········//··267····272····305····309····Ljava/io/FileNotFoundException;
 301 ········//··267····272····297····305····Any
 302 ········//··285····290····305····309····Ljava/io/FileNotFoundException;
 303 ········//··285····290····297····305····Any
 304 ········//··319····322····297····305····Any
 305 ········//··324····329····297····305····Any
 306 ········//··335····341····297····305····Any
 307 ········//··341····345····297····305····Any
 308 ········//··348····353····297····305····Any
 309 ········//··353····358····297····305····Any
 310 ········//··361····365····297····305····Any
 311 ········//·
 312 ········//·The·error·that·occurred·was:
 313 ········//·
 314 ········//·java.lang.IllegalStateException:·Expression·is·linked·from·several·locations:·Label_0257:
 315 ········//·····at·com.strobel.decompiler.ast.Error.expressionLinkedFromMultipleLocations(Error.java:27)
 316 ········//·····at·com.strobel.decompiler.ast.AstOptimizer.mergeDisparateObjectInitializations(AstOptimizer.java:2596)
 317 ········//·····at·com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:235)
 318 ········//·····at·com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:42)
 319 ········//·····at·com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:214)
 320 ········//·····at·com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)
 321 ········//·····at·com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:757)
 322 ········//·····at·com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:655)
 323 ········//·····at·com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:532)
 324 ········//·····at·com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:499)
 325 ········//·····at·com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:141)
 326 ········//·····at·com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:130)
 327 ········//·····at·com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:105)
 328 ········//·····at·com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71)
 329 ········//·····at·com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)
 330 ········//·····at·com.strobel.decompiler.DecompilerDriver.decompileType(DecompilerDriver.java:336)
 331 ········//·····at·com.strobel.decompiler.DecompilerDriver.main(DecompilerDriver.java:144)
 332 ········//·
 333 ········throw·new·IllegalStateException("An·error·occurred·while·decompiling·this·method.");
217 ····}334 ····}
218 ····335 ····
219 ····private·ImmutableList·getMatchedModelFiles(final·File·file)·{336 ····private·ImmutableList·getFactoryModels()·{
220 ········final·ImmutableList$Builder·builder·=·ImmutableList.builder();337 ········final·ArrayList<ModelFileManager$ModelFile>·list·=·new·ArrayList<ModelFileManager$ModelFile>();
221 ········if·(file.exists()·&&·file.isDirectory())·{338 ········if·(this.factoryModelDir.exists()·&&·this.factoryModelDir.isDirectory())·{
222 ············final·File[]·listFiles·=·file.listFiles();339 ············final·File[]·listFiles·=·this.factoryModelDir.listFiles();
223 ············for·(int·length·=·listFiles.length,·i·=·0;·i·<·length;·++i)·{340 ············for·(int·length·=·listFiles.length,·i·=·0;·i·<·length;·++i)·{
224 ················final·File·file2·=·listFiles[i];341 ················final·File·file·=·listFiles[i];
225 ················if·(this.modelFilenamePattern.matcher(file2.getName()).matches()·&&·file2.isFile())·{342 ················if·(this.modelFilenamePattern.matcher(file.getName()).matches()·&&·file.isFile())·{
226 ····················final·ModelFileManager$ModelFile·modelFile·=·this.createModelFile(file2);343 ····················final·ModelFileManager$ModelFile·modelFile·=·this.createModelFile(file);
227 ····················if·(modelFile·!=·null)·{344 ····················if·(modelFile·!=·null)·{
228 ························builder.add((Object)modelFile);345 ························list.add(modelFile);
229 ····················}346 ····················}
230 ················}347 ················}
231 ············}348 ············}
232 ········}349 ········}
233 ········return·builder.build();350 ········return·ImmutableList.copyOf((Collection)list);
234 ····}351 ····}
235 ····352 ····
236 ····private·static·void·maybeCloseAndLogError(final·ParcelFileDescriptor·parcelFileDescriptor)·{353 ····private·static·void·maybeCloseAndLogError(final·ParcelFileDescriptor·parcelFileDescriptor)·{
237 ········if·(parcelFileDescriptor·==·null)·{354 ········if·(parcelFileDescriptor·==·null)·{
238 ············return;355 ············return;
239 ········}356 ········}
240 ········try·{357 ········try·{
Offset 246, 26 lines modifiedOffset 363, 23 lines modified
246 ········catch·(IOException·ex)·{363 ········catch·(IOException·ex)·{
247 ············TcLog.e("ModelFileManager",·"Error·closing·file.",·(Throwable)ex);364 ············TcLog.e("ModelFileManager",·"Error·closing·file.",·(Throwable)ex);
248 ········}365 ········}
249 ····}366 ····}
250 ····367 ····
251 ····public·ImmutableList·get()·{368 ····public·ImmutableList·get()·{
252 ········final·ArrayList<ModelFileManager$ModelFile>·list·=·new·ArrayList<ModelFileManager$ModelFile>();369 ········final·ArrayList<ModelFileManager$ModelFile>·list·=·new·ArrayList<ModelFileManager$ModelFile>();
253 ········if·(this.downloaderModelDir.exists()·&&·this.settings.isModelDownloadManagerEnabled())·{370 ········if·(this.updatedModelFile.exists())·{
254 ············list.addAll((Collection<?>)this.getMatchedModelFiles(this.downloaderModelDir));371 ············final·ModelFileManager$ModelFile·modelFile·=·this.createModelFile(this.updatedModelFile);
255 ········} 
256 ········if·(this.configUpdaterModelFile.exists())·{ 
257 ············final·ModelFileManager$ModelFile·modelFile·=·this.createModelFile(this.configUpdaterModelFile); 
258 ············if·(modelFile·!=·null)·{372 ············if·(modelFile·!=·null)·{
259 ················list.add(modelFile);373 ················list.add(modelFile);
260 ············}374 ············}
261 ········}375 ········}
262 ········synchronized·(this.lock)·{376 ········synchronized·(this.lock)·{
263 ············if·(this.factoryModels·==·null)·{377 ············if·(this.factoryModels·==·null)·{
264 ················this.factoryModels·=·this.getMatchedModelFiles(this.factoryModelDir);378 ················this.factoryModels·=·this.getFactoryModels();
265 ············}379 ············}
266 ············list.addAll((Collection<?>)this.factoryModels);380 ············list.addAll((Collection<?>)this.factoryModels);
267 ············//·monitorexit(this.lock)381 ············//·monitorexit(this.lock)
268 ············return·ImmutableList.copyOf((Collection)list);382 ············return·ImmutableList.copyOf((Collection)list);
269 ········}383 ········}
270 ····}384 ····}
271 }385 }