QuietHours: clean up and consolidate code

Change-Id: Ib745ba91f800489518f1c7b5d2512ba946039696