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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user