1 /*
2  * Copyright (C) 2019 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.tv.twopanelsettings.slices;
18 
19 import androidx.annotation.IntDef;
20 
21 import java.lang.annotation.Retention;
22 import java.lang.annotation.RetentionPolicy;
23 
24 /**
25  * Constants for slice.
26  */
27 public final class SlicesConstants {
28     public static final String TYPE_PREFERENCE = "TYPE_PREFERENCE";
29     public static final String TYPE_PREFERENCE_CATEGORY = "TYPE_PREFERENCE_CATEGORY";
30     public static final String TYPE_PREFERENCE_SCREEN_TITLE = "TYPE_PREFERENCE_SCREEN_TITLE";
31     public static final String TYPE_PREFERENCE_EMBEDDED = "TYPE_PREFERENCE_EMBEDDED";
32     public static final String TYPE_FOCUSED_PREFERENCE = "TYPE_FOCUSED_PREFERENCE";
33     public static final String TAG_TARGET_URI = "TAG_TARGET_URI";
34     public static final String TAG_SCREEN_TITLE = "TAG_SCREEN_TITLE";
35     public static final String TAG_KEY = "TAG_KEY";
36     public static final String TAG_RADIO_GROUP = "TAG_RADIO_GROUP";
37     public static final String SUBTYPE_INTENT = "SUBTYPE_INTENT";
38     public static final String SUBTYPE_FOLLOWUP_INTENT = "SUBTYPE_FOLLOWUP_INTENT";
39     public static final String SUBTYPE_ICON_NEED_TO_BE_PROCESSED =
40             "SUBTYPE_ICON_NEED_TO_BE_PROCESSED";
41     public static final String SUBTYPE_BUTTON_STYLE = "SUBTYPE_BUTTON_STYLE";
42     public static final String SUBTYPE_IS_ENABLED = "SUBTYPE_IS_ENABLED";
43     public static final String SUBTYPE_IS_SELECTABLE = "SUBTYPE_IS_SELECTABLE";
44     public static final String SUBTYPE_INFO_PREFERENCE = "SUBTYPE_INFO_PREFERENCE";
45     public static final String PATH_STATUS = "status";
46     public static final String PARAMETER_DIRECTION = "direction";
47     public static final String FORWARD = "forward";
48     public static final String BACKWARD = "back";
49     public static final String PARAMETER_ERROR = "error";
50     public static final String PARAMETER_URI = "uri";
51     public static final String EXTRA_PREFERENCE_KEY = "extra_preference_key";
52     public static final String EXTRA_PREFERENCE_INFO_TEXT= "extra_preference_info_text";
53     public static final String EXTRA_PREFERENCE_INFO_IMAGE = "extra_preference_info_image";
54     public static final String EXTRA_ACTION_ID = "extra_action_id";
55     public static final String EXTRA_PAGE_ID = "extra_page_id";
56     public static final String EXTRA_SLICE_FOLLOWUP = "extra_slice_followup";
57     public static final int SWITCH = 0;
58     public static final int CHECKMARK = 1;
59     public static final int RADIO = 2;
60 
61     @IntDef({SWITCH, CHECKMARK, RADIO})
62     @Retention(RetentionPolicy.SOURCE)
63     public @interface BUTTONSTYLE {}
64 }
65