• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 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 
18 package com.android.settings.search;
19 
20 import static com.android.settings.search.IndexDatabaseHelper.IndexColumns;
21 
22 /**
23  * AsyncTask to retrieve Settings, first party app and any intent based results.
24  */
25 public class DatabaseResultLoader {
26 
27     private static final String TAG = "DatabaseResultLoader";
28 
29     public static final String[] SELECT_COLUMNS = {
30             IndexColumns.DOCID,
31             IndexColumns.DATA_TITLE,
32             IndexColumns.DATA_SUMMARY_ON,
33             IndexColumns.DATA_SUMMARY_OFF,
34             IndexColumns.CLASS_NAME,
35             IndexColumns.SCREEN_TITLE,
36             IndexColumns.ICON,
37             IndexColumns.INTENT_ACTION,
38             IndexColumns.INTENT_TARGET_PACKAGE,
39             IndexColumns.INTENT_TARGET_CLASS,
40             IndexColumns.DATA_KEY_REF,
41             IndexColumns.PAYLOAD_TYPE,
42             IndexColumns.PAYLOAD
43     };
44 
45     /**
46      * These indices are used to match the columns of the this loader's SELECT statement.
47      * These are not necessarily the same order nor similar coverage as the schema defined in
48      * IndexDatabaseHelper
49      */
50     public static final int COLUMN_INDEX_ID = 0;
51     public static final int COLUMN_INDEX_INTENT_ACTION_TARGET_PACKAGE = 8;
52     public static final int COLUMN_INDEX_KEY = 10;
53 }