File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
android/src/main/java/com/zxcpoiu/incallmanager Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1898,14 +1898,15 @@ private WritableMap getAudioDeviceStatusMap() {
18981898 for (AudioDevice s : audioDevices ) {
18991899 audioDevicesJson += "\" " + s .name () + "\" ," ;
19001900 }
1901+
19011902 // --- strip the last `,`
19021903 if (audioDevicesJson .length () > 1 ) {
19031904 audioDevicesJson = audioDevicesJson .substring (0 , audioDevicesJson .length () - 1 );
19041905 }
19051906 audioDevicesJson += "]" ;
19061907
19071908 data .putString ("availableAudioDeviceList" , audioDevicesJson );
1908- data .putString ("selectedAudioDevice" , selectedAudioDevice .name ());
1909+ data .putString ("selectedAudioDevice" , ( selectedAudioDevice == null ) ? "" : selectedAudioDevice .name ());
19091910
19101911 return data ;
19111912 }
You can’t perform that action at this time.
0 commit comments