quiet hours ported from omin/slimroms 1/3