Commit 71d38f8f authored by bttk's avatar bttk Committed by Commit Bot

metrics: RecordUserAction no longer needs to run on the UI thread

https://source.chromium.org/chromium/chromium/src/+/d5c435e0b76ef29580d018cdbe8717fefd2ddd03

Bug: 1048429
Change-Id: Iaa866a5414324ba380d7d8fbc5fcc21ed1aa7ca0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2037050Reviewed-by: default avatarSky Malice <skym@chromium.org>
Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Commit-Queue: Yaron Friedman <yfriedman@chromium.org>
Auto-Submit: bttk <bttk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738752}
parent 4d9c7a2d
......@@ -6,7 +6,6 @@ package org.chromium.base.metrics;
import androidx.annotation.VisibleForTesting;
import org.chromium.base.ThreadUtils;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
import org.chromium.base.annotations.NativeMethods;
......@@ -38,18 +37,7 @@ public class RecordUserAction {
public static void record(final String action) {
if (sDisabledBy != null) return;
if (ThreadUtils.runningOnUiThread()) {
RecordUserActionJni.get().recordUserAction(action);
return;
}
ThreadUtils.runOnUiThread(new Runnable() {
@Override
public void run() {
RecordUserActionJni.get().recordUserAction(action);
}
});
RecordUserActionJni.get().recordUserAction(action);
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment