+ * Callback method to update the progress bar in the status notification.\r
+ */\r
+ @Override\r
+ public void onTransferProgress(long progressRate, long totalTransferredSoFar, long totalToTransfer, String fileName) {\r
+ int percent = (int)(100.0*((double)totalTransferredSoFar)/((double)totalToTransfer));\r
+ if (percent != mLastPercent) {\r
+ mNotification.contentView.setProgressBar(R.id.status_progress, 100, percent, totalToTransfer < 0);\r
+ String text = String.format(getString(R.string.downloader_download_in_progress_content), percent, fileName);\r
+ mNotification.contentView.setTextViewText(R.id.status_text, text);\r
+ mNotificationManager.notify(R.string.downloader_download_in_progress_ticker, mNotification);\r
+ }\r
+ mLastPercent = percent;\r
+ }\r
+ \r
+ \r
+ /**\r
+ * Callback method to update the progress bar in the status notification (old version)\r
+ */\r
+ @Override\r
+ public void onTransferProgress(long progressRate) {\r
+ // NOTHING TO DO HERE ANYMORE\r
+ }\r
+ \r
+\r
+ /**\r