Merge "Use AtomicFile APIs correctly when reading." into mnc-dev

This commit is contained in:
Svetoslav
2015-05-29 20:02:53 +00:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 2 deletions

View File

@@ -400,7 +400,7 @@ final class SettingsState {
return;
}
try {
in = new FileInputStream(mStatePersistFile);
in = new AtomicFile(mStatePersistFile).openRead();
} catch (FileNotFoundException fnfe) {
Slog.i(LOG_TAG, "No settings state");
return;

View File

@@ -4386,7 +4386,7 @@ final class Settings {
FileInputStream in;
try {
in = new FileInputStream(permissionsFile);
in = new AtomicFile(permissionsFile).openRead();
} catch (FileNotFoundException fnfe) {
Slog.i(PackageManagerService.TAG, "No permissions state");
return;