Loading media/java/android/media/AudioManager.java +4 −1 Original line number Original line Diff line number Diff line Loading @@ -4817,7 +4817,10 @@ public class AudioManager { filterTypes.add(AudioDeviceInfo.TYPE_TELEPHONY); filterTypes.add(AudioDeviceInfo.TYPE_TELEPHONY); if (status != AudioManager.SUCCESS) { if (status != AudioManager.SUCCESS) { // fail and populate microphones with unknown characteristics by device information. // fail and populate microphones with unknown characteristics by device information. if (status != AudioManager.ERROR_INVALID_OPERATION) { Log.e(TAG, "getMicrophones failed:" + status); Log.e(TAG, "getMicrophones failed:" + status); } Log.i(TAG, "fallback on device info"); addMicrophonesFromAudioDeviceInfo(microphones, filterTypes); addMicrophonesFromAudioDeviceInfo(microphones, filterTypes); return microphones; return microphones; } } Loading media/java/android/media/AudioRecord.java +4 −1 Original line number Original line Diff line number Diff line Loading @@ -1627,8 +1627,11 @@ public class AudioRecord implements AudioRouting ArrayList<MicrophoneInfo> activeMicrophones = new ArrayList<>(); ArrayList<MicrophoneInfo> activeMicrophones = new ArrayList<>(); int status = native_get_active_microphones(activeMicrophones); int status = native_get_active_microphones(activeMicrophones); if (status != AudioManager.SUCCESS) { if (status != AudioManager.SUCCESS) { if (status != AudioManager.ERROR_INVALID_OPERATION) { Log.e(TAG, "getActiveMicrophones failed:" + status); Log.e(TAG, "getActiveMicrophones failed:" + status); } } Log.i(TAG, "getActiveMicrophones failed, fallback on routed device info"); } AudioManager.setPortIdForMicrophones(activeMicrophones); AudioManager.setPortIdForMicrophones(activeMicrophones); // Use routed device when there is not information returned by hal. // Use routed device when there is not information returned by hal. Loading media/java/android/media/MediaRecorder.java +4 −1 Original line number Original line Diff line number Diff line Loading @@ -1433,8 +1433,11 @@ public class MediaRecorder implements AudioRouting ArrayList<MicrophoneInfo> activeMicrophones = new ArrayList<>(); ArrayList<MicrophoneInfo> activeMicrophones = new ArrayList<>(); int status = native_getActiveMicrophones(activeMicrophones); int status = native_getActiveMicrophones(activeMicrophones); if (status != AudioManager.SUCCESS) { if (status != AudioManager.SUCCESS) { if (status != AudioManager.ERROR_INVALID_OPERATION) { Log.e(TAG, "getActiveMicrophones failed:" + status); Log.e(TAG, "getActiveMicrophones failed:" + status); } } Log.i(TAG, "getActiveMicrophones failed, fallback on routed device info"); } AudioManager.setPortIdForMicrophones(activeMicrophones); AudioManager.setPortIdForMicrophones(activeMicrophones); // Use routed device when there is not information returned by hal. // Use routed device when there is not information returned by hal. Loading Loading
media/java/android/media/AudioManager.java +4 −1 Original line number Original line Diff line number Diff line Loading @@ -4817,7 +4817,10 @@ public class AudioManager { filterTypes.add(AudioDeviceInfo.TYPE_TELEPHONY); filterTypes.add(AudioDeviceInfo.TYPE_TELEPHONY); if (status != AudioManager.SUCCESS) { if (status != AudioManager.SUCCESS) { // fail and populate microphones with unknown characteristics by device information. // fail and populate microphones with unknown characteristics by device information. if (status != AudioManager.ERROR_INVALID_OPERATION) { Log.e(TAG, "getMicrophones failed:" + status); Log.e(TAG, "getMicrophones failed:" + status); } Log.i(TAG, "fallback on device info"); addMicrophonesFromAudioDeviceInfo(microphones, filterTypes); addMicrophonesFromAudioDeviceInfo(microphones, filterTypes); return microphones; return microphones; } } Loading
media/java/android/media/AudioRecord.java +4 −1 Original line number Original line Diff line number Diff line Loading @@ -1627,8 +1627,11 @@ public class AudioRecord implements AudioRouting ArrayList<MicrophoneInfo> activeMicrophones = new ArrayList<>(); ArrayList<MicrophoneInfo> activeMicrophones = new ArrayList<>(); int status = native_get_active_microphones(activeMicrophones); int status = native_get_active_microphones(activeMicrophones); if (status != AudioManager.SUCCESS) { if (status != AudioManager.SUCCESS) { if (status != AudioManager.ERROR_INVALID_OPERATION) { Log.e(TAG, "getActiveMicrophones failed:" + status); Log.e(TAG, "getActiveMicrophones failed:" + status); } } Log.i(TAG, "getActiveMicrophones failed, fallback on routed device info"); } AudioManager.setPortIdForMicrophones(activeMicrophones); AudioManager.setPortIdForMicrophones(activeMicrophones); // Use routed device when there is not information returned by hal. // Use routed device when there is not information returned by hal. Loading
media/java/android/media/MediaRecorder.java +4 −1 Original line number Original line Diff line number Diff line Loading @@ -1433,8 +1433,11 @@ public class MediaRecorder implements AudioRouting ArrayList<MicrophoneInfo> activeMicrophones = new ArrayList<>(); ArrayList<MicrophoneInfo> activeMicrophones = new ArrayList<>(); int status = native_getActiveMicrophones(activeMicrophones); int status = native_getActiveMicrophones(activeMicrophones); if (status != AudioManager.SUCCESS) { if (status != AudioManager.SUCCESS) { if (status != AudioManager.ERROR_INVALID_OPERATION) { Log.e(TAG, "getActiveMicrophones failed:" + status); Log.e(TAG, "getActiveMicrophones failed:" + status); } } Log.i(TAG, "getActiveMicrophones failed, fallback on routed device info"); } AudioManager.setPortIdForMicrophones(activeMicrophones); AudioManager.setPortIdForMicrophones(activeMicrophones); // Use routed device when there is not information returned by hal. // Use routed device when there is not information returned by hal. Loading