Fix update of next-alarm in widgets on KK
am: bc1e1ba8a9

* commit 'bc1e1ba8a9aee937b132822da15403cf4aab6f7a':
  Fix update of next-alarm in widgets on KK

Change-Id: I5f7329188e5a7b2403220424a211fe8cb7fb09ce
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index b74c8d0..204e27c 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -288,6 +288,7 @@
                 <action android:name="android.intent.action.TIMEZONE_CHANGED" />
                 <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
                 <action android:name="android.app.action.NEXT_ALARM_CLOCK_CHANGED" />
+                <action android:name="com.android.deskclock.ALARM_CHANGED" />
                 <action android:name="com.android.deskclock.ON_DAY_CHANGE" />
                 <action android:name="com.android.deskclock.WORLD_CITIES_CHANGED" />
             </intent-filter>
diff --git a/src/com/android/alarmclock/DigitalAppWidgetProvider.java b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
index cea5aee..20193bd 100644
--- a/src/com/android/alarmclock/DigitalAppWidgetProvider.java
+++ b/src/com/android/alarmclock/DigitalAppWidgetProvider.java
@@ -69,7 +69,7 @@
 import static android.view.View.GONE;
 import static android.view.View.MeasureSpec.UNSPECIFIED;
 import static android.view.View.VISIBLE;
-import static com.android.deskclock.alarms.AlarmStateManager.SYSTEM_ALARM_CHANGE_ACTION;
+import static com.android.deskclock.alarms.AlarmStateManager.ACTION_ALARM_CHANGED;
 import static com.android.deskclock.data.DataModel.ACTION_WORLD_CITIES_CHANGED;
 import static java.lang.Math.max;
 import static java.lang.Math.round;
@@ -142,10 +142,10 @@
         switch (intent.getAction()) {
             case ACTION_SCREEN_ON:
             case ACTION_DATE_CHANGED:
-            case ACTION_LOCALE_CHANGED:
+            case ACTION_ALARM_CHANGED:
             case ACTION_ON_DAY_CHANGE:
+            case ACTION_LOCALE_CHANGED:
             case ACTION_TIMEZONE_CHANGED:
-            case SYSTEM_ALARM_CHANGE_ACTION:
             case ACTION_WORLD_CITIES_CHANGED:
             case ACTION_NEXT_ALARM_CLOCK_CHANGED:
                 for (int widgetId : widgetIds) {
diff --git a/src/com/android/deskclock/alarms/AlarmStateManager.java b/src/com/android/deskclock/alarms/AlarmStateManager.java
index 1db698b..f1491b3 100644
--- a/src/com/android/deskclock/alarms/AlarmStateManager.java
+++ b/src/com/android/deskclock/alarms/AlarmStateManager.java
@@ -115,7 +115,7 @@
     private static final String INDICATOR_ACTION = "indicator";
 
     // System intent action to notify AppWidget that we changed the alarm text.
-    public static final String SYSTEM_ALARM_CHANGE_ACTION = "android.intent.action.ALARM_CHANGED";
+    public static final String ACTION_ALARM_CHANGED = "com.android.deskclock.ALARM_CHANGED";
 
     // Extra key to set the desired state change.
     public static final String ALARM_STATE_EXTRA = "intent.extra.alarm.state";
@@ -225,7 +225,7 @@
         Settings.System.putString(context.getContentResolver(),
                 Settings.System.NEXT_ALARM_FORMATTED,
                 timeString);
-        Intent alarmChanged = new Intent(SYSTEM_ALARM_CHANGE_ACTION);
+        Intent alarmChanged = new Intent(ACTION_ALARM_CHANGED);
         alarmChanged.putExtra("alarmSet", showStatusIcon);
         context.sendBroadcast(alarmChanged);
     }