Skip reading config file that does not exist
By default there is no such file. This avoids printing
exception log on every boot. Especially it prints out
thousands of callstack when running unit tests.
Bug: 159102753
Test: LetterboxConfigurationPersisterTest
Change-Id: I64a62c4aa66ac045aa4b1ddf1ad2e51d7bf4ca5b
(cherry picked from commit 15942b75e9)
Merged-In: I64a62c4aa66ac045aa4b1ddf1ad2e51d7bf4ca5b
This commit is contained in:
committed by
Massimo Carli
parent
270620a63c
commit
e30e7a93f4
@@ -216,6 +216,10 @@ class LetterboxConfigurationPersister {
|
||||
}
|
||||
|
||||
private void readCurrentConfiguration() {
|
||||
if (!mConfigurationFile.exists()) {
|
||||
useDefaultValue();
|
||||
return;
|
||||
}
|
||||
FileInputStream fis = null;
|
||||
try {
|
||||
fis = mConfigurationFile.openRead();
|
||||
|
||||
Reference in New Issue
Block a user