How to determine which application is blocking microphone usage? Is there a way to determine which currently running application is using the microphone? I suspect the arrow launcher but would like to try and confirm this. I'm looking for a method which would provide logs / debug info to add to a bug report.

Android version 7.1. Rooted Nexus 5x.

I am not looking for another app to provide this functionality. I am a developer (though not Java) and would like to understand the processes involved in gaining access to and blocking the microphone.

here's the dump from dumpsys audio as requested by first answer:

 adb shell dumpsys audio

MediaFocusControl dump time: 12:43:52 pm

Audio Focus stack entries (last is top of stack):

 Notify on duck: true


Stream volumes (device: index)
- STREAM_VOICE_CALL:
   Muted: false
   Min: 1
   Max: 7
   Current: 1 (earpiece): 5, 40000000 (default): 5
   Devices: speaker
- STREAM_SYSTEM:
   Muted: false
   Min: 0
   Max: 7
   Current: 1 (earpiece): 5, 2 (speaker): 4, 40000000 (default): 5
   Devices: speaker
- STREAM_RING:
   Muted: false
   Min: 0
   Max: 7
   Current: 1 (earpiece): 5, 2 (speaker): 4, 40000000 (default): 5
   Devices: speaker
- STREAM_MUSIC:
   Muted: false
   Min: 0
   Max: 15
   Current: 4 (headset): 5, 8 (headphone): 5, 40000000 (default): 11
   Devices: speaker
- STREAM_ALARM:
   Muted: false
   Min: 0
   Max: 7
   Current: 40000000 (default): 6
   Devices: speaker
- STREAM_NOTIFICATION:
   Muted: false
   Min: 0
   Max: 7
   Current: 1 (earpiece): 5, 2 (speaker): 4, 40000000 (default): 5
   Devices: speaker
- STREAM_BLUETOOTH_SCO:
   Muted: false
   Min: 0
   Max: 15
   Current: 40000000 (default): 7
   Devices: speaker
- STREAM_SYSTEM_ENFORCED:
   Muted: false
   Min: 0
   Max: 7
   Current: 1 (earpiece): 5, 2 (speaker): 4, 40000000 (default): 5
   Devices: speaker
- STREAM_DTMF:
   Muted: false
   Min: 0
   Max: 15
   Current: 1 (earpiece): 11, 2 (speaker): 9, 40000000 (default): 11
   Devices: speaker
- STREAM_TTS:
   Muted: false
   Min: 0
   Max: 15
   Current: 4 (headset): 5, 8 (headphone): 5, 40000000 (default): 11
   Devices: speaker

- mute affected streams = 0x2e

Ringer mode: 
- mode (internal) = NORMAL
- mode (external) = NORMAL
- ringer mode affected streams = 0x1a6 (STREAM_SYSTEM,STREAM_RING,STREAM_NOTIFICATION,STREAM_SYSTEM_ENFORCED,STREAM_DTMF)
- ringer mode muted streams = 0x0
- delegate = ZenModeHelper

Audio routes:
  mMainType=0x0
  mBluetoothName=null

Other state:
  mVolumeController=VolumeController(android.os.BinderProxy@2e64f54,mVisible=false)
  mSafeMediaVolumeState=SAFE_MEDIA_VOLUME_INACTIVE
  mSafeMediaVolumeIndex=50
  mPendingVolumeCommand=null
  mMusicActiveMs=1500001
  mMcc=234
  mCameraSoundForced=false
  mHasVibrator=true
  mControllerService={mUid=0,mComponent=null}
  mVolumePolicy=VolumePolicy[volumeDownToEnterSilent=true,volumeUpToExitSilent=true,doNotDisturbWhenSilent=true,vibrateToSilentDebounce=400]


I have also tried:

adb shell dumpsys activity broadcasts | grep -i microphone


This gives no output.
Using logcat extreme and monitoring per app set to WhatsApp , it shows

mediaFocuscontrol: Audiofocus*request*Audiofocus() from Android.media.audiomanager when microphone is activated

And

mediaFocuscontrol: Audiofocus*abandon*Audiofocus() from Android.media.audiomanager when microphone is de-activated