private static final int TOKEN_SUBSCRITPTION = -3;
private static final String NON_CHAT_AND_BLOCKED_CONTACTS = "("
private static final int TOKEN_SUBSCRITPTION = -3;
private static final String NON_CHAT_AND_BLOCKED_CONTACTS = "("
- + Im.Contacts.LAST_MESSAGE_DATE + " IS NULL) AND ("
- + Im.Contacts.TYPE + "!=" + Im.Contacts.TYPE_BLOCKED + ")";
+ + Imps.Contacts.LAST_MESSAGE_DATE + " IS NULL) AND ("
+ + Imps.Contacts.TYPE + "!=" + Imps.Contacts.TYPE_BLOCKED + ")";
+ "=? AND " + NON_CHAT_AND_BLOCKED_CONTACTS;
private static final String ONLINE_CONTACT_SELECTION = CONTACTS_SELECTION
+ "=? AND " + NON_CHAT_AND_BLOCKED_CONTACTS;
private static final String ONLINE_CONTACT_SELECTION = CONTACTS_SELECTION
static final void log(String msg) {
Log.d(ImApp.LOG_TAG, "<ContactListAdapter>" + msg);
}
static final String[] CONTACT_COUNT_PROJECTION = {
static final void log(String msg) {
Log.d(ImApp.LOG_TAG, "<ContactListAdapter>" + msg);
}
static final String[] CONTACT_COUNT_PROJECTION = {
uri = ContentUris.withAppendedId(uri, mProviderId);
uri = ContentUris.withAppendedId(uri, mAccountId);
mQueryHandler.startQuery(TOKEN_CONTACT_LISTS, null, uri, CONTACT_LIST_PROJECTION,
uri = ContentUris.withAppendedId(uri, mProviderId);
uri = ContentUris.withAppendedId(uri, mAccountId);
mQueryHandler.startQuery(TOKEN_CONTACT_LISTS, null, uri, CONTACT_LIST_PROJECTION,
uri = ContentUris.withAppendedId(uri, mProviderId);
uri = ContentUris.withAppendedId(uri, mAccountId);
mQueryHandler.startQuery(TOKEN_ONGOING_CONVERSATION, null, uri,
uri = ContentUris.withAppendedId(uri, mProviderId);
uri = ContentUris.withAppendedId(uri, mAccountId);
mQueryHandler.startQuery(TOKEN_ONGOING_CONVERSATION, null, uri,
- ContactView.CONTACT_PROJECTION, null, null, Im.Contacts.DEFAULT_SORT_ORDER);
+ ContactView.CONTACT_PROJECTION, null, null, Imps.Contacts.DEFAULT_SORT_ORDER);
uri = ContentUris.withAppendedId(uri, mProviderId);
uri = ContentUris.withAppendedId(uri, mAccountId);
mQueryHandler.startQuery(TOKEN_SUBSCRITPTION, null, uri,
ContactView.CONTACT_PROJECTION,
String.format("%s=%d AND %s=%d",
uri = ContentUris.withAppendedId(uri, mProviderId);
uri = ContentUris.withAppendedId(uri, mAccountId);
mQueryHandler.startQuery(TOKEN_SUBSCRITPTION, null, uri,
ContactView.CONTACT_PROJECTION,
String.format("%s=%d AND %s=%d",
- Im.Contacts.SUBSCRIPTION_STATUS, Im.Contacts.SUBSCRIPTION_STATUS_SUBSCRIBE_PENDING,
- Im.Contacts.SUBSCRIPTION_TYPE, Im.Contacts.SUBSCRIPTION_TYPE_FROM),
- null,Im.Contacts.DEFAULT_SORT_ORDER);
+ Imps.Contacts.SUBSCRIPTION_STATUS, Imps.Contacts.SUBSCRIPTION_STATUS_SUBSCRIBE_PENDING,
+ Imps.Contacts.SUBSCRIPTION_TYPE, Imps.Contacts.SUBSCRIPTION_TYPE_FROM),
+ null,Imps.Contacts.DEFAULT_SORT_ORDER);
String selection = mHideOfflineContacts ? ONLINE_CONTACT_SELECTION : CONTACTS_SELECTION;
String[] args = { Long.toString(listId) };
int token = (int)listId;
String selection = mHideOfflineContacts ? ONLINE_CONTACT_SELECTION : CONTACTS_SELECTION;
String[] args = { Long.toString(listId) };
int token = (int)listId;
- mQueryHandler.startQuery(token, null, Im.Contacts.CONTENT_URI,
- ContactView.CONTACT_PROJECTION, selection, args, Im.Contacts.DEFAULT_SORT_ORDER);
+ mQueryHandler.startQuery(token, null, Imps.Contacts.CONTENT_URI,
+ ContactView.CONTACT_PROJECTION, selection, args, Imps.Contacts.DEFAULT_SORT_ORDER);
private int getOnlineChildCount(Cursor groupCursor) {
long listId = groupCursor.getLong(COLUMN_CONTACT_LIST_ID);
if (mOnlineContactsCountMap == null) {
private int getOnlineChildCount(Cursor groupCursor) {
long listId = groupCursor.getLong(COLUMN_CONTACT_LIST_ID);
if (mOnlineContactsCountMap == null) {
CONTACT_COUNT_PROJECTION, where, null, null);
mOnlineContactsCountMap = new ContentQueryMap(c,
CONTACT_COUNT_PROJECTION, where, null, null);
mOnlineContactsCountMap = new ContentQueryMap(c,
mOnlineContactsCountMap.addObserver(new Observer(){
public void update(Observable observable, Object data) {
notifyDataSetChanged();
}});
}
ContentValues value = mOnlineContactsCountMap.getValues(String.valueOf(listId));
mOnlineContactsCountMap.addObserver(new Observer(){
public void update(Observable observable, Object data) {
notifyDataSetChanged();
}});
}
ContentValues value = mOnlineContactsCountMap.getValues(String.valueOf(listId));