- Intent showDetailsIntent = null;
- if (downloadResult.isSuccess()) {
- if (PreviewImageFragment.canBePreviewed(download.getFile())) {
- showDetailsIntent = new Intent(this, PreviewImageActivity.class);
- } else {
- showDetailsIntent = new Intent(this, FileDisplayActivity.class);
- }
- showDetailsIntent.putExtra(FileActivity.EXTRA_FILE, download.getFile());
- showDetailsIntent.putExtra(FileActivity.EXTRA_ACCOUNT, download.getAccount());
- showDetailsIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
-
- } else {
- // TODO put something smart in showDetailsIntent
- showDetailsIntent = new Intent();
- }
- finalNotification.contentIntent = PendingIntent.getActivity(getApplicationContext(), (int)System.currentTimeMillis(), showDetailsIntent, 0);
- finalNotification.setLatestEventInfo(getApplicationContext(), getString(tickerId), String.format(getString(contentId), new File(download.getSavePath()).getName()), finalNotification.contentIntent);
+ // TODO put something smart in showDetailsIntent
+ Intent showDetailsIntent = new Intent();
+ mNotificationBuilder
+ .setContentIntent(PendingIntent.getActivity(
+ this, (int) System.currentTimeMillis(), showDetailsIntent, 0));