/** * Copyright (c) 2017-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ package com.facebook.litho; import android.os.Build; import android.os.Trace; import com.facebook.litho.config.ComponentsConfiguration; public class DefaultComponentsSystrace implements ComponentsSystrace.Systrace { @Override public void beginSection(String name) { if (ComponentsConfiguration.IS_INTERNAL_BUILD && Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN_MR2) { Trace.beginSection(name); } } @Override public void endSection() { if (ComponentsConfiguration.IS_INTERNAL_BUILD && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) { Trace.endSection(); } } }