commit | cabbb11c019098428e312663e84bee7c90bf36e7 | [log] [tgz] |
---|---|---|
author | mike dooley <mdooley@google.com> | Tue Apr 17 17:19:04 2018 +0200 |
committer | mike dooley <mdooley@google.com> | Thu Apr 19 15:57:06 2018 +0200 |
tree | bc94c92d2bb0e56d7e7052e26a70077bad18b111 | |
parent | d7cea28bbc43e80dd7da44b275ffe53f127af0bf [diff] [blame] |
Fixing a couple crashes in the SoundTriggerTestApp Bug: 78269975 Test: built and ran the SoundTriggerTestApp Change-Id: I966550a3d64e9f6a66c40e062a89f39b897aaea2
diff --git a/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/SoundTriggerTestService.java b/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/SoundTriggerTestService.java index 00bf33a..b185a26 100644 --- a/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/SoundTriggerTestService.java +++ b/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/SoundTriggerTestService.java
@@ -435,9 +435,10 @@ if (!file.getName().endsWith(".properties")) { continue; } - try { + + try (FileInputStream in = new FileInputStream(file)) { Properties properties = new Properties(); - properties.load(new FileInputStream(file)); + properties.load(in); createModelInfo(properties); loadedModel = true; } catch (Exception e) {