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 TYPE_REDIRECTED_SLICE_URI = "TYPE_REDIRECTED_SLICE_URI"; 34 public static final String TAG_TARGET_URI = "TAG_TARGET_URI"; 35 public static final String TAG_SCREEN_TITLE = "TAG_SCREEN_TITLE"; 36 public static final String TAG_KEY = "TAG_KEY"; 37 public static final String TAG_RADIO_GROUP = "TAG_RADIO_GROUP"; 38 public static final String SUBTYPE_INTENT = "SUBTYPE_INTENT"; 39 public static final String SUBTYPE_FOLLOWUP_INTENT = "SUBTYPE_FOLLOWUP_INTENT"; 40 public static final String SUBTYPE_ICON_NEED_TO_BE_PROCESSED = 41 "SUBTYPE_ICON_NEED_TO_BE_PROCESSED"; 42 public static final String SUBTYPE_BUTTON_STYLE = "SUBTYPE_BUTTON_STYLE"; 43 public static final String SUBTYPE_IS_ENABLED = "SUBTYPE_IS_ENABLED"; 44 public static final String SUBTYPE_IS_SELECTABLE = "SUBTYPE_IS_SELECTABLE"; 45 public static final String SUBTYPE_INFO_PREFERENCE = "SUBTYPE_INFO_PREFERENCE"; 46 public static final String SUBTYPE_SEEKBAR_MIN = "SUBTYPE_SEEKBAR_MIN"; 47 public static final String SUBTYPE_SEEKBAR_MAX = "SUBTYPE_SEEKBAR_MAX"; 48 public static final String SUBTYPE_SEEKBAR_VALUE = "SUBTYPE_SEEKBAR_VALUE"; 49 public static final String PATH_STATUS = "status"; 50 public static final String PARAMETER_DIRECTION = "direction"; 51 public static final String FORWARD = "forward"; 52 public static final String BACKWARD = "back"; 53 public static final String EXIT = "exit"; 54 public static final String PARAMETER_ERROR = "error"; 55 public static final String PARAMETER_URI = "uri"; 56 public static final String EXTRA_PREFERENCE_KEY = "extra_preference_key"; 57 public static final String EXTRA_PREFERENCE_INFO_TEXT= "extra_preference_info_text"; 58 public static final String EXTRA_PREFERENCE_INFO_IMAGE = "extra_preference_info_image"; 59 public static final String EXTRA_PREFERENCE_INFO_TITLE_ICON = 60 "extra_preference_info_title_icon"; 61 public static final String EXTRA_PREFERENCE_INFO_SUMMARY = "extra_preference_info_summary"; 62 public static final String EXTRA_PREFERENCE_INFO_STATUS = "extra_preference_info_status"; 63 public static final String EXTRA_ADD_INFO_STATUS = "extra_preference_add_info_status"; 64 public static final String EXTRA_ACTION_ID = "extra_action_id"; 65 public static final String EXTRA_PAGE_ID = "extra_page_id"; 66 public static final String EXTRA_SLICE_FOLLOWUP = "extra_slice_followup"; 67 public static final int SWITCH = 0; 68 public static final int CHECKMARK = 1; 69 public static final int RADIO = 2; 70 public static final int SEEKBAR = 3; 71 72 @IntDef({SWITCH, CHECKMARK, RADIO, SEEKBAR}) 73 @Retention(RetentionPolicy.SOURCE) 74 public @interface BUTTONSTYLE {} 75 } 76