The fuel and mixture monitoring sensors on the bike - of which there are a few - are all situated after the air filter and before the exhaust - cat and free flowing aftermarket cans.
The computer in the bike continually monitors the system and adjusts the fuel mixture to suit - no change in air filter or exhaust will change the fuel mixture at the engine. The bike is continually compensating for this.
That is why these bikes continue to be perfectly tuned when starting cold, or in colder or warmer ambient temps (barometric pressure) as well as not being affected by altitude - the wonders of electronic fuel injection.
The BMW and other bikes even have a delay in this change depending on other factors like time you have run the bike while riding and consistency of your riding - ie. if you have done long hauls of highway riding the bike will delay the change in fuel/ignition due to riding style. That is why when you sometimes leave the highway and go through a few stops the bikes seems to be running extra lean or doesn't run right - until the computer figures out you are not on the highway again and changes - Harleys are notorious for taking a long time - all pre-programmed into the bikes.
As I noted many posts ago - when we attempted to change to fuel mixture characteristics of our BMW R - race bike by modifying both the exhaust and air chamber/filter we could not do this no matter how aggressive we were - the bike adjusted for it in all respects. The only way to do this is by either tricking the sensors - or by reprogramming the computer.
So aftermarket filters and exhausts (provided they have O2 sensors) and the filters actually filter the air - are completely safe and will not change the "leaness" mixture in the combustion chamber at all.
The bikes are too smart.
Now oil in the filter bunging up a carb is another issue and I do not use K&N because of those exact issues before and numerous testing that suggests either foam or standard oem paper is better but this isn't an air filter thread is it...