Grant that notifications of finished downloads can be removed from notification are without clicking on

This commit is contained in:
David A. Velasco 2014-03-14 14:18:52 +01:00
parent 9b2e4a6063
commit 35bf347759
2 changed files with 2 additions and 9 deletions

View file

@ -44,12 +44,10 @@ import com.owncloud.android.ui.activity.FileActivity;
import com.owncloud.android.ui.activity.FileDisplayActivity;
import com.owncloud.android.ui.preview.PreviewImageActivity;
import com.owncloud.android.ui.preview.PreviewImageFragment;
import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.Log_OC;
import android.accounts.Account;
import android.accounts.AccountsException;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
@ -62,7 +60,6 @@ import android.os.Looper;
import android.os.Message;
import android.os.Process;
import android.support.v4.app.NotificationCompat;
import android.widget.RemoteViews;
public class FileDownloader extends Service implements OnDatatransferProgressListener {
@ -467,7 +464,8 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis
mNotificationBuilder
.setTicker(getString(tickerId))
.setContentTitle(getString(tickerId))
.setAutoCancel(true);
.setAutoCancel(true)
.setOngoing(false);
boolean needsToUpdateCredentials = (downloadResult.getCode() == ResultCode.UNAUTHORIZED ||
// (downloadResult.isTemporalRedirection() && downloadResult.isIdPRedirection()
(downloadResult.isIdPRedirection()

View file

@ -53,13 +53,11 @@ import com.owncloud.android.ui.activity.FileDisplayActivity;
import com.owncloud.android.ui.activity.InstantUploadActivity;
import com.owncloud.android.ui.preview.PreviewImageActivity;
import com.owncloud.android.ui.preview.PreviewImageFragment;
import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.Log_OC;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.accounts.AccountsException;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
@ -73,7 +71,6 @@ import android.os.Message;
import android.os.Process;
import android.support.v4.app.NotificationCompat;
import android.webkit.MimeTypeMap;
import android.widget.RemoteViews;
@ -120,7 +117,6 @@ public class FileUploader extends Service implements OnDatatransferProgressListe
private NotificationManager mNotificationManager;
private NotificationCompat.Builder mNotificationBuilder;
private int mLastPercent;
private RemoteViews mDefaultNotificationContentView;
public static String getUploadFinishMessage() {
@ -679,7 +675,6 @@ public class FileUploader extends Service implements OnDatatransferProgressListe
*
* @param upload Upload operation starting.
*/
@SuppressWarnings("deprecation")
private void notifyUploadStart(UploadFileOperation upload) {
// / create status notification with a progress bar
mLastPercent = 0;