Skip to content
Snippets Groups Projects
Commit 21e12427 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Avoid Calendar instanciations

parent 3c0f10d4
No related branches found
No related tags found
No related merge requests found
......@@ -1524,7 +1524,7 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
if (!mHasWidget)
return;
// no more than one widget mUpdateMeta for each 1/50 of the song
long timestamp = Calendar.getInstance().getTimeInMillis();
long timestamp = System.currentTimeMillis();
if (!hasCurrentMedia() || timestamp - mWidgetPositionTimestamp < getCurrentMedia().getLength() / 50)
return;
mWidgetPositionTimestamp = timestamp;
......
......@@ -72,7 +72,7 @@ public class SleepTimerDialog extends PickTimeFragment {
if (interval < ONE_DAY_IN_MILLIS) {
Calendar sleepTime = Calendar.getInstance();
sleepTime.setTimeInMillis(Calendar.getInstance().getTimeInMillis() + interval);
sleepTime.setTimeInMillis(sleepTime.getTimeInMillis() + interval);
sleepTime.set(Calendar.SECOND, 0);
AdvOptionsDialog.setSleep(sleepTime);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment