Convert EventLogTags.AM* events log points to EventLogTags.WM
Since all activity management is now under the WM package we should also
convert the event log points for activities from EventLogTags.AM* to
EventLogTags.WM*.
Bug: 143461660
Test: Build and run, check event logs.
Change-Id: I62034ee353f65ef95b069e1f36db214ccb3c6d85
diff --git a/services/core/java/com/android/server/wm/ActivityDisplay.java b/services/core/java/com/android/server/wm/ActivityDisplay.java
index be7dfe5..45e3c68 100644
--- a/services/core/java/com/android/server/wm/ActivityDisplay.java
+++ b/services/core/java/com/android/server/wm/ActivityDisplay.java
@@ -74,7 +74,6 @@
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.function.pooled.PooledLambda;
-import com.android.server.am.EventLogTags;
import com.android.server.protolog.common.ProtoLog;
import java.io.PrintWriter;
@@ -299,7 +298,7 @@
final ActivityStack currentFocusedStack = getFocusedStack();
if (currentFocusedStack != prevFocusedStack) {
mLastFocusedStack = prevFocusedStack;
- EventLogTags.writeAmFocusedStack(mRootActivityContainer.mCurrentUser, mDisplayId,
+ EventLogTags.writeWmFocusedStack(mRootActivityContainer.mCurrentUser, mDisplayId,
currentFocusedStack == null ? -1 : currentFocusedStack.getStackId(),
mLastFocusedStack == null ? -1 : mLastFocusedStack.getStackId(),
updateLastFocusedStackReason);
diff --git a/services/core/java/com/android/server/wm/ActivityMetricsLogger.java b/services/core/java/com/android/server/wm/ActivityMetricsLogger.java
index 0a861ad..9fa5d9f1 100644
--- a/services/core/java/com/android/server/wm/ActivityMetricsLogger.java
+++ b/services/core/java/com/android/server/wm/ActivityMetricsLogger.java
@@ -56,13 +56,13 @@
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.TYPE_TRANSITION_REPORTED_DRAWN_NO_BUNDLE;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.TYPE_TRANSITION_REPORTED_DRAWN_WITH_BUNDLE;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.TYPE_TRANSITION_WARM_LAUNCH;
-import static com.android.server.am.EventLogTags.AM_ACTIVITY_LAUNCH_TIME;
import static com.android.server.am.MemoryStatUtil.MemoryStat;
import static com.android.server.am.MemoryStatUtil.readMemoryStatFromFilesystem;
import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_METRICS;
import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_ATM;
import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_WITH_CLASS_NAME;
import static com.android.server.wm.ActivityTaskManagerInternal.APP_TRANSITION_TIMEOUT;
+import static com.android.server.wm.EventLogTags.WM_ACTIVITY_LAUNCH_TIME;
import android.app.WaitResult;
import android.app.WindowConfiguration.WindowingMode;
@@ -805,7 +805,7 @@
return;
}
- EventLog.writeEvent(AM_ACTIVITY_LAUNCH_TIME,
+ EventLog.writeEvent(WM_ACTIVITY_LAUNCH_TIME,
info.userId, info.activityRecordIdHashCode, info.launchedActivityShortComponentName,
info.windowsDrawnDelayMs);
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java
index f627dda..23b59c1 100644
--- a/services/core/java/com/android/server/wm/ActivityRecord.java
+++ b/services/core/java/com/android/server/wm/ActivityRecord.java
@@ -122,8 +122,6 @@
import static com.android.server.am.ActivityRecordProto.TRANSLUCENT;
import static com.android.server.am.ActivityRecordProto.VISIBLE;
import static com.android.server.am.ActivityRecordProto.VISIBLE_REQUESTED;
-import static com.android.server.am.EventLogTags.AM_RELAUNCH_ACTIVITY;
-import static com.android.server.am.EventLogTags.AM_RELAUNCH_RESUME_ACTIVITY;
import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_ANIM;
import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER;
import static com.android.server.wm.ActivityStack.ActivityState.DESTROYED;
@@ -306,7 +304,6 @@
import com.android.server.AttributeCache;
import com.android.server.LocalServices;
import com.android.server.am.AppTimeTracker;
-import com.android.server.am.EventLogTags;
import com.android.server.am.PendingIntentRecord;
import com.android.server.display.color.ColorDisplayService;
import com.android.server.policy.WindowManagerPolicy;
@@ -2379,8 +2376,7 @@
// Make a local reference to its task since this.task could be set to null once this
// activity is destroyed and detached from task.
final Task task = getTask();
- EventLog.writeEvent(EventLogTags.AM_FINISH_ACTIVITY,
- mUserId, System.identityHashCode(this),
+ EventLogTags.writeWmFinishActivity(mUserId, System.identityHashCode(this),
task.mTaskId, shortComponentName, reason);
final ArrayList<ActivityRecord> activities = task.mChildren;
final int index = activities.indexOf(this);
@@ -2655,8 +2651,8 @@
return false;
}
- EventLog.writeEvent(EventLogTags.AM_DESTROY_ACTIVITY, mUserId,
- System.identityHashCode(this), task.mTaskId, shortComponentName, reason);
+ EventLogTags.writeWmDestroyActivity(mUserId, System.identityHashCode(this),
+ task.mTaskId, shortComponentName, reason);
final ActivityStack stack = getActivityStack();
if (hasProcess() && !stack.inLruList(this)) {
@@ -4739,7 +4735,7 @@
if (!mVisibleRequested) {
setVisibility(false);
}
- EventLogTags.writeAmStopActivity(
+ EventLogTags.writeWmStopActivity(
mUserId, System.identityHashCode(this), shortComponentName);
mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), appToken,
StopActivityItem.obtain(mVisibleRequested, configChangeFlags));
@@ -4808,8 +4804,8 @@
void addToStopping(boolean scheduleIdle, boolean idleDelayed, String reason) {
if (!mStackSupervisor.mStoppingActivities.contains(this)) {
- EventLog.writeEvent(EventLogTags.AM_ADD_TO_STOPPING, mUserId,
- System.identityHashCode(this), shortComponentName, reason);
+ EventLogTags.writeWmAddToStopping(mUserId, System.identityHashCode(this),
+ shortComponentName, reason);
mStackSupervisor.mStoppingActivities.add(this);
}
@@ -6939,9 +6935,13 @@
"Relaunching: " + this + " with results=" + pendingResults
+ " newIntents=" + pendingNewIntents + " andResume=" + andResume
+ " preserveWindow=" + preserveWindow);
- EventLog.writeEvent(andResume ? AM_RELAUNCH_RESUME_ACTIVITY
- : AM_RELAUNCH_ACTIVITY, mUserId, System.identityHashCode(this),
- task.mTaskId, shortComponentName);
+ if (andResume) {
+ EventLogTags.writeWmRelaunchResumeActivity(mUserId, System.identityHashCode(this),
+ task.mTaskId, shortComponentName);
+ } else {
+ EventLogTags.writeWmRelaunchActivity(mUserId, System.identityHashCode(this),
+ task.mTaskId, shortComponentName);
+ }
startFreezingScreenLocked(0);
diff --git a/services/core/java/com/android/server/wm/ActivityStack.java b/services/core/java/com/android/server/wm/ActivityStack.java
index f1c47eb..6ddbb0d 100644
--- a/services/core/java/com/android/server/wm/ActivityStack.java
+++ b/services/core/java/com/android/server/wm/ActivityStack.java
@@ -84,7 +84,6 @@
import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_TASKS;
import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_TRANSITION;
import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_USER_LEAVING;
-import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_VISIBILITY;
import static com.android.server.wm.ActivityTaskManagerDebugConfig.POSTFIX_ADD_REMOVE;
import static com.android.server.wm.ActivityTaskManagerDebugConfig.POSTFIX_APP;
import static com.android.server.wm.ActivityTaskManagerDebugConfig.POSTFIX_CLEANUP;
@@ -163,7 +162,6 @@
import android.service.voice.IVoiceInteractionSession;
import android.util.ArraySet;
import android.util.DisplayMetrics;
-import android.util.EventLog;
import android.util.IntArray;
import android.util.Log;
import android.util.Slog;
@@ -185,7 +183,6 @@
import com.android.server.am.ActivityManagerService;
import com.android.server.am.ActivityManagerService.ItemMatcher;
import com.android.server.am.AppTimeTracker;
-import com.android.server.am.EventLogTags;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -533,7 +530,7 @@
mDockedStackMinimizeThickness =
supervisor.mService.mWindowManager.mContext.getResources().getDimensionPixelSize(
com.android.internal.R.dimen.docked_stack_minimize_thickness);
- EventLog.writeEvent(com.android.server.EventLogTags.WM_STACK_CREATED, stackId);
+ EventLogTags.writeWmStackCreated(stackId);
mStackSupervisor = supervisor;
mService = supervisor.mService;
mRootActivityContainer = mService.mRootActivityContainer;
@@ -1586,7 +1583,7 @@
if (prev.attachedToProcess()) {
if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Enqueueing pending pause: " + prev);
try {
- EventLogTags.writeAmPauseActivity(prev.mUserId, System.identityHashCode(prev),
+ EventLogTags.writeWmPauseActivity(prev.mUserId, System.identityHashCode(prev),
prev.shortComponentName, "userLeaving=" + userLeaving);
mService.getLifecycleManager().scheduleTransaction(prev.app.getThread(),
@@ -1663,10 +1660,9 @@
}
return;
} else {
- EventLog.writeEvent(EventLogTags.AM_FAILED_TO_PAUSE,
- r.mUserId, System.identityHashCode(r), r.shortComponentName,
- mPausingActivity != null
- ? mPausingActivity.shortComponentName : "(none)");
+ EventLogTags.writeWmFailedToPause(r.mUserId, System.identityHashCode(r),
+ r.shortComponentName, mPausingActivity != null
+ ? mPausingActivity.shortComponentName : "(none)");
if (r.isState(PAUSING)) {
r.setState(PAUSED, "activityPausedLocked");
if (r.finishing) {
@@ -2659,9 +2655,8 @@
// Clear app token stopped state in window manager if needed.
next.notifyAppResumed(next.stopped);
- EventLog.writeEvent(EventLogTags.AM_RESUME_ACTIVITY, next.mUserId,
- System.identityHashCode(next), next.getTask().mTaskId,
- next.shortComponentName);
+ EventLogTags.writeWmResumeActivity(next.mUserId, System.identityHashCode(next),
+ next.getTask().mTaskId, next.shortComponentName);
next.sleeping = false;
mService.getAppWarningsLocked().onResumeActivity(next);
@@ -3519,10 +3514,9 @@
+ " state=" + r.getState() + " callers=" + Debug.getCallers(5));
if (!r.finishing || isProcessRemoved) {
Slog.w(TAG, "Force removing " + r + ": app died, no saved state");
- EventLog.writeEvent(EventLogTags.AM_FINISH_ACTIVITY,
- r.mUserId, System.identityHashCode(r),
- r.getTask().mTaskId, r.shortComponentName,
- "proc died without state saved");
+ EventLogTags.writeWmFinishActivity(r.mUserId,
+ System.identityHashCode(r), r.getTask().mTaskId,
+ r.shortComponentName, "proc died without state saved");
}
} else {
// We have the current state for this activity, so
@@ -3634,7 +3628,7 @@
}
mRootActivityContainer.resumeFocusedStacksTopActivities();
- EventLog.writeEvent(EventLogTags.AM_TASK_TO_FRONT, tr.mUserId, tr.mTaskId);
+ EventLogTags.writeWmTaskToFront(tr.mUserId, tr.mTaskId);
mService.getTaskChangeNotificationController().notifyTaskMovedToFront(tr.getTaskInfo());
} finally {
getDisplay().continueUpdateImeTarget();
@@ -4141,7 +4135,7 @@
super.removeChild(child);
- EventLog.writeEvent(EventLogTags.AM_REMOVE_TASK, child.mTaskId, mStackId);
+ EventLogTags.writeWmRemoveTask(child.mTaskId, mStackId);
if (display.isSingleTaskInstance()) {
mService.notifySingleTaskDisplayEmpty(display.mDisplayId);
@@ -4820,9 +4814,7 @@
}
final int toTop = targetPosition == mChildren.size() - 1 ? 1 : 0;
- EventLog.writeEvent(com.android.server.EventLogTags.WM_TASK_MOVED, child.mTaskId, toTop,
- targetPosition);
-
+ EventLogTags.writeWmTaskMoved(child.mTaskId, toTop, targetPosition);
return targetPosition;
}
@@ -4872,8 +4864,7 @@
}
super.onParentChanged(newParent, oldParent);
if (getParent() == null && mDisplayContent != null) {
- EventLog.writeEvent(com.android.server.EventLogTags.WM_STACK_REMOVED, mStackId);
-
+ EventLogTags.writeWmStackRemoved(mStackId);
mDisplayContent = null;
mWmService.mWindowPlacerLocked.requestTraversal();
}
diff --git a/services/core/java/com/android/server/wm/ActivityStackSupervisor.java b/services/core/java/com/android/server/wm/ActivityStackSupervisor.java
index 304f230..d088a5e 100644
--- a/services/core/java/com/android/server/wm/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/wm/ActivityStackSupervisor.java
@@ -126,7 +126,6 @@
import android.provider.MediaStore;
import android.util.ArrayMap;
import android.util.ArraySet;
-import android.util.EventLog;
import android.util.MergedConfiguration;
import android.util.Slog;
import android.util.SparseArray;
@@ -141,7 +140,6 @@
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.function.pooled.PooledLambda;
import com.android.server.am.ActivityManagerService;
-import com.android.server.am.EventLogTags;
import com.android.server.am.UserState;
import java.io.FileDescriptor;
@@ -823,8 +821,8 @@
"Launching: " + r + " savedState=" + r.getSavedState()
+ " with results=" + results + " newIntents=" + newIntents
+ " andResume=" + andResume);
- EventLog.writeEvent(EventLogTags.AM_RESTART_ACTIVITY, r.mUserId,
- System.identityHashCode(r), task.mTaskId, r.shortComponentName);
+ EventLogTags.writeWmRestartActivity(r.mUserId, System.identityHashCode(r),
+ task.mTaskId, r.shortComponentName);
if (r.isActivityTypeHome()) {
// Home process is the root process of the task.
updateHomeProcess(task.getChildAt(0).app);
diff --git a/services/core/java/com/android/server/wm/ActivityStarter.java b/services/core/java/com/android/server/wm/ActivityStarter.java
index 8455c6d..0f912f1 100644
--- a/services/core/java/com/android/server/wm/ActivityStarter.java
+++ b/services/core/java/com/android/server/wm/ActivityStarter.java
@@ -60,7 +60,6 @@
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.Display.INVALID_DISPLAY;
-import static com.android.server.am.EventLogTags.AM_NEW_INTENT;
import static com.android.server.wm.ActivityStack.ActivityState.RESUMED;
import static com.android.server.wm.ActivityStackSupervisor.DEFER_RESUME;
import static com.android.server.wm.ActivityStackSupervisor.ON_TOP;
@@ -114,14 +113,12 @@
import android.service.voice.IVoiceInteractionSession;
import android.text.TextUtils;
import android.util.ArraySet;
-import android.util.EventLog;
import android.util.Pools.SynchronizedPool;
import android.util.Slog;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.app.HeavyWeightSwitcherActivity;
import com.android.internal.app.IVoiceInteractor;
-import com.android.server.am.EventLogTags;
import com.android.server.am.PendingIntentRecord;
import com.android.server.pm.InstantAppResolver;
import com.android.server.wm.ActivityStackSupervisor.PendingActivityLaunch;
@@ -1550,11 +1547,12 @@
UserHandle.getAppId(mStartActivity.info.applicationInfo.uid)
);
if (newTask) {
- EventLog.writeEvent(EventLogTags.AM_CREATE_TASK, mStartActivity.mUserId,
+ EventLogTags.writeWmCreateTask(mStartActivity.mUserId,
mStartActivity.getTask().mTaskId);
}
mStartActivity.logStartActivity(
- EventLogTags.AM_CREATE_ACTIVITY, mStartActivity.getTask());
+ EventLogTags.WM_CREATE_ACTIVITY, mStartActivity.getTask());
+
mTargetStack.mLastPausedActivity = null;
mRootActivityContainer.sendPowerHintForLaunchStartIfNeeded(
@@ -2405,7 +2403,7 @@
return;
}
- activity.logStartActivity(AM_NEW_INTENT, activity.getTask());
+ activity.logStartActivity(EventLogTags.WM_NEW_INTENT, activity.getTask());
activity.deliverNewIntentLocked(mCallingUid, mStartActivity.intent,
mStartActivity.launchedFromPackage);
mIntentDelivered = true;
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
index bef4f5a..bcd5d36 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
@@ -83,6 +83,8 @@
import static com.android.server.am.ActivityManagerServiceDumpProcessesProto.SCREEN_COMPAT_PACKAGES;
import static com.android.server.am.ActivityManagerServiceDumpProcessesProto.ScreenCompatPackage.MODE;
import static com.android.server.am.ActivityManagerServiceDumpProcessesProto.ScreenCompatPackage.PACKAGE;
+import static com.android.server.am.EventLogTags.writeBootProgressEnableScreen;
+import static com.android.server.am.EventLogTags.writeConfigurationChanged;
import static com.android.server.wm.ActivityStack.ActivityState.DESTROYED;
import static com.android.server.wm.ActivityStack.ActivityState.DESTROYING;
import static com.android.server.wm.ActivityStackSupervisor.DEFER_RESUME;
@@ -215,7 +217,6 @@
import android.text.format.TimeMigrationUtils;
import android.util.ArrayMap;
import android.util.ArraySet;
-import android.util.EventLog;
import android.util.Log;
import android.util.Slog;
import android.util.SparseArray;
@@ -258,7 +259,6 @@
import com.android.server.am.ActivityManagerServiceDumpProcessesProto;
import com.android.server.am.AppTimeTracker;
import com.android.server.am.BaseErrorDialog;
-import com.android.server.am.EventLogTags;
import com.android.server.am.PendingIntentController;
import com.android.server.am.PendingIntentRecord;
import com.android.server.am.UserState;
@@ -5195,8 +5195,7 @@
if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.i(TAG_CONFIGURATION,
"Updating global configuration to: " + values);
-
- EventLog.writeEvent(EventLogTags.CONFIGURATION_CHANGED, changes);
+ writeConfigurationChanged(changes);
StatsLog.write(StatsLog.RESOURCE_CONFIGURATION_CHANGED,
values.colorMode,
values.densityDpi,
@@ -5359,8 +5358,7 @@
}
void enableScreenAfterBoot(boolean booted) {
- EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_ENABLE_SCREEN,
- SystemClock.uptimeMillis());
+ writeBootProgressEnableScreen(SystemClock.uptimeMillis());
mWindowManager.enableScreenAfterBoot();
synchronized (mGlobalLock) {
@@ -5491,7 +5489,7 @@
applyUpdateLockStateLocked(r);
applyUpdateVrModeLocked(r);
- EventLogTags.writeAmSetResumedActivity(
+ EventLogTags.writeWmSetResumedActivity(
r == null ? -1 : r.mUserId,
r == null ? "NULL" : r.shortComponentName,
reason);
@@ -6419,8 +6417,7 @@
@Override
public void enableScreenAfterBoot(boolean booted) {
synchronized (mGlobalLock) {
- EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_ENABLE_SCREEN,
- SystemClock.uptimeMillis());
+ writeBootProgressEnableScreen(SystemClock.uptimeMillis());
mWindowManager.enableScreenAfterBoot();
updateEventDispatchingLocked(booted);
}
diff --git a/services/core/java/com/android/server/wm/EventLogTags.logtags b/services/core/java/com/android/server/wm/EventLogTags.logtags
new file mode 100644
index 0000000..aab901e
--- /dev/null
+++ b/services/core/java/com/android/server/wm/EventLogTags.logtags
@@ -0,0 +1,77 @@
+# See system/core/logcat/event.logtags for a description of the format of this file.
+
+option java_package com.android.server.wm
+
+# Do not change these names without updating the checkin_events setting in
+# google3/googledata/wireless/android/provisioning/gservices.config !!
+#
+# An activity is being finished:
+30001 wm_finish_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3),(Reason|3)
+# A task is being brought to the front of the screen:
+30002 wm_task_to_front (User|1|5),(Task|1|5)
+# An existing activity is being given a new intent:
+30003 wm_new_intent (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3),(Action|3),(MIME Type|3),(URI|3),(Flags|1|5)
+# A new task is being created:
+30004 wm_create_task (User|1|5),(Task ID|1|5)
+# A new activity is being created in an existing task:
+30005 wm_create_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3),(Action|3),(MIME Type|3),(URI|3),(Flags|1|5)
+# An activity has been resumed into the foreground but was not already running:
+30006 wm_restart_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3)
+# An activity has been resumed and is now in the foreground:
+30007 wm_resume_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3)
+
+# Activity launch time
+30009 wm_activity_launch_time (User|1|5),(Token|1|5),(Component Name|3),(time|2|3)
+
+# The Activity Manager failed to pause the given activity.
+30012 wm_failed_to_pause (User|1|5),(Token|1|5),(Wanting to pause|3),(Currently pausing|3)
+# Attempting to pause the current activity
+30013 wm_pause_activity (User|1|5),(Token|1|5),(Component Name|3),(User Leaving|3)
+# Application process has been started
+
+# An activity is being destroyed:
+30018 wm_destroy_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3),(Reason|3)
+# An activity has been relaunched, resumed, and is now in the foreground:
+30019 wm_relaunch_resume_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3)
+# An activity has been relaunched:
+30020 wm_relaunch_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3)
+# The activity's onPause has been called.
+30021 wm_on_paused_called (Token|1|5),(Component Name|3),(Reason|3)
+# The activity's onResume has been called.
+30022 wm_on_resume_called (Token|1|5),(Component Name|3),(Reason|3)
+
+# Activity set to resumed
+30043 wm_set_resumed_activity (User|1|5),(Component Name|3),(Reason|3)
+
+# Stack focus
+30044 wm_focused_stack (User|1|5),(Display Id|1|5),(Focused Stack Id|1|5),(Last Focused Stack Id|1|5),(Reason|3)
+
+# Attempting to stop an activity
+30048 wm_stop_activity (User|1|5),(Token|1|5),(Component Name|3)
+
+# The task is being removed from its parent stack
+30061 wm_remove_task (Task ID|1|5), (Stack ID|1|5)
+
+# An activity been add into stopping list
+30066 wm_add_to_stopping (User|1|5),(Token|1|5),(Component Name|3),(Reason|3)
+
+# Keyguard status changed
+30067 wm_set_keyguard_shown (keyguardShowing|1),(aodShowing|1),(keyguardGoingAway|1),(Reason|3)
+
+# Out of memory for surfaces.
+31000 wm_no_surface_memory (Window|3),(PID|1|5),(Operation|3)
+# Task created.
+31001 wm_task_created (TaskId|1|5),(StackId|1|5)
+# Task moved to top (1) or bottom (0).
+31002 wm_task_moved (TaskId|1|5),(ToTop|1),(Index|1)
+# Task removed with source explanation.
+31003 wm_task_removed (TaskId|1|5),(Reason|3)
+# Stack created.
+31004 wm_stack_created (StackId|1|5)
+# Home stack moved to top (1) or bottom (0).
+31005 wm_home_stack_moved (ToTop|1)
+# Stack removed.
+31006 wm_stack_removed (StackId|1|5)
+# bootanim finished:
+31007 wm_boot_animation_done (time|2|3)
+
diff --git a/services/core/java/com/android/server/wm/KeyguardController.java b/services/core/java/com/android/server/wm/KeyguardController.java
index 52cc422..3b58eca 100644
--- a/services/core/java/com/android/server/wm/KeyguardController.java
+++ b/services/core/java/com/android/server/wm/KeyguardController.java
@@ -43,13 +43,11 @@
import android.os.IBinder;
import android.os.RemoteException;
import android.os.Trace;
-import android.util.EventLog;
import android.util.Slog;
import android.util.SparseArray;
import android.util.proto.ProtoOutputStream;
import com.android.internal.policy.IKeyguardDismissCallback;
-import com.android.server.am.EventLogTags;
import com.android.server.policy.WindowManagerPolicy;
import com.android.server.wm.ActivityTaskManagerInternal.SleepToken;
@@ -143,7 +141,7 @@
if (!keyguardChanged && !aodChanged) {
return;
}
- EventLog.writeEvent(EventLogTags.AM_SET_KEYGUARD_SHOWN,
+ EventLogTags.writeWmSetKeyguardShown(
keyguardShowing ? 1 : 0,
aodShowing ? 1 : 0,
mKeyguardGoingAway ? 1 : 0,
@@ -184,7 +182,7 @@
mService.deferWindowLayout();
try {
setKeyguardGoingAway(true);
- EventLog.writeEvent(EventLogTags.AM_SET_KEYGUARD_SHOWN,
+ EventLogTags.writeWmSetKeyguardShown(
1 /* keyguardShowing */,
mAodShowing ? 1 : 0,
1 /* keyguardGoingAway */,
diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java
index 565f95e..5ec9599 100644
--- a/services/core/java/com/android/server/wm/RootWindowContainer.java
+++ b/services/core/java/com/android/server/wm/RootWindowContainer.java
@@ -68,7 +68,6 @@
import android.os.Trace;
import android.os.UserHandle;
import android.util.ArraySet;
-import android.util.EventLog;
import android.util.Slog;
import android.util.SparseIntArray;
import android.util.proto.ProtoOutputStream;
@@ -77,7 +76,6 @@
import android.view.SurfaceControl;
import android.view.WindowManager;
-import com.android.server.EventLogTags;
import com.android.server.protolog.common.ProtoLog;
import java.io.PrintWriter;
@@ -488,10 +486,8 @@
final WindowSurfaceController surfaceController = winAnimator.mSurfaceController;
boolean leakedSurface = false;
boolean killedApps = false;
-
- EventLog.writeEvent(EventLogTags.WM_NO_SURFACE_MEMORY, winAnimator.mWin.toString(),
+ EventLogTags.writeWmNoSurfaceMemory(winAnimator.mWin.toString(),
winAnimator.mSession.mPid, operation);
-
final long callingIdentity = Binder.clearCallingIdentity();
try {
// There was some problem...first, do a sanity check of the window list to make sure
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index 3b16b59..7a8614b 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -56,8 +56,6 @@
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.SurfaceControl.METADATA_TASK_ID;
-import static com.android.server.EventLogTags.WM_TASK_CREATED;
-import static com.android.server.EventLogTags.WM_TASK_REMOVED;
import static com.android.server.am.TaskRecordProto.ACTIVITIES;
import static com.android.server.am.TaskRecordProto.ACTIVITY_TYPE;
import static com.android.server.am.TaskRecordProto.FULLSCREEN;
@@ -128,7 +126,6 @@
import android.provider.Settings;
import android.service.voice.IVoiceInteractionSession;
import android.util.DisplayMetrics;
-import android.util.EventLog;
import android.util.Slog;
import android.util.proto.ProtoOutputStream;
import android.view.Display;
@@ -421,8 +418,7 @@
ActivityStack stack) {
super(atmService.mWindowManager);
- EventLog.writeEvent(WM_TASK_CREATED, _taskId,
- stack != null ? stack.mStackId : INVALID_STACK_ID);
+ EventLogTags.writeWmTaskCreated(_taskId, stack != null ? stack.mStackId : INVALID_STACK_ID);
mAtmService = atmService;
mTaskId = _taskId;
mUserId = _userId;
@@ -1301,7 +1297,7 @@
} else if (!mReuseTask) {
// Remove entire task if it doesn't have any activity left and it isn't marked for reuse
mStack.removeChild(this, reason);
- EventLog.writeEvent(WM_TASK_REMOVED, mTaskId,
+ EventLogTags.writeWmTaskRemoved(mTaskId,
"removeChild: last r=" + r + " in t=" + this);
removeIfPossible();
}
@@ -2306,7 +2302,7 @@
@Override
void removeImmediately() {
if (DEBUG_STACK) Slog.i(TAG, "removeTask: removing taskId=" + mTaskId);
- EventLog.writeEvent(WM_TASK_REMOVED, mTaskId, "removeTask");
+ EventLogTags.writeWmTaskRemoved(mTaskId, "removeTask");
super.removeImmediately();
}
@@ -2314,7 +2310,7 @@
void reparent(ActivityStack stack, int position, boolean moveParents, String reason) {
if (DEBUG_STACK) Slog.i(TAG, "reParentTask: removing taskId=" + mTaskId
+ " from stack=" + getTaskStack());
- EventLog.writeEvent(WM_TASK_REMOVED, mTaskId, "reParentTask");
+ EventLogTags.writeWmTaskRemoved(mTaskId, "reParentTask");
final ActivityStack prevStack = getTaskStack();
final boolean wasTopFocusedStack =
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index a2467e6..c937bfa 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -193,7 +193,6 @@
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.DisplayMetrics;
-import android.util.EventLog;
import android.util.Log;
import android.util.MergedConfiguration;
import android.util.Slog;
@@ -265,7 +264,6 @@
import com.android.internal.view.WindowManagerPolicyThread;
import com.android.server.AnimationThread;
import com.android.server.DisplayThread;
-import com.android.server.EventLogTags;
import com.android.server.FgThread;
import com.android.server.LocalServices;
import com.android.server.UiThread;
@@ -3327,7 +3325,7 @@
ProtoLog.e(WM_ERROR, "Boot completed: SurfaceFlinger is dead!");
}
- EventLog.writeEvent(EventLogTags.WM_BOOT_ANIMATION_DONE, SystemClock.uptimeMillis());
+ EventLogTags.writeWmBootAnimationDone(SystemClock.uptimeMillis());
Trace.asyncTraceEnd(TRACE_TAG_WINDOW_MANAGER, "Stop bootanim", 0);
mDisplayEnabled = true;
ProtoLog.i(WM_DEBUG_SCREEN_ON, "******************** ENABLING SCREEN!");