Merge "Change log level when microphone enumeration APIs native call fail." into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ccaba49ab5
@@ -4816,7 +4816,10 @@ public class AudioManager {
|
||||
filterTypes.add(AudioDeviceInfo.TYPE_TELEPHONY);
|
||||
if (status != AudioManager.SUCCESS) {
|
||||
// fail and populate microphones with unknown characteristics by device information.
|
||||
Log.e(TAG, "getMicrophones failed:" + status);
|
||||
if (status != AudioManager.ERROR_INVALID_OPERATION) {
|
||||
Log.e(TAG, "getMicrophones failed:" + status);
|
||||
}
|
||||
Log.i(TAG, "fallback on device info");
|
||||
addMicrophonesFromAudioDeviceInfo(microphones, filterTypes);
|
||||
return microphones;
|
||||
}
|
||||
|
||||
@@ -1627,7 +1627,10 @@ public class AudioRecord implements AudioRouting
|
||||
ArrayList<MicrophoneInfo> activeMicrophones = new ArrayList<>();
|
||||
int status = native_get_active_microphones(activeMicrophones);
|
||||
if (status != AudioManager.SUCCESS) {
|
||||
Log.e(TAG, "getActiveMicrophones failed:" + status);
|
||||
if (status != AudioManager.ERROR_INVALID_OPERATION) {
|
||||
Log.e(TAG, "getActiveMicrophones failed:" + status);
|
||||
}
|
||||
Log.i(TAG, "getActiveMicrophones failed, fallback on routed device info");
|
||||
}
|
||||
AudioManager.setPortIdForMicrophones(activeMicrophones);
|
||||
|
||||
|
||||
@@ -1433,7 +1433,10 @@ public class MediaRecorder implements AudioRouting
|
||||
ArrayList<MicrophoneInfo> activeMicrophones = new ArrayList<>();
|
||||
int status = native_getActiveMicrophones(activeMicrophones);
|
||||
if (status != AudioManager.SUCCESS) {
|
||||
Log.e(TAG, "getActiveMicrophones failed:" + status);
|
||||
if (status != AudioManager.ERROR_INVALID_OPERATION) {
|
||||
Log.e(TAG, "getActiveMicrophones failed:" + status);
|
||||
}
|
||||
Log.i(TAG, "getActiveMicrophones failed, fallback on routed device info");
|
||||
}
|
||||
AudioManager.setPortIdForMicrophones(activeMicrophones);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user