diff options
| author | 2024-07-26 12:23:46 +0000 | |
|---|---|---|
| committer | 2024-07-26 12:23:46 +0000 | |
| commit | d7a39f775ce41ebe5b47b6673ce3310bc1ea87b5 (patch) | |
| tree | 55ee148a3641f3856cf67770f0008226cfb3f545 | |
| parent | eb306b9b3702d23b97176bbf6f2809e2adbd3e25 (diff) | |
| parent | d9d714873097c5c263f310a9955e52434e309d62 (diff) | |
Merge "Move writeWmSetKeyguardShown to a method" into main
| -rw-r--r-- | services/core/java/com/android/server/wm/KeyguardController.java | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/services/core/java/com/android/server/wm/KeyguardController.java b/services/core/java/com/android/server/wm/KeyguardController.java index 4cf22187d1f8..3d077443a429 100644 --- a/services/core/java/com/android/server/wm/KeyguardController.java +++ b/services/core/java/com/android/server/wm/KeyguardController.java @@ -197,14 +197,6 @@ class KeyguardController { setWakeTransitionReady(); return; } - EventLogTags.writeWmSetKeyguardShown( - displayId, - keyguardShowing ? 1 : 0, - aodShowing ? 1 : 0, - state.mKeyguardGoingAway ? 1 : 0, - state.mOccluded ? 1 : 0, - "setKeyguardShown"); - // Update the task snapshot if the screen will not be turned off. To make sure that the // unlocking animation can animate consistent content. The conditions are: // - Either AOD or keyguard changes to be showing. So if the states change individually, @@ -223,6 +215,7 @@ class KeyguardController { state.mKeyguardShowing = keyguardShowing; state.mAodShowing = aodShowing; + state.writeEventLog("setKeyguardShown"); if (keyguardChanged) { // Irrelevant to AOD. @@ -277,13 +270,7 @@ class KeyguardController { mService.deferWindowLayout(); state.mKeyguardGoingAway = true; try { - EventLogTags.writeWmSetKeyguardShown( - displayId, - state.mKeyguardShowing ? 1 : 0, - state.mAodShowing ? 1 : 0, - 1 /* keyguardGoingAway */, - state.mOccluded ? 1 : 0, - "keyguardGoingAway"); + state.writeEventLog("keyguardGoingAway"); final int transitFlags = convertTransitFlags(flags); final DisplayContent dc = mRootWindowContainer.getDefaultDisplay(); dc.prepareAppTransition(TRANSIT_KEYGUARD_GOING_AWAY, transitFlags); @@ -639,6 +626,16 @@ class KeyguardController { mSleepTokenAcquirer.release(mDisplayId); } + void writeEventLog(String reason) { + EventLogTags.writeWmSetKeyguardShown( + mDisplayId, + mKeyguardShowing ? 1 : 0, + mAodShowing ? 1 : 0, + mKeyguardGoingAway ? 1 : 0, + mOccluded ? 1 : 0, + reason); + } + /** * Updates keyguard status if the top task could be visible. The top task may occlude * keyguard, request to dismiss keyguard or make insecure keyguard go away based on its @@ -709,18 +706,11 @@ class KeyguardController { boolean hasChange = false; if (lastOccluded != mOccluded) { - if (mDisplayId == DEFAULT_DISPLAY) { - EventLogTags.writeWmSetKeyguardShown( - mDisplayId, - mKeyguardShowing ? 1 : 0, - mAodShowing ? 1 : 0, - mKeyguardGoingAway ? 1 : 0, - mOccluded ? 1 : 0, - "updateVisibility"); - } + writeEventLog("updateVisibility"); controller.handleOccludedChanged(mDisplayId, mTopOccludesActivity); hasChange = true; } else if (!lastKeyguardGoingAway && mKeyguardGoingAway) { + writeEventLog("dismissIfInsecure"); controller.handleKeyguardGoingAwayChanged(display); hasChange = true; } |