1 /* 2 * Copyright (C) 2016 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.common.feature; 18 19 import static com.android.tv.common.feature.FeatureUtils.AND; 20 import static com.android.tv.common.feature.FeatureUtils.OR; 21 import static com.android.tv.common.feature.TestableFeature.createTestableFeature; 22 23 /** 24 * List of {@link Feature} that affect more than just the Live TV app. 25 * 26 * <p>Remove the {@code Feature} once it is launched. 27 */ 28 public class CommonFeatures { 29 /** 30 * DVR 31 * 32 * <p>See <a href="https://goto.google.com/atv-dvr-onepager">go/atv-dvr-onepager</a> 33 * 34 * DVR API is introduced in N, it only works when app runs as a system app. 35 */ 36 public static final TestableFeature DVR = createTestableFeature( 37 AND(OR(Sdk.N_PRE_2_OR_HIGHER, Sdk.AT_LEAST_N), SystemAppFeature.SYSTEM_APP_FEATURE)); 38 39 /** 40 * ENABLE_RECORDING_REGARDLESS_OF_STORAGE_STATUS 41 * 42 * Enables dvr recording regardless of storage status. 43 */ 44 public static final Feature FORCE_RECORDING_UNTIL_NO_SPACE = 45 new PropertyFeature("force_recording_until_no_space", false); 46 47 /** 48 * USE_SW_CODEC_FOR_SD 49 * 50 * Prefer software based codec for SD channels. 51 */ 52 public static final Feature USE_SW_CODEC_FOR_SD = 53 new PropertyFeature("use_sw_codec_for_sd", false 54 ); 55 } 56