• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 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 package com.android.settings.accessibility;
18 
19 import android.content.ComponentName;
20 import android.content.Context;
21 
22 import androidx.annotation.NonNull;
23 import androidx.annotation.Nullable;
24 
25 import com.android.settingslib.search.SearchIndexableRaw;
26 
27 import java.util.List;
28 
29 /**
30  * Provider for Accessibility Search related features.
31  */
32 public interface AccessibilitySearchFeatureProvider {
33 
34     /**
35      * Returns accessibility features to be searched where the accessibility features are always on
36      * the device and their feature names won't change.
37      *
38      * @param context a valid context {@link Context} instance
39      * @return a list of {@link SearchIndexableRaw} references
40      */
41     @Nullable
getSearchIndexableRawData(Context context)42     List<SearchIndexableRaw> getSearchIndexableRawData(Context context);
43 
44     /**
45      * Returns synonyms of the Accessibility component that is used for search.
46      *
47      * @param context the context that is used for grabbing resources
48      * @param componentName the ComponentName of the accessibility feature
49      * @return a comma separated synonyms e.g. "wifi, wi-fi, network connection"
50      */
51     @NonNull
getSynonymsForComponent(@onNull Context context, @NonNull ComponentName componentName)52     String getSynonymsForComponent(@NonNull Context context, @NonNull ComponentName componentName);
53 }
54