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

Commit 01c78382 authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Refresh should always update the field

Otherwise it's hard to keep track of things happening or not, since
the request would be postponed, leading to bugs elsewhere.

Test: Wait for time to pass on lock screen
Test: Enter/leave AOD
Fixes: 132955195
Change-Id: I54f806f9dd2d1cf4acac420bab08d4579f867a5f
parent 51374fc7
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -175,6 +175,9 @@ public class TextClock extends TextView {
            if (mTimeZone == null && Intent.ACTION_TIMEZONE_CHANGED.equals(intent.getAction())) {
                final String timeZone = intent.getStringExtra("time-zone");
                createTime(timeZone);
            } else if (!mShouldRunTicker && (Intent.ACTION_TIME_TICK.equals(intent.getAction())
                    || Intent.ACTION_TIME_CHANGED.equals(intent.getAction()))) {
                return;
            }
            onTimeChanged();
        }
@@ -642,13 +645,10 @@ public class TextClock extends TextView {
     */
    @UnsupportedAppUsage
    private void onTimeChanged() {
        // mShouldRunTicker always equals the last value passed into onVisibilityAggregated
        if (mShouldRunTicker) {
        mTime.setTimeInMillis(System.currentTimeMillis());
        setText(DateFormat.format(mFormat, mTime));
        setContentDescription(DateFormat.format(mDescFormat, mTime));
    }
    }

    /** @hide */
    @Override