Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16f81e75 authored by Fabrice Di Meglio's avatar Fabrice Di Meglio
Browse files

Add support for enabled state for SearchIndexableData

- add "enabled" member which tells if the data will be
included into the search results.

Change-Id: I17f8c4b289b21061f7fc47f4902343fecb5ddc2c
parent dd1b1451
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -21,15 +21,16 @@ import android.content.Context;
import java.util.Locale;

/**
 * The Indexable data for Search. This abstract class defines the common parts for all search
 * indexable data.
 * The Indexable data for Search.
 *
 * This abstract class defines the common parts for all search indexable data.
 *
 * @hide
 */
public abstract class SearchIndexableData {

    /**
     * The context for the data. Will usually allow to retrieve some resources.
     * The context for the data. Will usually allow retrieving some resources.
     *
     * @see Context
     */
@@ -40,6 +41,11 @@ public abstract class SearchIndexableData {
     */
    public Locale locale;

    /**
     * Tells if the data will be included into the search results. This is application specific.
     */
    public boolean enabled;

    /**
     * The rank for the data. This is application specific.
     */
@@ -103,6 +109,7 @@ public abstract class SearchIndexableData {
     * Default constructor.
     */
    public SearchIndexableData() {
        enabled = true;
    }

    /**
@@ -113,5 +120,6 @@ public abstract class SearchIndexableData {
    public SearchIndexableData(Context ctx) {
        context = ctx;
        locale = Locale.getDefault();
        enabled = true;
    }
}