Merge "Avoid reading XML file when it doesn't exist." into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
1ef8f5338d
@@ -137,6 +137,11 @@ public class GameManagerSettings {
|
|||||||
boolean readPersistentDataLocked() {
|
boolean readPersistentDataLocked() {
|
||||||
mGameModes.clear();
|
mGameModes.clear();
|
||||||
|
|
||||||
|
if (!mSettingsFile.exists()) {
|
||||||
|
Slog.v(GameManagerService.TAG, "Settings file doesn't exists, skip reading");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final FileInputStream str = mSettingsFile.openRead();
|
final FileInputStream str = mSettingsFile.openRead();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user