private void startMsgListQuery() { try { mMsgListView.setVisibility(View.GONE); mMessage.setVisibility(View.GONE); setTitle(getString(R.string.refreshing)); setProgressBarIndeterminateVisibility(true); if (mManageMode == MessageUtils.FORWARD_MODE) { mBackgroundQueryHandler.startQuery( 0, null, Sms.CONTENT_URI, FORWARD_PROJECTION, Conversations.THREAD_ID + "=?", new String[] {String.valueOf(mThreadId)}, SORT_ORDER); } else if (mManageMode == MessageUtils.SIM_MESSAGE_MODE) { mBackgroundQueryHandler.startQuery(0, null, mIccUri, null, null, null, null); } else if (mManageMode == MessageUtils.BATCH_DELETE_MODE) { Uri uri = ContentUris.withAppendedId(Threads.CONTENT_URI, mThreadId); mBackgroundQueryHandler.startQuery( 0, null, uri, MessageListAdapter.PROJECTION, null, null, null); } } catch (SQLiteException e) { SqliteWrapper.checkSQLiteException(this, e); } }
/** Start ConversationList query. */ public final void startMsgListQuery() { // Cancel any pending queries queryHandler.cancelOperation(MESSAGE_LIST_QUERY_TOKEN); try { // Kick off the new query activity.setProgressBarIndeterminateVisibility(Boolean.TRUE); queryHandler.startQuery( MESSAGE_LIST_QUERY_TOKEN, null, Conversation.URI_SIMPLE, Conversation.PROJECTION_SIMPLE, null, null, SORT); } catch (SQLiteException e) { Log.e(TAG, "error starting query", e); } }