Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e137fe51 authored by Colin Cross's avatar Colin Cross
Browse files

Fix CompileTimeConstant ErrorProne findings in SystemUI

Fixes:
frameworks/base/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java:5469: error: [CompileTimeConstant] Non-compile-time constant expression passed to parameter with @CompileTimeConstant type annotation.
frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java:3720: error: [NonFinalCompileTimeConstant] @CompileTimeConstant parameters should be final or effectively final
frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java:3724: error: [CompileTimeConstant] Non-compile-time constant expression passed to parameter with @CompileTimeConstant type annotation. Did you mean to make 's' final?

Bug: 255286870
Bug: 258754271
Bug: 256019562
Test: m RUN_ERROR_PRONE=true javac-check lint-check
Change-Id: Ifaa3407784c11d0536104b616264bca949672918
parent 58de71a4
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -5465,8 +5465,11 @@ public final class NotificationPanelViewController implements Dumpable {
                if (!animatingUnlockedShadeToKeyguard) {
                    // Only make the status bar visible if we're not animating the screen off, since
                    // we only want to be showing the clock/notifications during the animation.
                    mShadeLog.v("Updating keyguard status bar state to "
                            + (keyguardShowing ? "visible" : "invisible"));
                    if (keyguardShowing) {
                        mShadeLog.v("Updating keyguard status bar state to visible");
                    } else {
                        mShadeLog.v("Updating keyguard status bar state to invisible");
                    }
                    mKeyguardStatusBarViewController.updateViewState(
                            /* alpha= */ 1f,
                            keyguardShowing ? View.VISIBLE : View.INVISIBLE);
+1 −1
Original line number Diff line number Diff line
@@ -3717,7 +3717,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        }
    }

    private void debugLog(@CompileTimeConstant String s) {
    private void debugLog(@CompileTimeConstant final String s) {
        if (mLogger == null) {
            return;
        }