1
0
mirror of https://github.com/nerzhul/ownCloud-SMS-App.git synced 2025-07-06 06:06:16 +00:00

v1.6.1: Remove sync error notification if a good sync is done after a bad sync

This commit is contained in:
Loïc Blot (@U-Exp) 2015-01-18 17:42:38 +01:00
parent 208746d855
commit 6480b3dbbd
3 changed files with 9 additions and 2 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="fr.unix_experience.owncloud_sms"
android:versionCode="16"
android:versionName="0.16.0" >
android:versionCode="17"
android:versionName="0.16.1" >
<!-- From Android 3.0 to 5.0 -->
<uses-sdk
android:minSdkVersion="11"

View File

@ -46,6 +46,10 @@ public class OCSMSNotificationManager {
);
}
public void dropSyncErrorMsg() {
_notification.cancelNotify(OCSMSNotificationType.SYNC_FAILED);
}
public void setDebugMsg(String errMsg) {
createNotificationIfPossible(OCSMSNotificationType.DEBUG,
"DEBUG", errMsg

View File

@ -58,6 +58,8 @@ public class SmsSyncAdapter extends AbstractThreadedSyncAdapter {
// and push datas
_client.doPushRequest(null);
nMgr.dropSyncErrorMsg();
} catch (OCSyncException e) {
nMgr.setSyncErrorMsg(getContext().getString(e.getErrorId()));
if (e.getErrorType() == OCSyncErrorType.IO) {
@ -75,6 +77,7 @@ public class SmsSyncAdapter extends AbstractThreadedSyncAdapter {
}
nMgr.dropSyncProcessMsg();
}
private AccountManager _accountMgr;