mirror of
				https://github.com/nerzhul/ownCloud-SMS-App.git
				synced 2025-10-29 09:27:26 +00:00 
			
		
		
		
	v1.6.1: Remove sync error notification if a good sync is done after a bad sync
This commit is contained in:
		
							parent
							
								
									208746d855
								
							
						
					
					
						commit
						6480b3dbbd
					
				| @ -1,8 +1,8 @@ | |||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | <manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||||||
|     package="fr.unix_experience.owncloud_sms" |     package="fr.unix_experience.owncloud_sms" | ||||||
|     android:versionCode="16" |     android:versionCode="17" | ||||||
|     android:versionName="0.16.0" > |     android:versionName="0.16.1" > | ||||||
| 	<!-- From Android 3.0 to 5.0 --> | 	<!-- From Android 3.0 to 5.0 --> | ||||||
|     <uses-sdk |     <uses-sdk | ||||||
|         android:minSdkVersion="11" |         android:minSdkVersion="11" | ||||||
|  | |||||||
| @ -46,6 +46,10 @@ public class OCSMSNotificationManager { | |||||||
| 		); | 		); | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
|  | 	public void dropSyncErrorMsg() { | ||||||
|  | 		_notification.cancelNotify(OCSMSNotificationType.SYNC_FAILED); | ||||||
|  | 	} | ||||||
|  | 	 | ||||||
| 	public void setDebugMsg(String errMsg) { | 	public void setDebugMsg(String errMsg) { | ||||||
| 		createNotificationIfPossible(OCSMSNotificationType.DEBUG,  | 		createNotificationIfPossible(OCSMSNotificationType.DEBUG,  | ||||||
| 			"DEBUG", errMsg | 			"DEBUG", errMsg | ||||||
|  | |||||||
| @ -58,6 +58,8 @@ public class SmsSyncAdapter extends AbstractThreadedSyncAdapter { | |||||||
| 			 | 			 | ||||||
| 			// and push datas | 			// and push datas | ||||||
| 			_client.doPushRequest(null); | 			_client.doPushRequest(null); | ||||||
|  | 			 | ||||||
|  | 			nMgr.dropSyncErrorMsg(); | ||||||
| 		} catch (OCSyncException e) { | 		} catch (OCSyncException e) { | ||||||
| 			nMgr.setSyncErrorMsg(getContext().getString(e.getErrorId())); | 			nMgr.setSyncErrorMsg(getContext().getString(e.getErrorId())); | ||||||
| 			if (e.getErrorType() == OCSyncErrorType.IO) { | 			if (e.getErrorType() == OCSyncErrorType.IO) { | ||||||
| @ -75,6 +77,7 @@ public class SmsSyncAdapter extends AbstractThreadedSyncAdapter { | |||||||
| 		} | 		} | ||||||
| 		 | 		 | ||||||
| 		nMgr.dropSyncProcessMsg(); | 		nMgr.dropSyncProcessMsg(); | ||||||
|  | 		 | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	private AccountManager _accountMgr; | 	private AccountManager _accountMgr; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user