mirror of
				https://github.com/nerzhul/ownCloud-SMS-App.git
				synced 2025-10-31 02:17:53 +00:00 
			
		
		
		
	Little refactoring
This commit is contained in:
		
							parent
							
								
									8bdaa2a42e
								
							
						
					
					
						commit
						2576ca7468
					
				| @ -169,7 +169,7 @@ public class MainActivity extends Activity { | |||||||
| 		if (cMon.isValid()) { | 		if (cMon.isValid()) { | ||||||
| 			// Now fetch messages since last stored date | 			// Now fetch messages since last stored date | ||||||
| 			final JSONArray smsList = new SmsFetcher(ctx) | 			final JSONArray smsList = new SmsFetcher(ctx) | ||||||
| 			.bufferizeMessagesSinceDate((long) 0); | 			.bufferMessagesSinceDate((long) 0); | ||||||
| 
 | 
 | ||||||
| 			if (smsList != null) { | 			if (smsList != null) { | ||||||
| 				final OCSMSNotificationManager nMgr = new OCSMSNotificationManager(ctx); | 				final OCSMSNotificationManager nMgr = new OCSMSNotificationManager(ctx); | ||||||
|  | |||||||
| @ -1,36 +1,26 @@ | |||||||
| package fr.unix_experience.owncloud_sms.activities.remote_account; | package fr.unix_experience.owncloud_sms.activities.remote_account; | ||||||
| 
 | 
 | ||||||
| import java.lang.reflect.Array; |  | ||||||
| import java.util.ArrayList; |  | ||||||
| import java.util.Vector; |  | ||||||
| 
 |  | ||||||
| import android.accounts.Account; | import android.accounts.Account; | ||||||
| import android.accounts.AccountManager; | import android.accounts.AccountManager; | ||||||
| import android.app.Activity; | import android.app.Activity; | ||||||
| import android.app.ListActivity; |  | ||||||
| import android.content.ContentResolver; |  | ||||||
| import android.database.Cursor; | import android.database.Cursor; | ||||||
| import android.net.Uri; |  | ||||||
| import android.os.Bundle; | import android.os.Bundle; | ||||||
| import android.os.Handler; | import android.os.Handler; | ||||||
| import android.provider.ContactsContract; | import android.provider.ContactsContract; | ||||||
| import android.support.v4.widget.SwipeRefreshLayout; | import android.support.v4.widget.SwipeRefreshLayout; | ||||||
| import android.util.Log; |  | ||||||
| import android.view.View; | import android.view.View; | ||||||
| import android.widget.AdapterView; | import android.widget.AdapterView; | ||||||
| import android.widget.LinearLayout; | import android.widget.LinearLayout; | ||||||
| import android.widget.ProgressBar; | import android.widget.ProgressBar; | ||||||
| import android.widget.SeekBar; |  | ||||||
| import android.widget.Spinner; | import android.widget.Spinner; | ||||||
| import android.widget.TextView; | import android.widget.TextView; | ||||||
| 
 | 
 | ||||||
| import org.w3c.dom.Text; | import java.util.ArrayList; | ||||||
|  | import java.util.Vector; | ||||||
| 
 | 
 | ||||||
| import fr.nrz.androidlib.adapters.AndroidAccountAdapter; |  | ||||||
| import fr.unix_experience.owncloud_sms.R; | import fr.unix_experience.owncloud_sms.R; | ||||||
| import fr.unix_experience.owncloud_sms.adapters.ContactListAdapter; | import fr.unix_experience.owncloud_sms.adapters.ContactListAdapter; | ||||||
| import fr.unix_experience.owncloud_sms.engine.ASyncContactLoad; | import fr.unix_experience.owncloud_sms.engine.ASyncContactLoad; | ||||||
| import fr.unix_experience.owncloud_sms.engine.OCSMSOwnCloudClient; |  | ||||||
| 
 | 
 | ||||||
| public class ContactListActivity extends Activity implements ASyncContactLoad { | public class ContactListActivity extends Activity implements ASyncContactLoad { | ||||||
| 
 | 
 | ||||||
| @ -55,7 +45,7 @@ public class ContactListActivity extends Activity implements ASyncContactLoad { | |||||||
| 				_accountMgr.getAccountsByType(getString(R.string.account_type)); | 				_accountMgr.getAccountsByType(getString(R.string.account_type)); | ||||||
| 		 | 		 | ||||||
| 		// Init view | 		// Init view | ||||||
| 		objects = new ArrayList<String>(); | 		objects = new ArrayList<>(); | ||||||
| 		setContentView(R.layout.restore_activity_contactlist); | 		setContentView(R.layout.restore_activity_contactlist); | ||||||
| 
 | 
 | ||||||
| 		_layout = (SwipeRefreshLayout) findViewById(R.id.contactlist_swipe_container); | 		_layout = (SwipeRefreshLayout) findViewById(R.id.contactlist_swipe_container); | ||||||
|  | |||||||
| @ -17,8 +17,6 @@ package fr.unix_experience.owncloud_sms.broadcast_receivers; | |||||||
|  *  along with this program.  If not, see <http://www.gnu.org/licenses/>. |  *  along with this program.  If not, see <http://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| import org.json.JSONArray; |  | ||||||
| 
 |  | ||||||
| import android.accounts.Account; | import android.accounts.Account; | ||||||
| import android.accounts.AccountManager; | import android.accounts.AccountManager; | ||||||
| import android.content.BroadcastReceiver; | import android.content.BroadcastReceiver; | ||||||
| @ -26,6 +24,10 @@ import android.content.Context; | |||||||
| import android.content.Intent; | import android.content.Intent; | ||||||
| import android.util.Log; | import android.util.Log; | ||||||
| 
 | 
 | ||||||
|  | import org.json.JSONArray; | ||||||
|  | 
 | ||||||
|  | import java.util.concurrent.atomic.AtomicReference; | ||||||
|  | 
 | ||||||
| import fr.unix_experience.owncloud_sms.R; | import fr.unix_experience.owncloud_sms.R; | ||||||
| import fr.unix_experience.owncloud_sms.engine.ASyncSMSSync; | import fr.unix_experience.owncloud_sms.engine.ASyncSMSSync; | ||||||
| import fr.unix_experience.owncloud_sms.engine.ConnectivityMonitor; | import fr.unix_experience.owncloud_sms.engine.ConnectivityMonitor; | ||||||
| @ -35,49 +37,49 @@ import fr.unix_experience.owncloud_sms.prefs.OCSMSSharedPrefs; | |||||||
| public class ConnectivityChanged extends BroadcastReceiver implements ASyncSMSSync { | public class ConnectivityChanged extends BroadcastReceiver implements ASyncSMSSync { | ||||||
| 
 | 
 | ||||||
| 	@Override | 	@Override | ||||||
| 	public void onReceive(final Context context, final Intent intent) { | 	public void onReceive(Context context, Intent intent) { | ||||||
| 		// No account: abort | 		// No account: abort | ||||||
| 		final Account[] myAccountList = AccountManager.get(context). | 		Account[] myAccountList = AccountManager.get(context). | ||||||
| 				getAccountsByType(context.getString(R.string.account_type)); | 				getAccountsByType(context.getString(R.string.account_type)); | ||||||
| 		if (myAccountList.length == 0) { | 		if (myAccountList.length == 0) { | ||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		final ConnectivityMonitor cMon = new ConnectivityMonitor(context); | 		ConnectivityMonitor cMon = new ConnectivityMonitor(context); | ||||||
| 
 | 
 | ||||||
| 		final OCSMSSharedPrefs prefs = new OCSMSSharedPrefs(context); | 		OCSMSSharedPrefs prefs = new OCSMSSharedPrefs(context); | ||||||
| 
 | 
 | ||||||
| 		if (!prefs.pushOnReceive()) { | 		if (!prefs.pushOnReceive()) { | ||||||
| 			Log.d(TAG,"ConnectivityChanges.onReceive: pushOnReceive is disabled"); | 			Log.d(ConnectivityChanged.TAG,"ConnectivityChanges.onReceive: pushOnReceive is disabled"); | ||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		// If data is available and previous dataConnectionState was false, then we need to sync | 		// If data is available and previous dataConnectionState was false, then we need to sync | ||||||
| 		if (cMon.isValid() && dataConnectionAvailable == false) { | 		if (cMon.isValid() && !ConnectivityChanged.dataConnectionAvailable) { | ||||||
| 			dataConnectionAvailable = true; |             ConnectivityChanged.dataConnectionAvailable = true; | ||||||
| 			Log.d(TAG,"ConnectivityChanged.onReceive, data conn available"); | 			Log.d(ConnectivityChanged.TAG,"ConnectivityChanged.onReceive, data conn available"); | ||||||
| 			checkMessagesAndSend(context); | 			checkMessagesAndSend(context); | ||||||
| 		} | 		} | ||||||
| 		// No data available and previous dataConnectionState was true | 		// No data available and previous dataConnectionState was true | ||||||
| 		else if (dataConnectionAvailable == true && !cMon.isValid()) { | 		else if (ConnectivityChanged.dataConnectionAvailable && !cMon.isValid()) { | ||||||
| 			dataConnectionAvailable = false; |             ConnectivityChanged.dataConnectionAvailable = false; | ||||||
| 			Log.d(TAG,"ConnectivityChanges.onReceive: data conn is off"); | 			Log.d(ConnectivityChanged.TAG,"ConnectivityChanges.onReceive: data conn is off"); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	private void checkMessagesAndSend(final Context context) { | 	private void checkMessagesAndSend(Context context) { | ||||||
| 
 | 
 | ||||||
| 		// Get last message synced from preferences | 		// Get last message synced from preferences | ||||||
| 		final Long lastMessageSynced = (new OCSMSSharedPrefs(context)).getLastMessageDate(); | 		Long lastMessageSynced = (new OCSMSSharedPrefs(context)).getLastMessageDate(); | ||||||
| 		Log.d(TAG,"Synced Last:" + lastMessageSynced); | 		Log.d(ConnectivityChanged.TAG,"Synced Last:" + lastMessageSynced); | ||||||
| 
 | 
 | ||||||
| 		// Now fetch messages since last stored date | 		// Now fetch messages since last stored date | ||||||
| 		final JSONArray smsList = new SmsFetcher(context).bufferizeMessagesSinceDate(lastMessageSynced); | 		JSONArray smsList = new SmsFetcher(context).bufferMessagesSinceDate(lastMessageSynced); | ||||||
| 
 | 
 | ||||||
| 		final ConnectivityMonitor cMon = new ConnectivityMonitor(context); | 		AtomicReference<ConnectivityMonitor> cMon = new AtomicReference<>(new ConnectivityMonitor(context)); | ||||||
| 
 | 
 | ||||||
| 		// Synchronize if network is valid and there are SMS | 		// Synchronize if network is valid and there are SMS | ||||||
| 		if (cMon.isValid() && smsList != null) { | 		if (cMon.get().isValid() && (smsList != null)) { | ||||||
| 			new SyncTask(context, smsList).execute(); | 			new SyncTask(context, smsList).execute(); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  | |||||||
| @ -17,7 +17,6 @@ package fr.unix_experience.owncloud_sms.broadcast_receivers; | |||||||
|  *  along with this program.  If not, see <http://www.gnu.org/licenses/>. |  *  along with this program.  If not, see <http://www.gnu.org/licenses/>. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| import fr.unix_experience.owncloud_sms.observers.SmsObserver; |  | ||||||
| import android.content.BroadcastReceiver; | import android.content.BroadcastReceiver; | ||||||
| import android.content.Context; | import android.content.Context; | ||||||
| import android.content.Intent; | import android.content.Intent; | ||||||
| @ -25,15 +24,17 @@ import android.net.Uri; | |||||||
| import android.os.Handler; | import android.os.Handler; | ||||||
| import android.util.Log; | import android.util.Log; | ||||||
| 
 | 
 | ||||||
|  | import fr.unix_experience.owncloud_sms.observers.SmsObserver; | ||||||
|  | 
 | ||||||
| public class IncomingSms extends BroadcastReceiver { | public class IncomingSms extends BroadcastReceiver { | ||||||
| 
 | 
 | ||||||
| 	@Override | 	@Override | ||||||
| 	public void onReceive(Context context, Intent intent) { | 	public void onReceive(Context context, Intent intent) { | ||||||
| 		if (_mboxObserver == null) { | 		if (IncomingSms._mboxObserver == null) { | ||||||
| 			Log.d(TAG,"_mboxObserver == null"); | 			Log.d(IncomingSms.TAG,"_mboxObserver == null"); | ||||||
| 			_mboxObserver = new SmsObserver(new Handler(), context); |             IncomingSms._mboxObserver = new SmsObserver(new Handler(), context); | ||||||
| 			context.getContentResolver(). | 			context.getContentResolver(). | ||||||
| 	    		registerContentObserver(Uri.parse("content://sms"), true, _mboxObserver);   | 	    		registerContentObserver(Uri.parse("content://sms"), true, IncomingSms._mboxObserver); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
|  | |||||||
| @ -39,13 +39,13 @@ public class SmsFetcher { | |||||||
| 	 | 	 | ||||||
| 	public JSONArray fetchAllMessages() { | 	public JSONArray fetchAllMessages() { | ||||||
| 		_jsonDataDump = new JSONArray(); | 		_jsonDataDump = new JSONArray(); | ||||||
| 		bufferizeMailboxMessages(MailboxID.INBOX); | 		bufferMailboxMessages(MailboxID.INBOX); | ||||||
| 		bufferizeMailboxMessages(MailboxID.SENT); | 		bufferMailboxMessages(MailboxID.SENT); | ||||||
| 		bufferizeMailboxMessages(MailboxID.DRAFTS); | 		bufferMailboxMessages(MailboxID.DRAFTS); | ||||||
| 		return _jsonDataDump; | 		return _jsonDataDump; | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	private void bufferizeMailboxMessages(MailboxID mbID) { | 	private void bufferMailboxMessages(MailboxID mbID) { | ||||||
| 		String mbURI = mapMailboxIDToURI(mbID); | 		String mbURI = mapMailboxIDToURI(mbID); | ||||||
| 		 | 		 | ||||||
| 		if (_context == null || mbURI == null) { | 		if (_context == null || mbURI == null) { | ||||||
| @ -61,13 +61,7 @@ public class SmsFetcher { | |||||||
| 		// We generate a ID list for this message box | 		// We generate a ID list for this message box | ||||||
| 		String existingIDs = buildExistingMessagesString(mbID); | 		String existingIDs = buildExistingMessagesString(mbID); | ||||||
| 
 | 
 | ||||||
| 		Cursor c = null; | 		Cursor c = new SmsDataProvider(_context).queryNonExistingMessages(mbURI, existingIDs); | ||||||
| 		if (existingIDs.length() > 0) { |  | ||||||
| 			c = (new SmsDataProvider(_context)).query(mbURI, "_id NOT IN (" + existingIDs + ")"); |  | ||||||
| 		} |  | ||||||
| 		else { |  | ||||||
| 			c = (new SmsDataProvider(_context)).query(mbURI); |  | ||||||
| 		} |  | ||||||
| 
 | 
 | ||||||
|         // Reading mailbox |         // Reading mailbox | ||||||
| 		if (c != null && c.getCount() > 0) { | 		if (c != null && c.getCount() > 0) { | ||||||
| @ -80,24 +74,26 @@ public class SmsFetcher { | |||||||
| 						String colName = c.getColumnName(idx); | 						String colName = c.getColumnName(idx); | ||||||
| 
 | 
 | ||||||
| 						// Id column is must be an integer | 						// Id column is must be an integer | ||||||
| 						if (colName.equals(new String("_id")) || |                         switch (colName) { | ||||||
| 							colName.equals(new String("type"))) { |                             case "_id": | ||||||
|  |                             case "type": | ||||||
|                                 entry.put(colName, c.getInt(idx)); |                                 entry.put(colName, c.getInt(idx)); | ||||||
| 						} |                                 break; | ||||||
|                             // Seen and read must be pseudo boolean |                             // Seen and read must be pseudo boolean | ||||||
| 						else if (colName.equals(new String("read")) || |                             case "read": | ||||||
| 								colName.equals(new String("seen"))) { |                             case "seen": | ||||||
|                                 entry.put(colName, c.getInt(idx) > 0 ? "true" : "false"); |                                 entry.put(colName, c.getInt(idx) > 0 ? "true" : "false"); | ||||||
| 						} |                                 break; | ||||||
| 						else { |                             default: | ||||||
|                                 // Special case for date, we need to record last without searching |                                 // Special case for date, we need to record last without searching | ||||||
| 							if (colName.equals(new String("date"))) { |                                 if (colName.equals("date")) { | ||||||
|                                     final Long tmpDate = c.getLong(idx); |                                     final Long tmpDate = c.getLong(idx); | ||||||
|                                     if (tmpDate > _lastMsgDate) { |                                     if (tmpDate > _lastMsgDate) { | ||||||
|                                         _lastMsgDate = tmpDate; |                                         _lastMsgDate = tmpDate; | ||||||
|                                     } |                                     } | ||||||
|                                 } |                                 } | ||||||
|                                 entry.put(colName, c.getString(idx)); |                                 entry.put(colName, c.getString(idx)); | ||||||
|  |                                 break; | ||||||
|                         } |                         } | ||||||
| 					} | 					} | ||||||
| 
 | 
 | ||||||
| @ -143,20 +139,22 @@ public class SmsFetcher { | |||||||
| 				String colName = c.getColumnName(idx); | 				String colName = c.getColumnName(idx); | ||||||
| 				 | 				 | ||||||
| 				// Id column is must be an integer | 				// Id column is must be an integer | ||||||
| 				if (colName.equals(new String("_id"))) { |                 switch (colName) { | ||||||
|  |                     case "_id": | ||||||
|                         entry.put(colName, c.getInt(idx)); |                         entry.put(colName, c.getInt(idx)); | ||||||
| 				} |                         break; | ||||||
|                     // Seen and read must be pseudo boolean |                     // Seen and read must be pseudo boolean | ||||||
| 				else if (colName.equals(new String("read")) || |                     case "read": | ||||||
| 						colName.equals(new String("seen"))) { |                     case "seen": | ||||||
|                         entry.put(colName, c.getInt(idx) > 0 ? "true" : "false"); |                         entry.put(colName, c.getInt(idx) > 0 ? "true" : "false"); | ||||||
| 				} |                         break; | ||||||
| 				else if (colName.equals(new String("type"))) { |                     case "type": | ||||||
|                         mboxId = c.getInt(idx); |                         mboxId = c.getInt(idx); | ||||||
|                         entry.put(colName, c.getInt(idx)); |                         entry.put(colName, c.getInt(idx)); | ||||||
| 				} |                         break; | ||||||
| 				else { |                     default: | ||||||
|                         entry.put(colName, c.getString(idx)); |                         entry.put(colName, c.getString(idx)); | ||||||
|  |                         break; | ||||||
|                 } |                 } | ||||||
| 			} | 			} | ||||||
| 			 | 			 | ||||||
| @ -179,16 +177,16 @@ public class SmsFetcher { | |||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	// Used by ConnectivityChanged Event | 	// Used by ConnectivityChanged Event | ||||||
| 	public JSONArray bufferizeMessagesSinceDate(Long sinceDate) { | 	public JSONArray bufferMessagesSinceDate(Long sinceDate) { | ||||||
| 		_jsonDataDump = new JSONArray(); | 		_jsonDataDump = new JSONArray(); | ||||||
| 		bufferizeMessagesSinceDate(MailboxID.INBOX, sinceDate); | 		bufferMessagesSinceDate(MailboxID.INBOX, sinceDate); | ||||||
| 		bufferizeMessagesSinceDate(MailboxID.SENT, sinceDate); | 		bufferMessagesSinceDate(MailboxID.SENT, sinceDate); | ||||||
| 		bufferizeMessagesSinceDate(MailboxID.DRAFTS, sinceDate); | 		bufferMessagesSinceDate(MailboxID.DRAFTS, sinceDate); | ||||||
| 		return _jsonDataDump; | 		return _jsonDataDump; | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	// Used by ConnectivityChanged Event | 	// Used by ConnectivityChanged Event | ||||||
| 	public void bufferizeMessagesSinceDate(MailboxID mbID, Long sinceDate) { | 	public void bufferMessagesSinceDate(MailboxID mbID, Long sinceDate) { | ||||||
| 		String mbURI = mapMailboxIDToURI(mbID); | 		String mbURI = mapMailboxIDToURI(mbID); | ||||||
| 		 | 		 | ||||||
| 		if (_context == null || mbURI == null) { | 		if (_context == null || mbURI == null) { | ||||||
| @ -208,28 +206,26 @@ public class SmsFetcher { | |||||||
| 						String colName = c.getColumnName(idx); | 						String colName = c.getColumnName(idx); | ||||||
| 						 | 						 | ||||||
| 						// Id column is must be an integer | 						// Id column is must be an integer | ||||||
| 						if (colName.equals(new String("_id")) || |                         switch (colName) { | ||||||
| 							colName.equals(new String("type"))) { |                             case "_id": | ||||||
|  |                             case "type": | ||||||
|                                 entry.put(colName, c.getInt(idx)); |                                 entry.put(colName, c.getInt(idx)); | ||||||
| 							 |                                 break; | ||||||
| 							// bufferize Id for future use |  | ||||||
| 							if (colName.equals(new String("_id"))) { |  | ||||||
| 							} |  | ||||||
| 						} |  | ||||||
|                             // Seen and read must be pseudo boolean |                             // Seen and read must be pseudo boolean | ||||||
| 						else if (colName.equals(new String("read")) || |                             case "read": | ||||||
| 								colName.equals(new String("seen"))) { |                             case "seen": | ||||||
|                                 entry.put(colName, c.getInt(idx) > 0 ? "true" : "false"); |                                 entry.put(colName, c.getInt(idx) > 0 ? "true" : "false"); | ||||||
| 						} |                                 break; | ||||||
| 						else { |                             default: | ||||||
|                                 // Special case for date, we need to record last without searching |                                 // Special case for date, we need to record last without searching | ||||||
| 							if (colName.equals(new String("date"))) { |                                 if (colName.equals("date")) { | ||||||
|                                     final Long tmpDate = c.getLong(idx); |                                     final Long tmpDate = c.getLong(idx); | ||||||
|                                     if (tmpDate > _lastMsgDate) { |                                     if (tmpDate > _lastMsgDate) { | ||||||
|                                         _lastMsgDate = tmpDate; |                                         _lastMsgDate = tmpDate; | ||||||
|                                     } |                                     } | ||||||
|                                 } |                                 } | ||||||
|                                 entry.put(colName, c.getString(idx)); |                                 entry.put(colName, c.getString(idx)); | ||||||
|  |                                 break; | ||||||
|                         } |                         } | ||||||
| 					} | 					} | ||||||
| 					 | 					 | ||||||
| @ -288,7 +284,7 @@ public class SmsFetcher { | |||||||
| 	        			sb.append(","); | 	        			sb.append(","); | ||||||
| 	        		} | 	        		} | ||||||
| 	        		sb.append(existingMessages.getInt(i)); | 	        		sb.append(existingMessages.getInt(i)); | ||||||
| 				} catch (JSONException e) { | 				} catch (JSONException ignored) { | ||||||
| 					 | 					 | ||||||
| 				} | 				} | ||||||
| 	        } | 	        } | ||||||
|  | |||||||
| @ -50,6 +50,14 @@ public class SmsDataProvider extends ContentProvider { | |||||||
| 				); | 				); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	public Cursor queryNonExistingMessages(final String mailBox, final String existingIds) { | ||||||
|  | 		if (existingIds.length() > 0) { | ||||||
|  | 			return query(mailBox, "_id NOT IN (" + existingIds + ")"); | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
|  | 		return query(mailBox); | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 	public Cursor query(final String mailBox, final String selection, final String[] selectionArgs) { | 	public Cursor query(final String mailBox, final String selection, final String[] selectionArgs) { | ||||||
| 		return query(Uri.parse(mailBox), | 		return query(Uri.parse(mailBox), | ||||||
| 				new String[] { "read", "date", "address", "seen", "body", "_id", "type", }, | 				new String[] { "read", "date", "address", "seen", "body", "_id", "type", }, | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user