Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

packages-apps-DeskClock: Commit

packages/apps/DeskClock


Commit MetaInfo

Révision3a4bd4c68531b98db58626f60d0e9a7f5db54dc2 (tree)
l'heure2010-05-20 02:54:04
AuteurDaniel Sandler <dsandler@andr...>
CommiterDaniel Sandler

Message de Log

Fix midnight date rollover in DeskClock screensaver.

Bug: 2692736
Change-Id: I36854393b273c383e63fbf771946da711d027d65

Change Summary

Modification

--- a/src/com/android/deskclock/DeskClock.java
+++ b/src/com/android/deskclock/DeskClock.java
@@ -621,12 +621,15 @@ public class DeskClock extends Activity {
621621 today.set(Calendar.MINUTE, 0);
622622 today.set(Calendar.SECOND, 0);
623623 today.add(Calendar.DATE, 1);
624- long alarmTimeUTC = today.getTimeInMillis() + today.get(Calendar.ZONE_OFFSET);
624+ long alarmTimeUTC = today.getTimeInMillis();
625+
625626 mMidnightIntent = PendingIntent.getBroadcast(this, 0, new Intent(ACTION_MIDNIGHT), 0);
626627 AlarmManager am = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
627628 am.setRepeating(AlarmManager.RTC, alarmTimeUTC, AlarmManager.INTERVAL_DAY, mMidnightIntent);
628- if (DEBUG) Log.d(LOG_TAG, "set repeating midnight event at "
629- + alarmTimeUTC + " repeating every "
629+ if (DEBUG) Log.d(LOG_TAG, "set repeating midnight event at UTC: "
630+ + alarmTimeUTC + " ("
631+ + (alarmTimeUTC - System.currentTimeMillis())
632+ + " ms from now) repeating every "
630633 + AlarmManager.INTERVAL_DAY + " with intent: " + mMidnightIntent);
631634
632635 // If we weren't previously visible but now we are, it's because we're
Afficher sur ancien navigateur de dépôt.