Default [Q] Global on-the-fly DPI change - is it doable?

I wonder if there is a module or if it is at all possible to build a module that would change the phone's DPI on the fly, without rebooting?
This would be useful for all HDMI enabled devices where current DPI number does not make any sense when phone's display is mirrored on a big screen TV.... I know there is a per app option available but wonder if a global option, perhaps also toggling UI layout from phoneUI to tabletUI exists?


Thank you in advance.

MB866 Stock / Rooted / Waiting for 4.4.4 OTA
Current: Motorola X - GSM

Retired and destroyed: too many to mention. Honorable mentions to HTC RAPHAEL and MOTOROLA ATRIX 4G.