Merge "Avoid reading XML file when it doesn't exist." into sc-dev

This commit is contained in:
TreeHugger Robot
2021-03-12 23:43:40 +00:00
committed by Android (Google) Code Review

View File

@@ -137,6 +137,11 @@ public class GameManagerSettings {
boolean readPersistentDataLocked() {
mGameModes.clear();
if (!mSettingsFile.exists()) {
Slog.v(GameManagerService.TAG, "Settings file doesn't exists, skip reading");
return false;
}
try {
final FileInputStream str = mSettingsFile.openRead();