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

Commit ca9e12ee authored by Nicholas Ambur's avatar Nicholas Ambur
Browse files

fix enable checks to check use action in LatencyTracker

Without checking the per-action enable, logging is only allowed
based on the global enable flag instead of the enable flag per action.
Checking the per-action enable flag allows for action latencies to be
rolled out independent of each other.

Test: manual verify action is logged with only action specific enable
set
Bug: 265850090

Change-Id: I4f8d21bca4a9e52fb3875e88387b8c8641f64c94
Merged-In: I4f8d21bca4a9e52fb3875e88387b8c8641f64c94
parent c37e3ade
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -471,7 +471,7 @@ public class LatencyTracker {
     */
    public void onActionStart(@Action int action, String tag) {
        synchronized (mLock) {
            if (!isEnabled()) {
            if (!isEnabled(action)) {
                return;
            }
            // skip if the action is already instrumenting.
@@ -495,7 +495,7 @@ public class LatencyTracker {
     */
    public void onActionEnd(@Action int action) {
        synchronized (mLock) {
            if (!isEnabled()) {
            if (!isEnabled(action)) {
                return;
            }
            Session session = mSessions.get(action);