Previously the fd associated with the dump file was
not closed until the next GC. While this did not
affect AMS, external systems relying on monitoring
the close event on the file could not accurately
know when a dump operation was finished.
Bug:
62907010
Test: Manually flashed and tested
Change-Id: I0f6988099f479468f674eb7483f1f14529852270
}
if (DEBUG_PSS) Slog.d(TAG_PSS, "Dump heap finished for " + path);
mHandler.sendEmptyMessage(POST_DUMP_HEAP_NOTIFICATION_MSG);
+
+ // Forced gc to clean up the remnant hprof fd.
+ Runtime.getRuntime().gc();
}
}