I know this question is asked several times. My problem is to use a mute function which is depricated now. But the new solutions cannot be applied to lower versions. I have used this function within a if else loop as shown in the code given below. But while inspecting the code, it is showing a Code maturity issue. Is there any way to avoid this inspection issue. Can I use any annotations or something like that?
 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            audioManager.adjustVolume(AudioManager.ADJUST_MUTE, AudioManager.FLAG_REMOVE_SOUND_AND_VIBRATE);
        } else {
            audioManager.setStreamMute(AudioManager.STREAM_MUSIC, true);
        }
Hope to get a good solution. Thanks in advance
 
     
     
    