Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e4e4dd3 authored by Sara Ting's avatar Sara Ting Committed by Android (Google) Code Review
Browse files

Merge "AlertReceiver now listens to PROVIDER_CHANGED so event changes will...

Merge "AlertReceiver now listens to PROVIDER_CHANGED so event changes will refresh the notification bar." into jb-dev
parents 13596296 52a36f23
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -161,11 +161,18 @@
        <receiver android:name=".alerts.AlertReceiver">
            <intent-filter>
                <action android:name="android.intent.action.EVENT_REMINDER" />
                <action android:name="android.intent.action.LOCALE_CHANGED" />
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.TIME_SET" />
                <data android:scheme="content" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.LOCALE_CHANGED" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.PROVIDER_CHANGED"/>
                <data android:scheme="content"/>
                <data android:host="com.android.calendar"/>
            </intent-filter>
        </receiver>

        <service android:name=".alerts.AlertService" />
+8 −15
Original line number Diff line number Diff line
@@ -122,24 +122,17 @@ public class AlertService extends Service {
                    + " Action = " + action);
        }

        if (action.equals(Intent.ACTION_BOOT_COMPLETED)
        if (action.equals(Intent.ACTION_PROVIDER_CHANGED) ||
                action.equals(android.provider.CalendarContract.ACTION_EVENT_REMINDER) ||
                action.equals(Intent.ACTION_LOCALE_CHANGED)) {
            updateAlertNotification(this);
        } else if (action.equals(Intent.ACTION_BOOT_COMPLETED)
                || action.equals(Intent.ACTION_TIME_CHANGED)) {
            doTimeChanged();
            return;
        }

        if (!action.equals(android.provider.CalendarContract.ACTION_EVENT_REMINDER)
                && !action.equals(Intent.ACTION_LOCALE_CHANGED)
                && !action.equals(AlertReceiver.ACTION_DISMISS_OLD_REMINDERS)) {
            Log.w(TAG, "Invalid action: " + action);
            return;
        }
        if (action.equals(AlertReceiver.ACTION_DISMISS_OLD_REMINDERS)) {
        } else if (action.equals(AlertReceiver.ACTION_DISMISS_OLD_REMINDERS)) {
            dismissOldAlerts(this);
        }

        if (action.equals(android.provider.CalendarContract.ACTION_EVENT_REMINDER)) {
            updateAlertNotification(this);
        } else {
            Log.w(TAG, "Invalid action: " + action);
        }
    }