(1/2) quiethours: de-duplicate code and add moar helper methods

Change-Id: I30e9d845e27915c70d62fd170189513185277516
Signed-off-by: Arnav Gupta <championswimmer@aokp.co>
Merge "(1/2) quiethours: de-duplicate code and add moar helper methods" into kitkat
Merge branch 'kitkat' of https://github.com/AOKP/frameworks_base into kitkat