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