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

Commit 67d8adee authored by shane's avatar shane
Browse files

[ARR] Add trace for the View with preferred frame rate.

Add trace for the View with preferred frame rate.

Bug: 401616175
Flag: EXEMPT only add trace
Test: atest ViewFrameRateTest / ViewRootImplTest
Change-Id: I379cdaf86590e0a66195e2215648234523fd4623
parent 4ac177fc
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -34271,6 +34271,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                frameRateToSet = velocityFrameRate;
            }
            viewRootImpl.votePreferredFrameRate(frameRateToSet, compatibility);
            if (Trace.isTagEnabled(TRACE_TAG_VIEW)) {
                Trace.instant(TRACE_TAG_VIEW,
                        getClass().getSimpleName()
                            + " - votePreferredFrameRate: " + frameRateToSet);
            }
        }
        if (viewRootImpl.shouldCheckFrameRateCategory()) {
@@ -34306,6 +34312,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                                | FRAME_RATE_CATEGORY_REASON_INVALID;
                    }
                }
                if (Trace.isTagEnabled(TRACE_TAG_VIEW)) {
                    Trace.instant(TRACE_TAG_VIEW,
                            getClass().getSimpleName() + " - votePreferredFrameRate: "
                                + viewRootImpl.categoryToString(
                                    frameRateCategory & ~FRAME_RATE_CATEGORY_REASON_MASK));
                }
            } else {
                // Category doesn't control it. It is directly controlled by frame rate
                frameRateCategory = FRAME_RATE_CATEGORY_NO_PREFERENCE
+1 −1
Original line number Diff line number Diff line
@@ -13214,7 +13214,7 @@ public final class ViewRootImpl implements ViewParent,
        }
    }
    private static String categoryToString(int frameRateCategory) {
    static String categoryToString(int frameRateCategory) {
        String category;
        switch (frameRateCategory) {
            case FRAME_RATE_CATEGORY_NO_PREFERENCE -> category = "no preference";