diff options
author | Fabrice Di Meglio <fdimeglio@google.com> | 2014-03-14 19:06:20 -0700 |
---|---|---|
committer | Fabrice Di Meglio <fdimeglio@google.com> | 2014-03-19 15:44:01 -0700 |
commit | b49995d4d997bf086c2f3214ca410b2a30861b13 (patch) | |
tree | b82e1d9d44130f83c85f7b8c48968d088ca996b7 /core/java/android/provider/SearchIndexableResource.java | |
parent | 5b568aa04a91786962af1ab372b5a62481eea8cc (diff) | |
download | frameworks_base-b49995d4d997bf086c2f3214ca410b2a30861b13.zip frameworks_base-b49995d4d997bf086c2f3214ca410b2a30861b13.tar.gz frameworks_base-b49995d4d997bf086c2f3214ca410b2a30861b13.tar.bz2 |
Introduce the SearchIndexablesProvider and its friends
- enable retrieval of search data to be indexed
Change-Id: I4a16408dec3d3305bf20107fb11eb2d1aee7fad5
Diffstat (limited to 'core/java/android/provider/SearchIndexableResource.java')
-rw-r--r-- | core/java/android/provider/SearchIndexableResource.java | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/core/java/android/provider/SearchIndexableResource.java b/core/java/android/provider/SearchIndexableResource.java new file mode 100644 index 0000000..ba3bd4f --- /dev/null +++ b/core/java/android/provider/SearchIndexableResource.java @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.provider; + +import android.content.Context; + +/** + * Search Indexable Resource. + * + * This class wraps a set of reference information representing data that can be indexed from a + * resource which would typically be a {@link android.preference.PreferenceScreen}. + * + * xmlResId: the resource ID of a {@link android.preference.PreferenceScreen} XML file. + * + * @see SearchIndexableData + * @see android.preference.PreferenceScreen + * + * @hide + */ +public class SearchIndexableResource extends SearchIndexableData { + + /** + * Resource ID of the associated {@link android.preference.PreferenceScreen} XML file. + */ + public int xmlResId; + + /** + * Constructor. + * + * @param rank the rank of the data. + * @param xmlResId the resource ID of a {@link android.preference.PreferenceScreen} XML file. + * @param className the class name associated with the data (generally a + * {@link android.app.Fragment}). + * @param iconResId the resource ID associated with the data. + */ + public SearchIndexableResource(int rank, int xmlResId, String className, int iconResId) { + this.rank = rank; + this.xmlResId = xmlResId; + this.className = className; + this.iconResId = iconResId; + } + + /** + * Constructor. + * + * @param context the Context associated with the data. + */ + public SearchIndexableResource(Context context) { + super(context); + } +}
\ No newline at end of file |