Merge "Add event log for keyguard occlude status chagne." into tm-qpr-dev

This commit is contained in:
Issei Suzuki
2023-03-10 11:01:31 +00:00
committed by Android (Google) Code Review
4 changed files with 35 additions and 2 deletions

View File

@@ -29,6 +29,7 @@ import com.android.internal.policy.IKeyguardExitCallback;
import com.android.internal.policy.IKeyguardService; import com.android.internal.policy.IKeyguardService;
import com.android.server.UiThread; import com.android.server.UiThread;
import com.android.server.policy.WindowManagerPolicy.OnKeyguardExitResult; import com.android.server.policy.WindowManagerPolicy.OnKeyguardExitResult;
import com.android.server.wm.EventLogTags;
import java.io.PrintWriter; import java.io.PrintWriter;
@@ -257,6 +258,11 @@ public class KeyguardServiceDelegate {
public void setOccluded(boolean isOccluded, boolean animate, boolean notify) { public void setOccluded(boolean isOccluded, boolean animate, boolean notify) {
if (mKeyguardService != null && notify) { if (mKeyguardService != null && notify) {
if (DEBUG) Log.v(TAG, "setOccluded(" + isOccluded + ") animate=" + animate); if (DEBUG) Log.v(TAG, "setOccluded(" + isOccluded + ") animate=" + animate);
EventLogTags.writeWmSetKeyguardOccluded(
isOccluded ? 1 : 0,
animate ? 1 : 0,
0 /* transit */,
"setOccluded");
mKeyguardService.setOccluded(isOccluded, animate); mKeyguardService.setOccluded(isOccluded, animate);
} }
mKeyguardState.occluded = isOccluded; mKeyguardState.occluded = isOccluded;

View File

@@ -52,7 +52,7 @@ option java_package com.android.server.wm
30066 wm_add_to_stopping (User|1|5),(Token|1|5),(Component Name|3),(Reason|3) 30066 wm_add_to_stopping (User|1|5),(Token|1|5),(Component Name|3),(Reason|3)
# Keyguard status changed # Keyguard status changed
30067 wm_set_keyguard_shown (Display Id|1|5),(keyguardShowing|1),(aodShowing|1),(keyguardGoingAway|1),(Reason|3) 30067 wm_set_keyguard_shown (Display Id|1|5),(keyguardShowing|1),(aodShowing|1),(keyguardGoingAway|1),(occluded|1),(Reason|3)
# Out of memory for surfaces. # Out of memory for surfaces.
31000 wm_no_surface_memory (Window|3),(PID|1|5),(Operation|3) 31000 wm_no_surface_memory (Window|3),(PID|1|5),(Operation|3)
@@ -68,6 +68,8 @@ option java_package com.android.server.wm
# bootanim finished: # bootanim finished:
31007 wm_boot_animation_done (time|2|3) 31007 wm_boot_animation_done (time|2|3)
# Notify keyguard occlude statuc change to SysUI.
31008 wm_set_keyguard_occluded (occluded|1),(animate|1),(transit|1),(Channel|3)
# Request surface flinger to show / hide the wallpaper surface. # Request surface flinger to show / hide the wallpaper surface.
33001 wm_wallpaper_surface (Display Id|1|5),(Visible|1),(Target|3) 33001 wm_wallpaper_surface (Display Id|1|5),(Visible|1),(Target|3)

View File

@@ -188,6 +188,7 @@ class KeyguardController {
keyguardShowing ? 1 : 0, keyguardShowing ? 1 : 0,
aodShowing ? 1 : 0, aodShowing ? 1 : 0,
state.mKeyguardGoingAway ? 1 : 0, state.mKeyguardGoingAway ? 1 : 0,
state.mOccluded ? 1 : 0,
"setKeyguardShown"); "setKeyguardShown");
// Update the task snapshot if the screen will not be turned off. To make sure that the // Update the task snapshot if the screen will not be turned off. To make sure that the
@@ -255,9 +256,10 @@ class KeyguardController {
try { try {
EventLogTags.writeWmSetKeyguardShown( EventLogTags.writeWmSetKeyguardShown(
displayId, displayId,
1 /* keyguardShowing */, state.mKeyguardShowing ? 1 : 0,
state.mAodShowing ? 1 : 0, state.mAodShowing ? 1 : 0,
1 /* keyguardGoingAway */, 1 /* keyguardGoingAway */,
state.mOccluded ? 1 : 0,
"keyguardGoingAway"); "keyguardGoingAway");
final int transitFlags = convertTransitFlags(flags); final int transitFlags = convertTransitFlags(flags);
final DisplayContent dc = mRootWindowContainer.getDefaultDisplay(); final DisplayContent dc = mRootWindowContainer.getDefaultDisplay();
@@ -671,6 +673,15 @@ class KeyguardController {
boolean hasChange = false; boolean hasChange = false;
if (lastOccluded != mOccluded) { if (lastOccluded != mOccluded) {
if (mDisplayId == DEFAULT_DISPLAY) {
EventLogTags.writeWmSetKeyguardShown(
mDisplayId,
mKeyguardShowing ? 1 : 0,
mAodShowing ? 1 : 0,
mKeyguardGoingAway ? 1 : 0,
mOccluded ? 1 : 0,
"updateVisibility");
}
controller.handleOccludedChanged(mDisplayId, mTopOccludesActivity); controller.handleOccludedChanged(mDisplayId, mTopOccludesActivity);
hasChange = true; hasChange = true;
} else if (!lastKeyguardGoingAway && mKeyguardGoingAway) { } else if (!lastKeyguardGoingAway && mKeyguardGoingAway) {

View File

@@ -16,6 +16,8 @@
package com.android.server.wm; package com.android.server.wm;
import static android.view.WindowManager.TRANSIT_OLD_KEYGUARD_UNOCCLUDE;
import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_REMOTE_ANIMATIONS; import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_REMOTE_ANIMATIONS;
import static com.android.server.wm.AnimationAdapterProto.REMOTE; import static com.android.server.wm.AnimationAdapterProto.REMOTE;
import static com.android.server.wm.RemoteAnimationAdapterWrapperProto.TARGET; import static com.android.server.wm.RemoteAnimationAdapterWrapperProto.TARGET;
@@ -194,6 +196,13 @@ class RemoteAnimationController implements DeathRecipient {
+ " transit=%s, apps=%d, wallpapers=%d, nonApps=%d", + " transit=%s, apps=%d, wallpapers=%d, nonApps=%d",
AppTransition.appTransitionOldToString(transit), appTargets.length, AppTransition.appTransitionOldToString(transit), appTargets.length,
wallpaperTargets.length, nonAppTargets.length); wallpaperTargets.length, nonAppTargets.length);
if (AppTransition.isKeyguardOccludeTransitOld(transit)) {
EventLogTags.writeWmSetKeyguardOccluded(
transit == TRANSIT_OLD_KEYGUARD_UNOCCLUDE ? 0 : 1,
1 /* animate */,
transit,
"onAnimationStart");
}
mRemoteAnimationAdapter.getRunner().onAnimationStart(transit, appTargets, mRemoteAnimationAdapter.getRunner().onAnimationStart(transit, appTargets,
wallpaperTargets, nonAppTargets, mFinishedCallback); wallpaperTargets, nonAppTargets, mFinishedCallback);
} catch (RemoteException e) { } catch (RemoteException e) {
@@ -353,6 +362,11 @@ class RemoteAnimationController implements DeathRecipient {
final boolean isKeyguardOccluded = mDisplayContent.isKeyguardOccluded(); final boolean isKeyguardOccluded = mDisplayContent.isKeyguardOccluded();
try { try {
EventLogTags.writeWmSetKeyguardOccluded(
isKeyguardOccluded ? 1 : 0,
0 /* animate */,
0 /* transit */,
"onAnimationCancelled");
mRemoteAnimationAdapter.getRunner().onAnimationCancelled(isKeyguardOccluded); mRemoteAnimationAdapter.getRunner().onAnimationCancelled(isKeyguardOccluded);
} catch (RemoteException e) { } catch (RemoteException e) {
Slog.e(TAG, "Failed to notify cancel", e); Slog.e(TAG, "Failed to notify cancel", e);