Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf5546b1 authored by Michael Rosenfeld's avatar Michael Rosenfeld Committed by android-build-merger
Browse files

Merge "Clean up local hprofs" am: 9ab94e15 am: 1876d824

am: 67fd9f39

Change-Id: I8eaea581cfda4844c3ea81f7ee63f0cfc40ef3e0
parents 02daba1e 67fd9f39
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -171,6 +171,9 @@ public class Hprof implements ClassDataRetriever {
                    arg1.getDevice().getSyncService().pullFile(arg0,
                            target.getAbsoluteFile().toString(), new NullProgressMonitor());
                } catch (Exception e) {
                    if (target != null) {
                        target.delete();
                    }
                    e.printStackTrace();
                    target = null;
                }
@@ -189,6 +192,9 @@ public class Hprof implements ClassDataRetriever {
                    out.write(arg0);
                    out.close();
                } catch (Exception e) {
                    if (target != null) {
                        target.delete();
                    }
                    e.printStackTrace();
                    target = null;
                }
@@ -215,6 +221,8 @@ public class Hprof implements ClassDataRetriever {
            return analyzeHprof(hprofLocalFile);
        } catch (Exception e) {
            throw new RuntimeException(e);
        } finally {
            hprofLocalFile.delete();
        }
    }
}