1 /* 2 * Copyright (C) 2018 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.systemui.shared.system; 18 19 import com.android.internal.logging.MetricsLogger; 20 import com.android.internal.logging.nano.MetricsProto.MetricsEvent; 21 22 public class MetricsLoggerCompat { 23 24 private final MetricsLogger mMetricsLogger; 25 public static final int OVERVIEW_ACTIVITY = MetricsEvent.OVERVIEW_ACTIVITY; 26 27 public MetricsLoggerCompat() { 28 mMetricsLogger = new MetricsLogger(); 29 } 30 31 public void action(int category) { 32 mMetricsLogger.action(category); 33 } 34 35 public void action(int category, int value) { 36 mMetricsLogger.action(category, value); 37 } 38 39 public void visible(int category) { 40 mMetricsLogger.visible(category); 41 } 42 43 public void hidden(int category) { 44 mMetricsLogger.hidden(category); 45 } 46 47 public void visibility(int category, boolean visible) { 48 mMetricsLogger.visibility(category, visible); 49 } 50 } 51