diff --git a/apps/OboeTester/app/src/main/java/com/mobileer/oboetester/TestDataPathsActivity.java b/apps/OboeTester/app/src/main/java/com/mobileer/oboetester/TestDataPathsActivity.java index 7b05669cf..6077a9b7b 100644 --- a/apps/OboeTester/app/src/main/java/com/mobileer/oboetester/TestDataPathsActivity.java +++ b/apps/OboeTester/app/src/main/java/com/mobileer/oboetester/TestDataPathsActivity.java @@ -474,17 +474,20 @@ protected TestResult testCurrentConfigurations() throws InterruptedException { int result = testResult.result; if (result == TEST_RESULT_FAILED) { int id = mAudioOutTester.actualConfiguration.getDeviceId(); - int deviceType = getDeviceInfoById(id).getType(); int channelCount = mAudioOutTester.actualConfiguration.getChannelCount(); - if (deviceType == AudioDeviceInfo.TYPE_BUILTIN_EARPIECE - && channelCount == 2 - && getOutputChannel() == 1) { - testResult.addComment("Maybe EARPIECE does not mix stereo to mono!"); - } - if (deviceType == TYPE_BUILTIN_SPEAKER_SAFE - && channelCount == 2 - && getOutputChannel() == 0) { - testResult.addComment("Maybe SPEAKER_SAFE dropped channel zero!"); + AudioDeviceInfo info = getDeviceInfoById(id); + if (info != null) { + int deviceType = getDeviceInfoById(id).getType(); + if (deviceType == AudioDeviceInfo.TYPE_BUILTIN_EARPIECE + && channelCount == 2 + && getOutputChannel() == 1) { + testResult.addComment("Maybe EARPIECE does not mix stereo to mono!"); + } + if (deviceType == TYPE_BUILTIN_SPEAKER_SAFE + && channelCount == 2 + && getOutputChannel() == 0) { + testResult.addComment("Maybe SPEAKER_SAFE dropped channel zero!"); + } } } }