Address issues with ancestral serial number file
There were a few issues with the ancestral file storage methods which I've fixed in this refactoring; 1) The log message for "get" said it was doing a write 2) The logic to get the file created a new file even if this was a read 3) The reading of the file asked for write permissions which it didn't need 4) By asking for the correct permissions we can use the RandomAccessFile constructor behaviour to create a file if needed. 5) By asking for the correct permissions we can catch the FileNotFound exception thrown when the file doesn't exist and avoid creating an empty unused file Fixes: 157922462 Test: atest UserBackupManagerServiceTest ProfileSerialNumberHostSideTest Change-Id: Ia5b070d2dbe9a778ec39473ec484f889ca8a8214
Loading
Please register or sign in to comment