• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2020 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.intelligence.search;
18 
19 /**
20  * Shared constant variables and identifiers.
21  */
22 public class SearchCommon {
23     /**
24      * Instance state key for the currently entered query.
25      */
26     public static final String STATE_QUERY = "state_query";
27     /**
28      * Instance state key for whether or not saved queries are being shown.
29      */
30     public static final String STATE_SHOWING_SAVED_QUERY = "state_showing_saved_query";
31     /**
32      * Instance state key for whether or not a query has been entered yet.
33      */
34     public static final String STATE_NEVER_ENTERED_QUERY = "state_never_entered_query";
35 
36     /**
37      * Identifier constants for the search loaders.
38      */
39     public static final class SearchLoaderId {
40         /**
41          * Loader identifier to get search results.
42          */
43         public static final int SEARCH_RESULT = 1;
44         /**
45          * Loader identifier to save an entered query.
46          */
47         public static final int SAVE_QUERY_TASK = 2;
48         /**
49          * Loader identifier to remove an entered query.
50          */
51         public static final int REMOVE_QUERY_TASK = 3;
52         /**
53          * Loader identifier to get currently saved queries.
54          */
55         public static final int SAVED_QUERIES = 4;
56     }
57 }
58