Bug 762620 - Force last idle-daily time to be saved. r=blassey

This commit is contained in:
Gian-Carlo Pascutto 2012-07-06 07:30:55 +02:00
Родитель 7ad6524e65
Коммит 9466643cb1
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -100,6 +100,13 @@ nsIdleServiceDaily::Observe(nsISupports *,
PRInt32 nowSec = static_cast<PRInt32>(PR_Now() / PR_USEC_PER_SEC);
Preferences::SetInt(PREF_LAST_DAILY, nowSec);
// Force that to be stored so we don't retrigger twice a day under
// any circumstances.
nsIPrefService* prefs = Preferences::GetService();
if (prefs) {
prefs->SavePrefFile(nsnull);
}
#ifdef ANDROID
__android_log_print(ANDROID_LOG_INFO, "IdleService", "Storing last idle time as %d",
nowSec);