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() {
1898
1898
for (AudioDevice s : audioDevices ) {
1899
1899
audioDevicesJson += "\" " + s .name () + "\" ," ;
1900
1900
}
1901
+
1901
1902
// --- strip the last `,`
1902
1903
if (audioDevicesJson .length () > 1 ) {
1903
1904
audioDevicesJson = audioDevicesJson .substring (0 , audioDevicesJson .length () - 1 );
1904
1905
}
1905
1906
audioDevicesJson += "]" ;
1906
1907
1907
1908
data .putString ("availableAudioDeviceList" , audioDevicesJson );
1908
- data .putString ("selectedAudioDevice" , selectedAudioDevice .name ());
1909
+ data .putString ("selectedAudioDevice" , ( selectedAudioDevice == null ) ? "" : selectedAudioDevice .name ());
1909
1910
1910
1911
return data ;
1911
1912
}
You can’t perform that action at this time.
0 commit comments