Jeff Hamilton | 8402962 | 2010-08-05 14:29:28 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2010 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 | |
| 17 | package com.android.browser; |
| 18 | |
Jeff Hamilton | 8402962 | 2010-08-05 14:29:28 -0500 | [diff] [blame] | 19 | import android.content.Context; |
| 20 | import android.content.CursorLoader; |
Jeff Hamilton | 69bd707 | 2010-08-17 12:38:22 -0500 | [diff] [blame^] | 21 | import android.provider.BrowserContract.Bookmarks; |
Jeff Hamilton | 8402962 | 2010-08-05 14:29:28 -0500 | [diff] [blame] | 22 | |
| 23 | public class BookmarksLoader extends CursorLoader { |
| 24 | public static final String ARG_ROOT_FOLDER = "root"; |
| 25 | |
| 26 | public static final int COLUMN_INDEX_ID = 0; |
| 27 | public static final int COLUMN_INDEX_URL = 1; |
| 28 | public static final int COLUMN_INDEX_TITLE = 2; |
| 29 | public static final int COLUMN_INDEX_FAVICON = 3; |
| 30 | public static final int COLUMN_INDEX_THUMBNAIL = 4; |
| 31 | public static final int COLUMN_INDEX_TOUCH_ICON = 5; |
| 32 | public static final int COLUMN_INDEX_IS_FOLDER = 6; |
| 33 | |
| 34 | public static final String[] PROJECTION = new String[] { |
| 35 | Bookmarks._ID, // 0 |
| 36 | Bookmarks.URL, // 1 |
| 37 | Bookmarks.TITLE, // 2 |
| 38 | Bookmarks.FAVICON, // 3 |
| 39 | Bookmarks.THUMBNAIL, // 4 |
| 40 | Bookmarks.TOUCH_ICON, // 5 |
| 41 | Bookmarks.IS_FOLDER, // 6 |
| 42 | Bookmarks.POSITION, // 7 |
| 43 | }; |
| 44 | |
| 45 | public BookmarksLoader(Context context, int rootFolder) { |
| 46 | super(context, Bookmarks.CONTENT_URI_DEFAULT_FOLDER, PROJECTION, null, null, null); |
| 47 | } |
| 48 | } |