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

Commit d208c79b authored by Jason Monk's avatar Jason Monk
Browse files

Update downtime to handle TimeZone change

Bug: 17344461
Change-Id: Ic18d0c469fac5a4c8973e52dd1e687cea2266b55
parent 6bed40ed
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
import java.util.Objects;
import java.util.TimeZone;

/** Built-in zen condition provider for managing downtime */
public class DowntimeConditionProvider extends ConditionProviderService {
@@ -275,6 +276,9 @@ public class DowntimeConditionProvider extends ConditionProviderService {
                final long schTime = intent.getLongExtra(EXTRA_TIME, 0);
                if (DEBUG) Slog.d(TAG, String.format("%s scheduled for %s, fired at %s, delta=%s",
                        action, ts(schTime), ts(now), now - schTime));
            } else if (Intent.ACTION_TIMEZONE_CHANGED.equals(action)) {
                if (DEBUG) Slog.d(TAG, "timezone changed to " + TimeZone.getDefault());
                mCalendar.setTimeZone(TimeZone.getDefault());
            } else {
                if (DEBUG) Slog.d(TAG, action + " fired at " + now);
            }