Commit 21e12427 authored by Geoffrey Métais's avatar Geoffrey Métais

Avoid Calendar instanciations

parent 3c0f10d4
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment