DeviceTokenLoader.java
8.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
package com.crashlytics.android.beta;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import io.fabric.sdk.android.services.cache.ValueLoader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
public class DeviceTokenLoader
implements ValueLoader<String>
{
private static final String BETA_APP_PACKAGE_NAME = "io.crash.air";
private static final String DIRFACTOR_DEVICE_TOKEN_PREFIX = "assets/com.crashlytics.android.beta/dirfactor-device-token=";
String determineDeviceToken(ZipInputStream paramZipInputStream)
throws IOException
{
paramZipInputStream = paramZipInputStream.getNextEntry();
if (paramZipInputStream != null)
{
paramZipInputStream = paramZipInputStream.getName();
if (paramZipInputStream.startsWith("assets/com.crashlytics.android.beta/dirfactor-device-token=")) {
return paramZipInputStream.substring(59, paramZipInputStream.length() - 1);
}
}
return "";
}
ZipInputStream getZipInputStreamOfApkFrom(Context paramContext, String paramString)
throws PackageManager.NameNotFoundException, FileNotFoundException
{
return new ZipInputStream(new FileInputStream(paramContext.getPackageManager().getApplicationInfo(paramString, 0).sourceDir));
}
/* Error */
public String load(Context paramContext)
throws java.lang.Exception
{
// Byte code:
// 0: invokestatic 96 java/lang/System:nanoTime ()J
// 3: lstore 4
// 5: ldc 51
// 7: astore 8
// 9: aconst_null
// 10: astore 6
// 12: aload_0
// 13: aload_1
// 14: ldc 11
// 16: invokevirtual 98 com/crashlytics/android/beta/DeviceTokenLoader:getZipInputStreamOfApkFrom (Landroid/content/Context;Ljava/lang/String;)Ljava/util/zip/ZipInputStream;
// 19: astore_1
// 20: aload_1
// 21: astore 6
// 23: aload_1
// 24: astore 7
// 26: aload_0
// 27: aload_1
// 28: invokevirtual 100 com/crashlytics/android/beta/DeviceTokenLoader:determineDeviceToken (Ljava/util/zip/ZipInputStream;)Ljava/lang/String;
// 31: astore 9
// 33: aload 9
// 35: astore 6
// 37: aload 6
// 39: astore 7
// 41: aload_1
// 42: ifnull +11 -> 53
// 45: aload_1
// 46: invokevirtual 103 java/util/zip/ZipInputStream:close ()V
// 49: aload 6
// 51: astore 7
// 53: invokestatic 96 java/lang/System:nanoTime ()J
// 56: lload 4
// 58: lsub
// 59: l2d
// 60: ldc2_w 104
// 63: ddiv
// 64: dstore_2
// 65: invokestatic 111 io/fabric/sdk/android/Fabric:getLogger ()Lio/fabric/sdk/android/Logger;
// 68: ldc 113
// 70: new 115 java/lang/StringBuilder
// 73: dup
// 74: ldc 117
// 76: invokespecial 118 java/lang/StringBuilder:<init> (Ljava/lang/String;)V
// 79: dload_2
// 80: invokevirtual 122 java/lang/StringBuilder:append (D)Ljava/lang/StringBuilder;
// 83: ldc 124
// 85: invokevirtual 127 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
// 88: invokevirtual 130 java/lang/StringBuilder:toString ()Ljava/lang/String;
// 91: invokeinterface 136 3 0
// 96: aload 7
// 98: areturn
// 99: astore_1
// 100: invokestatic 111 io/fabric/sdk/android/Fabric:getLogger ()Lio/fabric/sdk/android/Logger;
// 103: ldc 113
// 105: ldc -118
// 107: aload_1
// 108: invokeinterface 142 4 0
// 113: aload 6
// 115: astore 7
// 117: goto -64 -> 53
// 120: astore_1
// 121: aload 6
// 123: astore 7
// 125: invokestatic 111 io/fabric/sdk/android/Fabric:getLogger ()Lio/fabric/sdk/android/Logger;
// 128: ldc 113
// 130: ldc -112
// 132: invokeinterface 136 3 0
// 137: aload 8
// 139: astore 7
// 141: aload 6
// 143: ifnull -90 -> 53
// 146: aload 6
// 148: invokevirtual 103 java/util/zip/ZipInputStream:close ()V
// 151: aload 8
// 153: astore 7
// 155: goto -102 -> 53
// 158: astore_1
// 159: invokestatic 111 io/fabric/sdk/android/Fabric:getLogger ()Lio/fabric/sdk/android/Logger;
// 162: ldc 113
// 164: ldc -118
// 166: aload_1
// 167: invokeinterface 142 4 0
// 172: aload 8
// 174: astore 7
// 176: goto -123 -> 53
// 179: astore 7
// 181: aconst_null
// 182: astore 6
// 184: aload 6
// 186: astore_1
// 187: invokestatic 111 io/fabric/sdk/android/Fabric:getLogger ()Lio/fabric/sdk/android/Logger;
// 190: ldc 113
// 192: ldc -110
// 194: aload 7
// 196: invokeinterface 142 4 0
// 201: aload 8
// 203: astore 7
// 205: aload 6
// 207: ifnull -154 -> 53
// 210: aload 6
// 212: invokevirtual 103 java/util/zip/ZipInputStream:close ()V
// 215: aload 8
// 217: astore 7
// 219: goto -166 -> 53
// 222: astore_1
// 223: invokestatic 111 io/fabric/sdk/android/Fabric:getLogger ()Lio/fabric/sdk/android/Logger;
// 226: ldc 113
// 228: ldc -118
// 230: aload_1
// 231: invokeinterface 142 4 0
// 236: aload 8
// 238: astore 7
// 240: goto -187 -> 53
// 243: astore 7
// 245: aconst_null
// 246: astore 6
// 248: aload 6
// 250: astore_1
// 251: invokestatic 111 io/fabric/sdk/android/Fabric:getLogger ()Lio/fabric/sdk/android/Logger;
// 254: ldc 113
// 256: ldc -108
// 258: aload 7
// 260: invokeinterface 142 4 0
// 265: aload 8
// 267: astore 7
// 269: aload 6
// 271: ifnull -218 -> 53
// 274: aload 6
// 276: invokevirtual 103 java/util/zip/ZipInputStream:close ()V
// 279: aload 8
// 281: astore 7
// 283: goto -230 -> 53
// 286: astore_1
// 287: invokestatic 111 io/fabric/sdk/android/Fabric:getLogger ()Lio/fabric/sdk/android/Logger;
// 290: ldc 113
// 292: ldc -118
// 294: aload_1
// 295: invokeinterface 142 4 0
// 300: aload 8
// 302: astore 7
// 304: goto -251 -> 53
// 307: astore 6
// 309: aconst_null
// 310: astore_1
// 311: aload_1
// 312: ifnull +7 -> 319
// 315: aload_1
// 316: invokevirtual 103 java/util/zip/ZipInputStream:close ()V
// 319: aload 6
// 321: athrow
// 322: astore_1
// 323: invokestatic 111 io/fabric/sdk/android/Fabric:getLogger ()Lio/fabric/sdk/android/Logger;
// 326: ldc 113
// 328: ldc -118
// 330: aload_1
// 331: invokeinterface 142 4 0
// 336: goto -17 -> 319
// 339: astore 6
// 341: aload 7
// 343: astore_1
// 344: goto -33 -> 311
// 347: astore 6
// 349: goto -38 -> 311
// 352: astore 7
// 354: aload_1
// 355: astore 6
// 357: goto -109 -> 248
// 360: astore 7
// 362: aload_1
// 363: astore 6
// 365: goto -181 -> 184
// Local variable table:
// start length slot name signature
// 0 368 0 this DeviceTokenLoader
// 0 368 1 paramContext Context
// 64 16 2 d double
// 3 54 4 l long
// 10 265 6 localObject1 Object
// 307 13 6 localObject2 Object
// 339 1 6 localObject3 Object
// 347 1 6 localObject4 Object
// 355 9 6 localContext Context
// 24 151 7 localObject5 Object
// 179 16 7 localFileNotFoundException1 FileNotFoundException
// 203 36 7 str1 String
// 243 16 7 localIOException1 IOException
// 267 75 7 str2 String
// 352 1 7 localIOException2 IOException
// 360 1 7 localFileNotFoundException2 FileNotFoundException
// 7 294 8 str3 String
// 31 3 9 str4 String
// Exception table:
// from to target type
// 45 49 99 java/io/IOException
// 12 20 120 android/content/pm/PackageManager$NameNotFoundException
// 26 33 120 android/content/pm/PackageManager$NameNotFoundException
// 146 151 158 java/io/IOException
// 12 20 179 java/io/FileNotFoundException
// 210 215 222 java/io/IOException
// 12 20 243 java/io/IOException
// 274 279 286 java/io/IOException
// 12 20 307 finally
// 315 319 322 java/io/IOException
// 26 33 339 finally
// 125 137 339 finally
// 187 201 347 finally
// 251 265 347 finally
// 26 33 352 java/io/IOException
// 26 33 360 java/io/FileNotFoundException
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/crashlytics/android/beta/DeviceTokenLoader.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/