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 * When true {@link android.view.KeyEvent}s are logged. Defaults to false. 40 */ 41 public static final BooleanSystemProperty LOG_KEYEVENT = new BooleanSystemProperty( 42 "tv_log_keyevent", false); 43 /** 44 * When true debug keys are used. Defaults to false. 45 */ 46 public static final BooleanSystemProperty USE_DEBUG_KEYS = new BooleanSystemProperty( 47 "tv_use_debug_keys", false); 48 49 /** 50 * Send {@link com.android.tv.analytics.Tracker} information. Defaults to {@code true}. 51 */ 52 public static final BooleanSystemProperty USE_TRACKER = new BooleanSystemProperty( 53 "tv_use_tracker", true); 54 55 static { 56 updateSystemProperties(); 57 } 58 59 private SystemProperties() { 60 } 61 62 /** 63 * Update the TV related system properties. 64 */ 65 public static void updateSystemProperties() { 66 BooleanSystemProperty.resetAll(); 67 } 68 } 69