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.stub; 18 19 import android.content.Context; 20 import com.android.tv.perf.PerformanceMonitor; 21 import com.android.tv.perf.TimerEvent; 22 23 /** Do nothing implementation of {@link PerformanceMonitor}. */ 24 public final class StubPerformanceMonitor implements PerformanceMonitor { 25 26 private static final TimerEvent TIMER_EVENT = new TimerEvent() {}; 27 28 @Override startMemoryMonitor()29 public void startMemoryMonitor() {} 30 31 @Override recordMemory(String customEventName)32 public void recordMemory(String customEventName) {} 33 34 @Override startGlobalTimer(String customEventName)35 public void startGlobalTimer(String customEventName) {} 36 37 @Override stopGlobalTimer(String customEventName)38 public void stopGlobalTimer(String customEventName) {} 39 40 @Override startTimer()41 public TimerEvent startTimer() { 42 return TIMER_EVENT; 43 } 44 45 @Override stopTimer(TimerEvent event, String name)46 public void stopTimer(TimerEvent event, String name) {} 47 48 @Override startJankRecorder(String eventName)49 public void startJankRecorder(String eventName) {} 50 51 @Override stopJankRecorder(String eventName)52 public void stopJankRecorder(String eventName) {} 53 54 @Override startPerformanceMonitorEventDebugActivity(Context context)55 public boolean startPerformanceMonitorEventDebugActivity(Context context) { 56 return false; 57 } 58 59 @Override startCrashMonitor()60 public void startCrashMonitor() {} 61 } 62