Merge "Deleting print job files when we do not have to." into klp-dev
diff --git a/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java b/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java
index d1d71cd..d1b42bc 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java
@@ -440,8 +440,9 @@
if (fileForJobMap == null) {
fileForJobMap = new ArrayMap<PrintJobId, File>();
}
- String printJobIdString = file.getName().substring(0,
- PRINT_JOB_FILE_PREFIX.length());
+ String printJobIdString = file.getName().substring(
+ PRINT_JOB_FILE_PREFIX.length(),
+ file.getName().indexOf('.'));
PrintJobId printJobId = PrintJobId.unflattenFromString(
printJobIdString);
fileForJobMap.put(printJobId, file);