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