1 /* 2 * Copyright (C) 2017 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.perf; 18 19 import android.support.annotation.StringDef; 20 21 import java.lang.annotation.Retention; 22 23 import static java.lang.annotation.RetentionPolicy.SOURCE; 24 25 /** 26 * Constants for performance event names. 27 * 28 * <p>Only constants are used to insure no PII is sent. 29 * 30 */ 31 public final class EventNames { 32 33 @Retention(SOURCE) 34 @StringDef({ 35 APPLICATION_ONCREATE, 36 FETCH_EPG_TASK, 37 MAIN_ACTIVITY_ONCREATE, 38 MAIN_ACTIVITY_ONSTART, 39 MAIN_ACTIVITY_ONRESUME, 40 ON_DEVICE_SEARCH 41 }) 42 public @interface EventName {} 43 44 public static final String APPLICATION_ONCREATE = "Application.onCreate"; 45 public static final String FETCH_EPG_TASK = "FetchEpgTask"; 46 public static final String MAIN_ACTIVITY_ONCREATE = "MainActivity.onCreate"; 47 public static final String MAIN_ACTIVITY_ONSTART = "MainActivity.onStart"; 48 public static final String MAIN_ACTIVITY_ONRESUME = "MainActivity.onResume"; 49 /** 50 * Event name for query running time of on-device search in 51 * {@link com.android.tv.search.LocalSearchProvider}. 52 */ 53 public static final String ON_DEVICE_SEARCH = "OnDeviceSearch"; 54 55 private EventNames() {} 56 } 57