- // Remove success notification
- if (uploadResult.isSuccess()) {
- // Sleep 2 seconds, so show the notification before remove it
- Handler handler = new Handler();
- handler.postDelayed(new Runnable() {
- public void run() {
- mNotificationManager.cancel(R.string.uploader_upload_succeeded_ticker);
- }
- }, 2000);
+ if (uploadResult.isSuccess()) {
+
+ DbHandler db = new DbHandler(this.getBaseContext());
+ db.removeIUPendingFile(mCurrentUpload.getOriginalStoragePath());
+ db.close();
+
+ // remove success notification, with a delay of 2 seconds
+ NotificationDelayer.cancelWithDelay(
+ mNotificationManager,
+ R.string.uploader_upload_succeeded_ticker,
+ 2000);