Zen: Downtime now a condition provider, persist conditions.
- Persist the entire exit condition instead of only the id.
- Make downtime a proper condition provider (similar to the
existing countdown provider for time-based conditions)
- Move all downtime-related items out of ZenModeHelper and
into the new condition provider.
- Reevaluate downtime more often, when any of its inputs change.
- Make sure downtime appears as an available condition in the
condition panel when applicable.
Bug:16296125
Bug:16211189
Bug:17031767
Change-Id: I1d8269a4e6fe170ce776bf932dbbdfb29dd25dd7
diff --git a/services/core/java/com/android/server/notification/ManagedServices.java b/services/core/java/com/android/server/notification/ManagedServices.java
index 36be21f..f647037 100644
--- a/services/core/java/com/android/server/notification/ManagedServices.java
+++ b/services/core/java/com/android/server/notification/ManagedServices.java
@@ -41,6 +41,7 @@
import android.provider.Settings;
import android.text.TextUtils;
import android.util.ArraySet;
+import android.util.Log;
import android.util.Slog;
import android.util.SparseArray;
@@ -64,7 +65,7 @@
*/
abstract public class ManagedServices {
protected final String TAG = getClass().getSimpleName();
- protected static final boolean DEBUG = true;
+ protected final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
private static final String ENABLED_SERVICES_SEPARATOR = ":";