blob: 03f253b4807e0df1423a82656fb012d1ff0ef73e [file] [log] [blame]
Wale Ogunwaled57969f2014-11-15 19:37:29 -08001/*
2 * Copyright (C) 2014 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
17package com.android.server.am;
18
19/**
20 * Common class for the various debug {@link android.util.Log} output configuration in the activity
21 * manager package.
22 */
23class ActivityManagerDebugConfig {
24
25 // All output logs in the activity manager package use the {@link #TAG_AM} string for tagging
26 // their log output. This makes it easy to identify the origin of the log message when sifting
27 // through a large amount of log output from multiple sources. However, it also makes trying
28 // to figure-out the origin of a log message while debugging the activity manager a little
29 // painful. By setting this constant to true, log messages from the activity manager package
30 // will be tagged with their class names instead fot the generic tag.
31 static final boolean TAG_WITH_CLASS_NAME = false;
32
33 // While debugging it is sometimes useful to have the category name of the log prepended to the
34 // base log tag to make sifting through logs with the same base tag easier. By setting this
35 // constant to true, the category name of the log point will be prepended to the log tag.
36 static final boolean PREPEND_CATEGORY_NAME = false;
37
38 // Default log tag for the activity manager package.
39 static final String TAG_AM = "ActivityManager";
40
41 // Enable all debug log categories.
42 static final boolean DEBUG_ALL = false;
43
44 // Available log categories in the activity manager package.
45 static final boolean DEBUG_BACKUP = DEBUG_ALL || false;
46 static final boolean DEBUG_BROADCAST = DEBUG_ALL || false;
47 static final boolean DEBUG_BROADCAST_BACKGROUND = DEBUG_BROADCAST || false;
48 static final boolean DEBUG_BROADCAST_LIGHT = DEBUG_BROADCAST || false;
49 static final boolean DEBUG_CLEANUP = DEBUG_ALL || false;
50 static final boolean DEBUG_CONFIGURATION = DEBUG_ALL || false;
51 static final boolean DEBUG_FOCUS = false;
52 static final boolean DEBUG_IMMERSIVE = DEBUG_ALL || false;
53 static final boolean DEBUG_LOCKSCREEN = DEBUG_ALL || false;
54 static final boolean DEBUG_LRU = DEBUG_ALL || false;
55 static final boolean DEBUG_MU = DEBUG_ALL || false;
56 static final boolean DEBUG_OOM_ADJ = DEBUG_ALL || false;
57 static final boolean DEBUG_PAUSE = DEBUG_ALL || false;
58 static final boolean DEBUG_POWER = DEBUG_ALL || false;
59 static final boolean DEBUG_POWER_QUICK = DEBUG_POWER || false;
60 static final boolean DEBUG_PROCESS_OBSERVERS = DEBUG_ALL || false;
61 static final boolean DEBUG_PROCESSES = DEBUG_ALL || false;
62 static final boolean DEBUG_PROVIDER = DEBUG_ALL || false;
63 static final boolean DEBUG_PSS = DEBUG_ALL || false;
64 static final boolean DEBUG_RECENTS = DEBUG_ALL || false;
65 static final boolean DEBUG_RESULTS = DEBUG_ALL || false;
66 static final boolean DEBUG_SERVICE = DEBUG_ALL || false;
67 static final boolean DEBUG_SERVICE_EXECUTING = DEBUG_ALL || false;
68 static final boolean DEBUG_STACK = DEBUG_ALL || false;
69 static final boolean DEBUG_SWITCH = DEBUG_ALL || false;
70 static final boolean DEBUG_TASKS = DEBUG_ALL || false;
71 static final boolean DEBUG_THUMBNAILS = DEBUG_ALL || false;
72 static final boolean DEBUG_TRANSITION = DEBUG_ALL || false;
73 static final boolean DEBUG_URI_PERMISSION = DEBUG_ALL || false;
74 static final boolean DEBUG_USER_LEAVING = DEBUG_ALL || false;
75 static final boolean DEBUG_VISBILITY = DEBUG_ALL || false;
76
77 static final String POSTFIX_BACKUP = (PREPEND_CATEGORY_NAME) ? "_Backup" : "";
78 static final String POSTFIX_BROADCAST = (PREPEND_CATEGORY_NAME) ? "_Broadcast" : "";
79 static final String POSTFIX_MU = "_MU";
80 static final String POSTFIX_SERVICE = (PREPEND_CATEGORY_NAME) ? "_Service" : "";
81 static final String POSTFIX_SERVICE_EXECUTING =
82 (PREPEND_CATEGORY_NAME) ? "_ServiceExecuting" : "";
83
84}