1 /* 2 * Copyright (C) 2020 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.screenshot; 18 19 @SuppressWarnings("PointlessBooleanExpression") 20 class LogConfig { 21 22 /** Log ALL the things... */ 23 private static final boolean DEBUG_ALL = false; 24 25 /** Default log logTag for screenshot code */ 26 private static final String TAG_SS = "Screenshot"; 27 28 /** Use class name as Log tag instead of the default */ 29 private static final boolean TAG_WITH_CLASS_NAME = false; 30 31 /** Action creation and user selection: Share, Save, Edit, Delete, Smart action, etc */ 32 static final boolean DEBUG_ACTIONS = DEBUG_ALL || false; 33 34 /** Debug info about animations such as start, complete and cancel */ 35 static final boolean DEBUG_ANIM = DEBUG_ALL || false; 36 37 /** Whenever Uri is supplied to consumer, or onComplete runnable is run() */ 38 static final boolean DEBUG_CALLBACK = DEBUG_ALL || false; 39 40 /** Logs information about dismissing the screenshot tool */ 41 static final boolean DEBUG_DISMISS = DEBUG_ALL || false; 42 43 /** Touch or key event driven action or side effects */ 44 static final boolean DEBUG_INPUT = DEBUG_ALL || false; 45 46 /** Scroll capture usage */ 47 static final boolean DEBUG_SCROLL = DEBUG_ALL || false; 48 49 /** Service lifecycle events and callbacks */ 50 static final boolean DEBUG_SERVICE = DEBUG_ALL || false; 51 52 /** Storage related actions, Bitmap.compress, ContentManager, etc */ 53 static final boolean DEBUG_STORAGE = DEBUG_ALL || false; 54 55 /** High level logical UI actions: timeout, onConfigChanged, insets, show actions, reset */ 56 static final boolean DEBUG_UI = DEBUG_ALL || false; 57 58 /** Interactions with Window and WindowManager */ 59 static final boolean DEBUG_WINDOW = DEBUG_ALL || false; 60 logTag(Class<?> cls)61 static String logTag(Class<?> cls) { 62 return TAG_WITH_CLASS_NAME ? cls.getSimpleName() : TAG_SS; 63 } 64 } 65