Merge "Make back mic available when getting all available mic." into pi-dev

This commit is contained in:
TreeHugger Robot
2018-03-30 16:59:41 +00:00
committed by Android (Google) Code Review
4 changed files with 6 additions and 6 deletions

View File

@@ -21963,6 +21963,7 @@ package android.media {
}
public final class AudioDeviceInfo {
method public java.lang.String getAddress();
method public int[] getChannelCounts();
method public int[] getChannelIndexMasks();
method public int[] getChannelMasks();
@@ -24454,6 +24455,7 @@ package android.media {
}
public final class MicrophoneInfo {
method public java.lang.String getAddress();
method public java.util.List<android.util.Pair<java.lang.Integer, java.lang.Integer>> getChannelMapping();
method public java.lang.String getDescription();
method public int getDirectionality();

View File

@@ -226,11 +226,10 @@ public final class AudioDeviceInfo {
}
/**
* @hide
* @return The "address" string of the device. This generally contains device-specific
* parameters.
*/
public String getAddress() {
public @NonNull String getAddress() {
return mPort.address();
}

View File

@@ -4596,8 +4596,7 @@ public class AudioManager {
private static boolean checkTypes(AudioDevicePort port) {
return AudioDeviceInfo.convertInternalDeviceToDeviceType(port.type()) !=
AudioDeviceInfo.TYPE_UNKNOWN &&
port.type() != AudioSystem.DEVICE_IN_BACK_MIC;
AudioDeviceInfo.TYPE_UNKNOWN;
}
/**

View File

@@ -17,6 +17,7 @@
package android.media;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.util.Pair;
import java.lang.annotation.Retention;
@@ -224,12 +225,11 @@ public final class MicrophoneInfo {
}
/**
* @hide
* Returns The "address" string of the microphone that corresponds to the
* address returned by {@link AudioDeviceInfo#getAddress()}
* @return the address of the microphone
*/
public String getAddress() {
public @NonNull String getAddress() {
return mAddress;
}