mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +01: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;
|
package com.nextcloud.talk.webrtc;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@ -464,7 +465,7 @@ public class MagicAudioManager {
|
|||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
|
||||||
return audioManager.isWiredHeadsetOn();
|
return audioManager.isWiredHeadsetOn();
|
||||||
} else {
|
} 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) {
|
for (AudioDeviceInfo device : devices) {
|
||||||
final int type = device.getType();
|
final int type = device.getType();
|
||||||
if (type == AudioDeviceInfo.TYPE_WIRED_HEADSET) {
|
if (type == AudioDeviceInfo.TYPE_WIRED_HEADSET) {
|
||||||
|
Loading…
Reference in New Issue
Block a user