mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 06:15:12 +00:00
Suppress Lint for wrong constant of AudioManager.GET_DEVICES_ALL
Up to now AudioManager.GET_DEVICES_ALL is a valid value. Because of that the suppress annotation were added. See: https://developer.android.com/reference/android/media/AudioManager#getDevices(int) Signed-off-by: Tim Krüger <t@timkrueger.me>
This commit is contained in:
parent
0f54b6a505
commit
99f5a64c50
@ -31,6 +31,7 @@
|
||||
|
||||
package com.nextcloud.talk.webrtc;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@ -464,7 +465,7 @@ public class MagicAudioManager {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
|
||||
return audioManager.isWiredHeadsetOn();
|
||||
} else {
|
||||
final AudioDeviceInfo[] devices = audioManager.getDevices(AudioManager.GET_DEVICES_ALL);
|
||||
@SuppressLint("WrongConstant") final AudioDeviceInfo[] devices = audioManager.getDevices(AudioManager.GET_DEVICES_ALL);
|
||||
for (AudioDeviceInfo device : devices) {
|
||||
final int type = device.getType();
|
||||
if (type == AudioDeviceInfo.TYPE_WIRED_HEADSET) {
|
||||
|
Loading…
Reference in New Issue
Block a user