quiet hours ported from omin/slimroms 2/3