When placed into night mode (dim mode), the DeskClock must
restore full brightness any time the user returns to it from
another activity. There are two reasons for this:
1. The other activity won't be dim, so it's sort of jarring
to return to an almost-black screen.
2. As indicated in bug
2305223, visiting another activity is
a useful way to restore the display if it's so dark that
you can't see it to find the nightmode toggle button
(e.g., ambient lighting is very bright).
am.setRepeating(AlarmManager.RTC, today.getTimeInMillis(), AlarmManager.INTERVAL_DAY, mMidnightIntent);
registerReceiver(mIntentReceiver, filter);
- doDim(false); // un-dim when resuming
+ // un-dim when resuming
+ mDimmed = false;
+ doDim(false);
+
restoreScreen(); // disable screen saver
refreshAll(); // will schedule periodic weather fetch