1 /* 2 * Copyright (C) 2007 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.internal.telephony.cat; 18 19 import android.annotation.UnsupportedAppUsage; 20 import android.telephony.Rlog; 21 22 public abstract class CatLog { 23 static final boolean DEBUG = true; 24 25 @UnsupportedAppUsage d(Object caller, String msg)26 public static void d(Object caller, String msg) { 27 if (!DEBUG) { 28 return; 29 } 30 31 String className = caller.getClass().getName(); 32 Rlog.d("CAT", className.substring(className.lastIndexOf('.') + 1) + ": " 33 + msg); 34 } 35 36 @UnsupportedAppUsage d(String caller, String msg)37 public static void d(String caller, String msg) { 38 if (!DEBUG) { 39 return; 40 } 41 42 Rlog.d("CAT", caller + ": " + msg); 43 } 44 @UnsupportedAppUsage e(Object caller, String msg)45 public static void e(Object caller, String msg) { 46 String className = caller.getClass().getName(); 47 Rlog.e("CAT", className.substring(className.lastIndexOf('.') + 1) + ": " 48 + msg); 49 } 50 e(String caller, String msg)51 public static void e(String caller, String msg) { 52 Rlog.e("CAT", caller + ": " + msg); 53 } 54 } 55