| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.provider; |
| 18 |
|
| 19 |
import android.annotation.NonNull; |
| 20 |
import android.annotation.SystemApi; |
| 21 |
import android.content.ContentResolver; |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
@SystemApi |
| 29 |
public class SearchIndexablesContract { |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
public static final String PROVIDER_INTERFACE = |
| 36 |
"android.content.action.SEARCH_INDEXABLES_PROVIDER"; |
| 37 |
|
| 38 |
private static final String SETTINGS = "settings"; |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
public static final String INDEXABLES_XML_RES = "indexables_xml_res"; |
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
public static final String INDEXABLES_XML_RES_PATH = SETTINGS + "/" + INDEXABLES_XML_RES; |
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
public static final String INDEXABLES_RAW = "indexables_raw"; |
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
public static final String INDEXABLES_RAW_PATH = SETTINGS + "/" + INDEXABLES_RAW; |
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
public static final String NON_INDEXABLES_KEYS = "non_indexables_key"; |
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
public static final String SITE_MAP_PAIRS_KEYS = "site_map_pairs"; |
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
public static final String NON_INDEXABLES_KEYS_PATH = SETTINGS + "/" + NON_INDEXABLES_KEYS; |
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
public static final String SITE_MAP_PAIRS_PATH = SETTINGS + "/" + SITE_MAP_PAIRS_KEYS; |
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
public static final String SLICE_URI_PAIRS = "slice_uri_pairs"; |
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
public static final String SLICE_URI_PAIRS_PATH = SETTINGS + "/" + SLICE_URI_PAIRS; |
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
public static final String DYNAMIC_INDEXABLES_RAW = "dynamic_indexables_raw"; |
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
public static final String DYNAMIC_INDEXABLES_RAW_PATH = |
| 111 |
SETTINGS + "/" + DYNAMIC_INDEXABLES_RAW; |
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
public static final String[] INDEXABLES_XML_RES_COLUMNS = new String[] { |
| 117 |
XmlResource.COLUMN_RANK, |
| 118 |
XmlResource.COLUMN_XML_RESID, |
| 119 |
XmlResource.COLUMN_CLASS_NAME, |
| 120 |
XmlResource.COLUMN_ICON_RESID, |
| 121 |
XmlResource.COLUMN_INTENT_ACTION, |
| 122 |
XmlResource.COLUMN_INTENT_TARGET_PACKAGE, |
| 123 |
XmlResource.COLUMN_INTENT_TARGET_CLASS |
| 124 |
}; |
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
public static final int COLUMN_INDEX_XML_RES_RANK = 0; |
| 130 |
public static final int COLUMN_INDEX_XML_RES_RESID = 1; |
| 131 |
public static final int COLUMN_INDEX_XML_RES_CLASS_NAME = 2; |
| 132 |
public static final int COLUMN_INDEX_XML_RES_ICON_RESID = 3; |
| 133 |
public static final int COLUMN_INDEX_XML_RES_INTENT_ACTION = 4; |
| 134 |
public static final int COLUMN_INDEX_XML_RES_INTENT_TARGET_PACKAGE = 5; |
| 135 |
public static final int COLUMN_INDEX_XML_RES_INTENT_TARGET_CLASS = 6; |
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
public static final String[] INDEXABLES_RAW_COLUMNS = new String[] { |
| 141 |
RawData.COLUMN_RANK, |
| 142 |
RawData.COLUMN_TITLE, |
| 143 |
RawData.COLUMN_SUMMARY_ON, |
| 144 |
RawData.COLUMN_SUMMARY_OFF, |
| 145 |
RawData.COLUMN_ENTRIES, |
| 146 |
RawData.COLUMN_KEYWORDS, |
| 147 |
RawData.COLUMN_SCREEN_TITLE, |
| 148 |
RawData.COLUMN_CLASS_NAME, |
| 149 |
RawData.COLUMN_ICON_RESID, |
| 150 |
RawData.COLUMN_INTENT_ACTION, |
| 151 |
RawData.COLUMN_INTENT_TARGET_PACKAGE, |
| 152 |
RawData.COLUMN_INTENT_TARGET_CLASS, |
| 153 |
RawData.COLUMN_KEY, |
| 154 |
RawData.COLUMN_USER_ID, |
| 155 |
RawData.PAYLOAD_TYPE, |
| 156 |
RawData.PAYLOAD |
| 157 |
}; |
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
public static final String[] SITE_MAP_COLUMNS = new String[] { |
| 165 |
SiteMapColumns.PARENT_CLASS, |
| 166 |
SiteMapColumns.PARENT_TITLE, |
| 167 |
SiteMapColumns.CHILD_CLASS, |
| 168 |
SiteMapColumns.CHILD_TITLE, |
| 169 |
}; |
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
public static final int COLUMN_INDEX_RAW_RANK = 0; |
| 175 |
public static final int COLUMN_INDEX_RAW_TITLE = 1; |
| 176 |
public static final int COLUMN_INDEX_RAW_SUMMARY_ON = 2; |
| 177 |
public static final int COLUMN_INDEX_RAW_SUMMARY_OFF = 3; |
| 178 |
public static final int COLUMN_INDEX_RAW_ENTRIES = 4; |
| 179 |
public static final int COLUMN_INDEX_RAW_KEYWORDS = 5; |
| 180 |
public static final int COLUMN_INDEX_RAW_SCREEN_TITLE = 6; |
| 181 |
public static final int COLUMN_INDEX_RAW_CLASS_NAME = 7; |
| 182 |
public static final int COLUMN_INDEX_RAW_ICON_RESID = 8; |
| 183 |
public static final int COLUMN_INDEX_RAW_INTENT_ACTION = 9; |
| 184 |
public static final int COLUMN_INDEX_RAW_INTENT_TARGET_PACKAGE = 10; |
| 185 |
public static final int COLUMN_INDEX_RAW_INTENT_TARGET_CLASS = 11; |
| 186 |
public static final int COLUMN_INDEX_RAW_KEY = 12; |
| 187 |
public static final int COLUMN_INDEX_RAW_USER_ID = 13; |
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
public static final int COLUMN_INDEX_RAW_PAYLOAD_TYPE = 14; |
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
public static final int COLUMN_INDEX_RAW_PAYLOAD = 15; |
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
public static final String[] NON_INDEXABLES_KEYS_COLUMNS = new String[] { |
| 201 |
NonIndexableKey.COLUMN_KEY_VALUE |
| 202 |
}; |
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
|
| 207 |
public static final int COLUMN_INDEX_NON_INDEXABLE_KEYS_KEY_VALUE = 0; |
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
|
| 212 |
public static final class SliceUriPairColumns { |
| 213 |
private SliceUriPairColumns() {} |
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
public static final String KEY = "key"; |
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
public static final String SLICE_URI = "slice_uri"; |
| 223 |
} |
| 224 |
|
| 225 |
|
| 226 |
|
| 227 |
|
| 228 |
@NonNull |
| 229 |
public static final String[] SLICE_URI_PAIRS_COLUMNS = new String[] { |
| 230 |
SliceUriPairColumns.KEY, |
| 231 |
SliceUriPairColumns.SLICE_URI |
| 232 |
}; |
| 233 |
|
| 234 |
|
| 235 |
|
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
public static final class XmlResource extends BaseColumns { |
| 240 |
private XmlResource() { |
| 241 |
} |
| 242 |
|
| 243 |
public static final String MIME_TYPE = ContentResolver.CURSOR_DIR_BASE_TYPE + |
| 244 |
"/" + INDEXABLES_XML_RES; |
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
|
| 249 |
public static final String COLUMN_XML_RESID = "xmlResId"; |
| 250 |
} |
| 251 |
|
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
public static final class SiteMapColumns { |
| 256 |
public static final String PARENT_CLASS = "parent_class"; |
| 257 |
public static final String CHILD_CLASS = "child_class"; |
| 258 |
public static final String PARENT_TITLE = "parent_title"; |
| 259 |
public static final String CHILD_TITLE = "child_title"; |
| 260 |
} |
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
|
| 270 |
public static final class RawData extends BaseColumns { |
| 271 |
private RawData() { |
| 272 |
} |
| 273 |
|
| 274 |
public static final String MIME_TYPE = ContentResolver.CURSOR_DIR_BASE_TYPE + |
| 275 |
"/" + INDEXABLES_RAW; |
| 276 |
|
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
public static final String COLUMN_TITLE = "title"; |
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
|
| 285 |
public static final String COLUMN_SUMMARY_ON = "summaryOn"; |
| 286 |
|
| 287 |
|
| 288 |
|
| 289 |
|
| 290 |
public static final String COLUMN_SUMMARY_OFF = "summaryOff"; |
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
public static final String COLUMN_ENTRIES = "entries"; |
| 296 |
|
| 297 |
|
| 298 |
|
| 299 |
|
| 300 |
public static final String COLUMN_KEYWORDS = "keywords"; |
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
|
| 305 |
public static final String COLUMN_SCREEN_TITLE = "screenTitle"; |
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
public static final String COLUMN_KEY = "key"; |
| 311 |
|
| 312 |
|
| 313 |
|
| 314 |
|
| 315 |
public static final String COLUMN_USER_ID = "user_id"; |
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
|
| 321 |
|
| 322 |
public static final String PAYLOAD_TYPE = "payload_type"; |
| 323 |
|
| 324 |
|
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
|
| 329 |
public static final String PAYLOAD = "payload"; |
| 330 |
} |
| 331 |
|
| 332 |
|
| 333 |
|
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
public static final class NonIndexableKey extends BaseColumns { |
| 338 |
private NonIndexableKey() { |
| 339 |
} |
| 340 |
|
| 341 |
public static final String MIME_TYPE = ContentResolver.CURSOR_DIR_BASE_TYPE + |
| 342 |
"/" + NON_INDEXABLES_KEYS; |
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
public static final String COLUMN_KEY_VALUE = "key"; |
| 348 |
} |
| 349 |
|
| 350 |
|
| 351 |
|
| 352 |
|
| 353 |
public static class BaseColumns { |
| 354 |
private BaseColumns() { |
| 355 |
} |
| 356 |
|
| 357 |
|
| 358 |
|
| 359 |
|
| 360 |
|
| 361 |
public static final String COLUMN_RANK = "rank"; |
| 362 |
|
| 363 |
|
| 364 |
|
| 365 |
|
| 366 |
public static final String COLUMN_CLASS_NAME = "className"; |
| 367 |
|
| 368 |
|
| 369 |
|
| 370 |
|
| 371 |
public static final String COLUMN_ICON_RESID = "iconResId"; |
| 372 |
|
| 373 |
|
| 374 |
|
| 375 |
|
| 376 |
public static final String COLUMN_INTENT_ACTION = "intentAction"; |
| 377 |
|
| 378 |
|
| 379 |
|
| 380 |
|
| 381 |
public static final String COLUMN_INTENT_TARGET_PACKAGE = "intentTargetPackage"; |
| 382 |
|
| 383 |
|
| 384 |
|
| 385 |
|
| 386 |
public static final String COLUMN_INTENT_TARGET_CLASS = "intentTargetClass"; |
| 387 |
} |
| 388 |
} |