152 lines
7.7 KiB
Java
152 lines
7.7 KiB
Java
package com.squareup.leakcanary;
|
|
|
|
import java.io.File;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class AnalyzedHeap {
|
|
public final HeapDump heapDump;
|
|
public final boolean heapDumpFileExists;
|
|
public final AnalysisResult result;
|
|
public final File selfFile;
|
|
public final long selfLastModified;
|
|
|
|
public AnalyzedHeap(HeapDump heapDump, AnalysisResult analysisResult, File file) {
|
|
this.heapDump = heapDump;
|
|
this.result = analysisResult;
|
|
this.selfFile = file;
|
|
this.heapDumpFileExists = heapDump.heapDumpFile.exists();
|
|
this.selfLastModified = file.lastModified();
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:17:0x0033 A[Catch: all -> 0x004c, TryCatch #7 {all -> 0x004c, blocks: (B:6:0x0006, B:15:0x002b, B:17:0x0033, B:24:0x003d), top: B:2:0x0001 }] */
|
|
/* JADX WARN: Removed duplicated region for block: B:20:0x0048 A[EXC_TOP_SPLITTER, SYNTHETIC] */
|
|
/* JADX WARN: Removed duplicated region for block: B:24:0x003d A[Catch: all -> 0x004c, TRY_LEAVE, TryCatch #7 {all -> 0x004c, blocks: (B:6:0x0006, B:15:0x002b, B:17:0x0033, B:24:0x003d), top: B:2:0x0001 }] */
|
|
/* JADX WARN: Removed duplicated region for block: B:29:0x004f A[EXC_TOP_SPLITTER, SYNTHETIC] */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
|
*/
|
|
public static com.squareup.leakcanary.AnalyzedHeap load(java.io.File r6) {
|
|
/*
|
|
r0 = 0
|
|
java.io.FileInputStream r1 = new java.io.FileInputStream // Catch: java.lang.Throwable -> L24 java.lang.ClassNotFoundException -> L27 java.io.IOException -> L29
|
|
r1.<init>(r6) // Catch: java.lang.Throwable -> L24 java.lang.ClassNotFoundException -> L27 java.io.IOException -> L29
|
|
java.io.ObjectInputStream r2 = new java.io.ObjectInputStream // Catch: java.lang.ClassNotFoundException -> L20 java.io.IOException -> L22 java.lang.Throwable -> L4c
|
|
r2.<init>(r1) // Catch: java.lang.ClassNotFoundException -> L20 java.io.IOException -> L22 java.lang.Throwable -> L4c
|
|
java.lang.Object r3 = r2.readObject() // Catch: java.lang.ClassNotFoundException -> L20 java.io.IOException -> L22 java.lang.Throwable -> L4c
|
|
com.squareup.leakcanary.HeapDump r3 = (com.squareup.leakcanary.HeapDump) r3 // Catch: java.lang.ClassNotFoundException -> L20 java.io.IOException -> L22 java.lang.Throwable -> L4c
|
|
java.lang.Object r2 = r2.readObject() // Catch: java.lang.ClassNotFoundException -> L20 java.io.IOException -> L22 java.lang.Throwable -> L4c
|
|
com.squareup.leakcanary.AnalysisResult r2 = (com.squareup.leakcanary.AnalysisResult) r2 // Catch: java.lang.ClassNotFoundException -> L20 java.io.IOException -> L22 java.lang.Throwable -> L4c
|
|
com.squareup.leakcanary.AnalyzedHeap r4 = new com.squareup.leakcanary.AnalyzedHeap // Catch: java.lang.ClassNotFoundException -> L20 java.io.IOException -> L22 java.lang.Throwable -> L4c
|
|
r4.<init>(r3, r2, r6) // Catch: java.lang.ClassNotFoundException -> L20 java.io.IOException -> L22 java.lang.Throwable -> L4c
|
|
r1.close() // Catch: java.io.IOException -> L1f
|
|
L1f:
|
|
return r4
|
|
L20:
|
|
r2 = move-exception
|
|
goto L2b
|
|
L22:
|
|
r2 = move-exception
|
|
goto L2b
|
|
L24:
|
|
r6 = move-exception
|
|
r1 = r0
|
|
goto L4d
|
|
L27:
|
|
r2 = move-exception
|
|
goto L2a
|
|
L29:
|
|
r2 = move-exception
|
|
L2a:
|
|
r1 = r0
|
|
L2b:
|
|
boolean r3 = r6.delete() // Catch: java.lang.Throwable -> L4c
|
|
r4 = 0
|
|
r5 = 1
|
|
if (r3 == 0) goto L3d
|
|
java.lang.String r3 = "Could not read result file %s, deleted it."
|
|
java.lang.Object[] r5 = new java.lang.Object[r5] // Catch: java.lang.Throwable -> L4c
|
|
r5[r4] = r6 // Catch: java.lang.Throwable -> L4c
|
|
com.squareup.leakcanary.CanaryLog.d(r2, r3, r5) // Catch: java.lang.Throwable -> L4c
|
|
goto L46
|
|
L3d:
|
|
java.lang.String r3 = "Could not read result file %s, could not delete it either."
|
|
java.lang.Object[] r5 = new java.lang.Object[r5] // Catch: java.lang.Throwable -> L4c
|
|
r5[r4] = r6 // Catch: java.lang.Throwable -> L4c
|
|
com.squareup.leakcanary.CanaryLog.d(r2, r3, r5) // Catch: java.lang.Throwable -> L4c
|
|
L46:
|
|
if (r1 == 0) goto L4b
|
|
r1.close() // Catch: java.io.IOException -> L4b
|
|
L4b:
|
|
return r0
|
|
L4c:
|
|
r6 = move-exception
|
|
L4d:
|
|
if (r1 == 0) goto L52
|
|
r1.close() // Catch: java.io.IOException -> L52
|
|
L52:
|
|
throw r6
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.squareup.leakcanary.AnalyzedHeap.load(java.io.File):com.squareup.leakcanary.AnalyzedHeap");
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:25:0x004f A[EXC_TOP_SPLITTER, SYNTHETIC] */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
|
*/
|
|
public static java.io.File save(com.squareup.leakcanary.HeapDump r4, com.squareup.leakcanary.AnalysisResult r5) {
|
|
/*
|
|
java.io.File r0 = new java.io.File
|
|
java.io.File r1 = r4.heapDumpFile
|
|
java.io.File r1 = r1.getParentFile()
|
|
java.lang.StringBuilder r2 = new java.lang.StringBuilder
|
|
r2.<init>()
|
|
java.io.File r3 = r4.heapDumpFile
|
|
java.lang.String r3 = r3.getName()
|
|
r2.append(r3)
|
|
java.lang.String r3 = ".result"
|
|
r2.append(r3)
|
|
java.lang.String r2 = r2.toString()
|
|
r0.<init>(r1, r2)
|
|
r1 = 0
|
|
java.io.FileOutputStream r2 = new java.io.FileOutputStream // Catch: java.lang.Throwable -> L39 java.io.IOException -> L3c
|
|
r2.<init>(r0) // Catch: java.lang.Throwable -> L39 java.io.IOException -> L3c
|
|
java.io.ObjectOutputStream r3 = new java.io.ObjectOutputStream // Catch: java.io.IOException -> L37 java.lang.Throwable -> L4c
|
|
r3.<init>(r2) // Catch: java.io.IOException -> L37 java.lang.Throwable -> L4c
|
|
r3.writeObject(r4) // Catch: java.io.IOException -> L37 java.lang.Throwable -> L4c
|
|
r3.writeObject(r5) // Catch: java.io.IOException -> L37 java.lang.Throwable -> L4c
|
|
r2.close() // Catch: java.io.IOException -> L36
|
|
L36:
|
|
return r0
|
|
L37:
|
|
r4 = move-exception
|
|
goto L3e
|
|
L39:
|
|
r4 = move-exception
|
|
r2 = r1
|
|
goto L4d
|
|
L3c:
|
|
r4 = move-exception
|
|
r2 = r1
|
|
L3e:
|
|
java.lang.String r5 = "Could not save leak analysis result to disk."
|
|
r0 = 0
|
|
java.lang.Object[] r0 = new java.lang.Object[r0] // Catch: java.lang.Throwable -> L4c
|
|
com.squareup.leakcanary.CanaryLog.d(r4, r5, r0) // Catch: java.lang.Throwable -> L4c
|
|
if (r2 == 0) goto L4b
|
|
r2.close() // Catch: java.io.IOException -> L4b
|
|
L4b:
|
|
return r1
|
|
L4c:
|
|
r4 = move-exception
|
|
L4d:
|
|
if (r2 == 0) goto L52
|
|
r2.close() // Catch: java.io.IOException -> L52
|
|
L52:
|
|
throw r4
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.squareup.leakcanary.AnalyzedHeap.save(com.squareup.leakcanary.HeapDump, com.squareup.leakcanary.AnalysisResult):java.io.File");
|
|
}
|
|
}
|