OSDN Git Service

Always reevaluate rules when a new service is added.
authorJulia Reynolds <juliacr@google.com>
Thu, 21 Apr 2016 14:24:27 +0000 (10:24 -0400)
committerJulia Reynolds <juliacr@google.com>
Thu, 21 Apr 2016 14:38:32 +0000 (10:38 -0400)
Otherwise the condition providers may never get an
onSubscribe call and may not turn on at the right time.

Bug: 26981870
Change-Id: Ia622597f10cc26f7c34ece1748013655543f488f

services/core/java/com/android/server/notification/ZenModeConditions.java

index 0945065..86ca97d 100644 (file)
@@ -99,9 +99,7 @@ public class ZenModeConditions implements ConditionProviders.Callback {
     @Override
     public void onServiceAdded(ComponentName component) {
         if (DEBUG) Log.d(TAG, "onServiceAdded " + component);
-        if (isAutomaticActive(component)) {
-            mHelper.setConfigAsync(mHelper.getConfig(), "zmc.onServiceAdded");
-        }
+        mHelper.setConfigAsync(mHelper.getConfig(), "zmc.onServiceAdded");
     }
 
     @Override