private void onRefreshTick() { Log.d(TAG, "onRefreshTick()"); if (this.isServiceBound()) { long remainingMilliseconds = this.getCountdownService().getRemainingMilliseconds(); Log.v(TAG, "refresh tick - remainingMilliseconds: " + remainingMilliseconds); TimeParts timeParts = TimeParts.fromMillisRoundingUp(remainingMilliseconds); this.setTime(timeParts); if (this.showPieChart) { this.pieChart.setFraction( this.getCountdownService().getRemainingFractionRoundedUpToFullSeconds()); } } else { Log.w(TAG, "service not bound in onRefreshTick"); } }
private void refreshTextViewsFromService() { long remainingMilliseconds = this.getCountdownService().getRemainingMilliseconds(); TimeParts timeParts = TimeParts.fromMillisRoundingUp(remainingMilliseconds); this.setTime(timeParts); }