1 /* 2 * Copyright (C) 2015 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.util; 18 19 import com.android.tv.common.BooleanSystemProperty; 20 21 /** 22 * A convenience class for getting TV related system properties. 23 */ 24 public final class SystemProperties { 25 26 /** 27 * Allow Google Analytics for eng builds. 28 */ 29 public static final BooleanSystemProperty ALLOW_ANALYTICS_IN_ENG = new BooleanSystemProperty( 30 "tv_allow_analytics_in_eng", false); 31 32 /** 33 * Allow Strict mode for debug builds. 34 */ 35 public static final BooleanSystemProperty ALLOW_STRICT_MODE = new BooleanSystemProperty( 36 "tv_allow_strict_mode", true); 37 38 /** 39 * Allow Strict death penalty for eng builds. 40 */ 41 public static final BooleanSystemProperty ALLOW_DEATH_PENALTY = new BooleanSystemProperty( 42 "tv_allow_death_penalty", true); 43 44 /** 45 * When true {@link android.view.KeyEvent}s are logged. Defaults to false. 46 */ 47 public static final BooleanSystemProperty LOG_KEYEVENT = new BooleanSystemProperty( 48 "tv_log_keyevent", false); 49 /** 50 * When true debug keys are used. Defaults to false. 51 */ 52 public static final BooleanSystemProperty USE_DEBUG_KEYS = new BooleanSystemProperty( 53 "tv_use_debug_keys", false); 54 55 /** 56 * Send {@link com.android.tv.analytics.Tracker} information. Defaults to {@code true}. 57 */ 58 public static final BooleanSystemProperty USE_TRACKER = new BooleanSystemProperty( 59 "tv_use_tracker", true); 60 61 static { updateSystemProperties()62 updateSystemProperties(); 63 } 64 SystemProperties()65 private SystemProperties() { 66 } 67 68 /** 69 * Update the TV related system properties. 70 */ updateSystemProperties()71 public static void updateSystemProperties() { 72 BooleanSystemProperty.resetAll(); 73 } 74 } 75