Frank Sposaro | 32f3955 | 2011-06-06 11:01:50 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License |
| 15 | */ |
| 16 | package com.android.contacts; |
| 17 | |
| 18 | import android.content.Context; |
| 19 | import android.content.CursorLoader; |
| 20 | import android.provider.ContactsContract.Contacts; |
| 21 | |
| 22 | /** |
| 23 | * Strequent meta-data loader. Loads all starred and frequent contacts from the database. |
| 24 | */ |
| 25 | public final class StrequentMetaDataLoader extends CursorLoader { |
| 26 | |
| 27 | public final static int CONTACT_ID = 0; |
| 28 | public final static int DISPLAY_NAME = 1; |
| 29 | public final static int STARRED = 2; |
| 30 | public final static int PHOTO_URI = 3; |
Frank Sposaro | b961b3b | 2011-06-10 11:16:50 -0700 | [diff] [blame^] | 31 | public final static int LOOKUP_KEY = 4; |
Frank Sposaro | 32f3955 | 2011-06-06 11:01:50 -0700 | [diff] [blame] | 32 | |
| 33 | private static final String[] COLUMNS = new String[] { |
| 34 | Contacts._ID, |
| 35 | Contacts.DISPLAY_NAME, |
| 36 | Contacts.STARRED, |
| 37 | Contacts.PHOTO_URI, |
Frank Sposaro | b961b3b | 2011-06-10 11:16:50 -0700 | [diff] [blame^] | 38 | Contacts.LOOKUP_KEY |
Frank Sposaro | 32f3955 | 2011-06-06 11:01:50 -0700 | [diff] [blame] | 39 | }; |
| 40 | |
| 41 | public StrequentMetaDataLoader(Context context) { |
| 42 | super(context, Contacts.CONTENT_STREQUENT_URI, COLUMNS, null, null, null); |
| 43 | } |
| 44 | } |