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

Commit 83eec703 authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Note timezone changes.

Bug: 28945282
Change-Id: I62fc62e359435f19fecd7e52b2fe778475c5804c
parent d3982445
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import android.util.Slog;
import com.android.server.notification.NotificationManagerService.DumpFilter;

import java.io.PrintWriter;
import java.util.Calendar;
import java.util.TimeZone;

/**
@@ -237,6 +238,14 @@ public class ScheduleConditionProvider extends SystemConditionProviderService {
        @Override
        public void onReceive(Context context, Intent intent) {
            if (DEBUG) Slog.d(TAG, "onReceive " + intent.getAction());
            if (Intent.ACTION_TIMEZONE_CHANGED.equals(intent.getAction())) {
                for (Uri conditionId : mSubscriptions.keySet()) {
                    final ScheduleCalendar cal = mSubscriptions.get(conditionId);
                    if (cal != null) {
                        cal.setTimeZone(Calendar.getInstance().getTimeZone());
                    }
                }
            }
            evaluateSubscriptions();
        }
    };