198af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey/*
298af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey * Copyright (C) 2018 The Android Open Source Project
398af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey *
498af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey * Licensed under the Apache License, Version 2.0 (the "License");
598af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey * you may not use this file except in compliance with the License.
698af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey * You may obtain a copy of the License at
798af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey *
898af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey *      http://www.apache.org/licenses/LICENSE-2.0
998af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey *
1098af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey * Unless required by applicable law or agreed to in writing, software
1198af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey * distributed under the License is distributed on an "AS IS" BASIS,
1298af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1398af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey * See the License for the specific language governing permissions and
1498af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey * limitations under the License.
1598af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey */
1698af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkeypackage android.annotation;
1798af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey
1898af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkeyimport static java.lang.annotation.ElementType.CONSTRUCTOR;
1998af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkeyimport static java.lang.annotation.ElementType.FIELD;
2098af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkeyimport static java.lang.annotation.ElementType.METHOD;
2198af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkeyimport static java.lang.annotation.ElementType.TYPE;
2298af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkeyimport static java.lang.annotation.RetentionPolicy.SOURCE;
2398af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey
2498af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkeyimport android.content.pm.PackageManager;
2598af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey
2698af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkeyimport java.lang.annotation.Retention;
2798af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkeyimport java.lang.annotation.Target;
2898af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey
2998af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey/**
3098af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey * Denotes that the annotated element requires one or more device features. This
3198af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey * is used to auto-generate documentation.
3298af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey *
3398af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey * @see PackageManager#hasSystemFeature(String)
3498af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey * @hide
3598af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey */
3698af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey@Retention(SOURCE)
3798af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey@Target({TYPE,FIELD,METHOD,CONSTRUCTOR})
3898af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkeypublic @interface RequiresFeature {
3998af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey    /**
4098af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey     * The name of the device feature that is required.
4198af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey     *
4298af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey     * @see PackageManager#hasSystemFeature(String)
4398af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey     */
4498af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey    String value();
4598af2e4fec8c417f4a674a99f4b40f6f248d6a83Jeff Sharkey}
46