Google start giving us more editing stuff in the Android Q. So, these features are really helpful for developers and certain users, who want their phone sensors to be off when they are not using it. A developer wants to turn off the sensors while in some part of the application.
Android Q beta 3 gives you this control on sensors on or off.
A quick settings toggle has shown up for developers (Setting > Developers options > Quick settings developer titles) for “Sensors off”. After adding this you can easily turn off the sensors.
After turning the sensors off, it might affect all the sensors present in the device. Like proximity sensor, compass, etc.