diff options
| -rw-r--r-- | packages/SystemUI/lint-baseline.xml | 33 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java | 23 |
2 files changed, 19 insertions, 37 deletions
diff --git a/packages/SystemUI/lint-baseline.xml b/packages/SystemUI/lint-baseline.xml index 525839de0a60..b4c839f08607 100644 --- a/packages/SystemUI/lint-baseline.xml +++ b/packages/SystemUI/lint-baseline.xml @@ -9168,39 +9168,6 @@ <issue id="UnclosedTrace" - message="The `beginSection()` call is not always closed with a matching `endSection()` because the code in between may return early" - errorLine1=" Trace.beginSection("KeyguardViewMediator#handleKeyguardDone");" - errorLine2=" ~~~~~~~~~~~~"> - <location - file="frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java" - line="2654" - column="15"/> - </issue> - - <issue - id="UnclosedTrace" - message="The `beginSection()` call is not always closed with a matching `endSection()` because the code in between may return early" - errorLine1=" Trace.beginSection("KeyguardViewMediator#handleShow");" - errorLine2=" ~~~~~~~~~~~~"> - <location - file="frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java" - line="2780" - column="15"/> - </issue> - - <issue - id="UnclosedTrace" - message="The `beginSection()` call is not always closed with a matching `endSection()` because the code in between may return early" - errorLine1=" Trace.beginSection("KeyguardViewMediator#handleStartKeyguardExitAnimation");" - errorLine2=" ~~~~~~~~~~~~"> - <location - file="frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java" - line="3011" - column="15"/> - </issue> - - <issue - id="UnclosedTrace" message="The `traceBegin()` call is not always closed with a matching `traceEnd()` because the code in between may return early" errorLine1=" Trace.traceBegin(Trace.TRACE_TAG_APP, "MediaControlPanel#bindPlayer<" + key + ">");" errorLine2=" ~~~~~~~~~~"> diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index fe81b20c5367..2f872b6a6bc8 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -2834,6 +2834,14 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, */ private void handleShow(Bundle options) { Trace.beginSection("KeyguardViewMediator#handleShow"); + try { + handleShowInner(options); + } finally { + Trace.endSection(); + } + } + + private void handleShowInner(Bundle options) { final boolean showUnlocked = options != null && options.getBoolean(OPTION_SHOW_DISMISSIBLE, false); final int currentUser = mSelectedUserInteractor.getSelectedUserId(); @@ -2885,8 +2893,6 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, mKeyguardDisplayManager.show(); scheduleNonStrongBiometricIdleTimeout(); - - Trace.endSection(); } /** @@ -3065,6 +3071,17 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, RemoteAnimationTarget[] apps, RemoteAnimationTarget[] wallpapers, RemoteAnimationTarget[] nonApps, IRemoteAnimationFinishedCallback finishedCallback) { Trace.beginSection("KeyguardViewMediator#handleStartKeyguardExitAnimation"); + try { + handleStartKeyguardExitAnimationInner(startTime, fadeoutDuration, apps, wallpapers, + nonApps, finishedCallback); + } finally { + Trace.endSection(); + } + } + + private void handleStartKeyguardExitAnimationInner(long startTime, long fadeoutDuration, + RemoteAnimationTarget[] apps, RemoteAnimationTarget[] wallpapers, + RemoteAnimationTarget[] nonApps, IRemoteAnimationFinishedCallback finishedCallback) { Log.d(TAG, "handleStartKeyguardExitAnimation startTime=" + startTime + " fadeoutDuration=" + fadeoutDuration); synchronized (KeyguardViewMediator.this) { @@ -3253,8 +3270,6 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, onKeyguardExitFinished(); } } - - Trace.endSection(); } private void onKeyguardExitFinished() { |