1 /* 2 * Copyright (C) 2018 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.settingslib.search; 18 19 import java.lang.annotation.Retention; 20 import java.lang.annotation.RetentionPolicy; 21 22 /** 23 * Denotes that the class should participate in search indexing. 24 */ 25 @Retention(RetentionPolicy.SOURCE) 26 public @interface SearchIndexable { 27 /** 28 * Bitfield for the form factors this class should be considered indexable for. 29 * Default is {@link #ALL}. 30 * 31 * TODO: actually use this value somehow 32 */ forTarget()33 int forTarget() default ALL; 34 35 /** 36 * Indicates that the class should be considered indexable for Mobile. 37 */ 38 int MOBILE = 1<<0; 39 40 /** 41 * Indicates that the class should be considered indexable for TV. 42 */ 43 int TV = 1<<1; 44 45 /** 46 * Indicates that the class should be considered indexable for Wear. 47 */ 48 int WEAR = 1<<2; 49 50 /** 51 * Indicates that the class should be considered indexable for Auto. 52 */ 53 int AUTO = 1<<3; 54 55 /** 56 * Indicates that the class should be considered indexable for ARC++. 57 */ 58 int ARC = 1<<4; 59 60 /** 61 * Indicates that the class should be considered indexable for all targets. 62 */ 63 int ALL = MOBILE | TV | WEAR | AUTO | ARC; 64 65 } 66