That law regulates captured images. It doesn't require continuous shutter sounds while the phone is processing and even displaying the camera input - only once an image is captured. It seems unlikely that the AirPods will allow users to capture IR images that are used for gestural control and environmental awareness for system functions.
The law doesn't make a distinction for what the AirPod's internal processing does. Infrared definitely violates people's privacy and dignity.