diff options
Diffstat (limited to 'src/com/android/settings/bluetooth/Utils.java')
-rwxr-xr-x | src/com/android/settings/bluetooth/Utils.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/com/android/settings/bluetooth/Utils.java b/src/com/android/settings/bluetooth/Utils.java index 1970400..e9230de 100755 --- a/src/com/android/settings/bluetooth/Utils.java +++ b/src/com/android/settings/bluetooth/Utils.java @@ -24,6 +24,8 @@ import android.content.DialogInterface; import android.widget.Toast; import com.android.settings.R; +import com.android.settings.search.Index; +import com.android.settings.search.SearchIndexableRaw; /** * Utils is a helper class that contains constants for various @@ -101,4 +103,19 @@ final class Utils { Toast.makeText(context, message, Toast.LENGTH_SHORT).show(); } } + + /** + * Update the search Index for a specific class name and resources. + */ + public static void updateSearchIndex(Context context, String className, String title, + String screenTitle, int iconResId, boolean enabled) { + SearchIndexableRaw data = new SearchIndexableRaw(context); + data.className = className; + data.title = title; + data.screenTitle = screenTitle; + data.iconResId = iconResId; + data.enabled = enabled; + + Index.getInstance(context).updateFromSearchIndexableData(data); + } } |