X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/35ace0b97335cdb8d45b5b2be94c41e17fe9e040..fd1704c49cfabc9607bc67d35b6f36afca0591ff:/src/eu/alefzero/owncloud/files/services/FileDownloader.java diff --git a/src/eu/alefzero/owncloud/files/services/FileDownloader.java b/src/eu/alefzero/owncloud/files/services/FileDownloader.java index ed865b71..c051fc19 100644 --- a/src/eu/alefzero/owncloud/files/services/FileDownloader.java +++ b/src/eu/alefzero/owncloud/files/services/FileDownloader.java @@ -124,6 +124,9 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis mNotification.contentView = new RemoteViews(getApplicationContext().getPackageName(), R.layout.progressbar_layout); mNotification.contentView.setProgressBar(R.id.status_progress, 100, 0, mTotalDownloadSize == -1); mNotification.contentView.setImageViewResource(R.id.status_icon, R.drawable.icon); + // dvelasco ; contentIntent MUST be assigned to avoid app crashes in versions previous to Android 4.x ; + // BUT an empty Intent is not a very elegant solution; something smart should happen when a user 'clicks' on a download in the notification bar + mNotification.contentIntent = PendingIntent.getActivity(getApplicationContext(), 0, new Intent(), PendingIntent.FLAG_UPDATE_CURRENT); mNotificationMngr.notify(1, mNotification); @@ -152,6 +155,7 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis } mNotificationMngr.cancel(1); Intent end = new Intent(DOWNLOAD_FINISH_MESSAGE); + end.putExtra(EXTRA_FILE_PATH, file.getAbsolutePath()); sendBroadcast(end); }