Avoid reading XML file when it doesn't exist.
The XML file doesn't exist for first time OTA boot or clean device flash, avoid reading from it. Bug: b/181346262 Test: adb logcat no longer shows stack trace Test: atest GameManagerServiceSettingsTests Change-Id: I833004e9b85a49ce75c24afaeba413da3ca1d969
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user