Settings: fix QuietHour start time

when user decide when quiethour will start/stop using time preference
alarm manager will setup the time, and call stop service in many times
before starting the service

this add some check to prevent call stop service before time to start

fix http://jira.omnirom.org/browse/OMNI-595

Change-Id: Ide4cb7f651ab153e1738d309992628b951e551c1
Settings: fix quiet hours

http://jira.omnirom.org/browse/OMNI-627

Change-Id: Ica3bff10b3147120593bbe688882404625df18be
Revert "Settings: Add "Is Starred" to Quiet Hours (1/1)"

This reverts commit 98b99c11d551c52188ec9133d00b41ef84bcab9e.
Revert "Settings: Quiet Hours Automatic Switch (2/2)"

This reverts commit a0682f0e20017bf75344bf1dbee0304c93c41373.

Conflicts:
	res/values/simpleaosp_arrays.xml
[3/3] Settings: update Quiet Hours

follow slimroms changes

Settings: Add "Is Starred" to Quiet Hours (1/1)

Starred contacts only for bypass and response
	settings.

https://gerrit.slimroms.net/#/c/5191/

Settings: QuierHours service: call with qualified user and introduce controller

This commit fixes 2 issues:

1. Call the service with a qualified user.

2. Complete overwork of the handling. Currently the SmsCallHellper is doing
   way to much work. Especially when time change broadcasts trigger the service
   update. Which ended in certain cases to a complete system overload.
   To fix it we use now a single tone controller to take care of this all

https://gerrit.slimroms.net/#/c/5749/

Settings: calendar is not a single tone

uh man should not fix stuff on 4am morning :/

as well fix a logic derp

and another one :/

https://gerrit.slimroms.net/#/c/5756/

Settings: let the controller handle all

observer should update the service.

Fix ANR for schedulService() loop on start service
	command issued

PS:
After Juba fixed the root cause and the loop the boolean check is not needed anymore

https://gerrit.slimroms.net/#/c/5814/

Settings: Prevent GC from grabbing observer
https://gerrit.slimroms.net/#/c/5822/

Quiet Hours: Allow disabling phone ringer
https://github.com/CyanogenMod/android_packages_apps_Settings/commit/3971186ba4895791168cffaa27cc0fee4156648e

also add notification if quiet hours enabled
http://jira.omnirom.org/browse/OMNI-612

tweak de service

PS14:
always start service to trigger notification
but service is doing nothing if the specific feature is
not enabled

PS15:
-new NotificationService
-added for pause, snooze and start now

PS16:
-added start/stop broadcast
-added support for external pause e.g. quick settings tile

PS17;
-cleanup

Change-Id: If37d3f710dc277ec75c55c2b0c71d91f90059cc7

Conflicts:
	AndroidManifest.xml
	res/values/custom_arrays.xml
	res/values/custom_strings.xml
	src/com/android/settings/simpleaosp/QuietHours.java
	src/com/android/settings/simpleaosp/service/AlarmService.java
	src/com/android/settings/simpleaosp/service/SmsCallHelper.java
	src/com/android/settings/simpleaosp/service/SmsCallService.java
Settings: quiet hours fixes

-the service already runs as the correct user so we
can use the simple API
-holy crap - why has nobody told me that scheduling
is completely broken :)

Change-Id: Ibb31819121099f601447a80ac937f40dfa351d8e
Settings: quiet hours cleanup and fixes

-use sendBroadcastsUser to silence log
-always kill services first on reschedule
that should fix the notification staying on sometimes
http://jira.omnirom.org/browse/OMNI-896

Change-Id: I52f34ae404b34f22d01bdc283ed50f2e3ae92560
Settings: quiet hours: force remove notification on schedule

http://jira.omnirom.org/browse/OMNI-896

This is just a workaround so that the notification
is not staying in any case.

The underlying problem is most prolly much more
serious. It looks like the service is killed for
some reason e.g. killed by android runtime

But the onDestroy method of the service is not called
else the notification would be gone

While this is not that serious for the NotificationService
it is for the SmsCallService. If this services is killed
bypass and auto-reply will no longer work

Change-Id: I18b5994e4bb7506465ed5df7b58190f6e0877397
[1/2] Settings: rework quiet hours notification

Using a service is a bad idea given the fact that we cannot
be sure that the service is not beeing killed from android.

While this fixes the problem for the notification
the problem of the SmsCallService remains and must
be solved separate

PS2:
-trace active quiet hours
-renaming

PS3:
-added init hook

http://jira.omnirom.org/browse/OMNI-896

Change-Id: I77517de514a07c831772479fb4b3d8fb9101c76c

Conflicts:
	AndroidManifest.xml
	src/com/android/settings/simpleaosp/service/NotificationService.java
	src/com/android/settings/simpleaosp/service/SmsCallController.java
[2/3] Settings: quiet hours rework

-added bypass contacts
Support a list of comtacts that will always
bypass call and/or text message quiet hours

-move service to telephony app

Change-Id: Ica94a3d0d4d916d27f78f7d942c5a5c9893b87bb

Conflicts:
	AndroidManifest.xml
	res/values/custom_arrays.xml
	res/values/custom_strings.xml
	res/xml/quiet_hours_settings.xml
	src/com/android/settings/simpleaosp/QuietHours.java
	src/com/android/settings/simpleaosp/service/AlarmReceiver.java
	src/com/android/settings/simpleaosp/service/AlarmService.java
	src/com/android/settings/simpleaosp/service/BootReceiver.java
	src/com/android/settings/simpleaosp/service/BypassAlarm.java
	src/com/android/settings/simpleaosp/service/SmsCallController.java
	src/com/android/settings/simpleaosp/service/SmsCallService.java
	src/com/android/settings/slim/service/QuietHoursController.java
	src/com/android/settings/slim/service/SmsCallController.java
Settings: quiet hours: use correct default value for show notification

Change-Id: I670985008b4d7ced0f02ef4b6bb63c6a163f9ce8
[3/3] Settings: QuietHours: allow disable system sound

taken from slimroms

https://gerrit.slimroms.net/#/c/12180/

Allow to disable :
1. DialPad tone
2. touch sounds
3. screen lock sound
4. volume adjust sound
5. dock sound

in quiethour time

Change-Id: I43b7a054bc8b4cd49ddb9166e5676b329fc716f0

Conflicts:
	res/values/custom_strings.xml
	res/xml/quiet_hours_settings.xml