Commit f4d53fb3 authored by Sam Maier's avatar Sam Maier Committed by Commit Bot

Android: moving SecureRandom initialize to thread pool

Currently, the AsyncTask that creates the SecureRandom is on the
SERIAL_EXECUTOR - this is causing a lot of ANRs. Since it doesn't appear
to require any synchronus guarantees with anything else in the
SERIAL_EXECUTOR, we can move this to the THREAD_POOL_EXECUTOR.

This means when we block on SecureRandom creation using get(), we don't
have to wait on all tasks currently in the SERIAL_EXECUTOR finishing.

Bug: 866998
Change-Id: I771724a184bf501b2da55f7d42a93b3943e7a058
Reviewed-on: https://chromium-review.googlesource.com/1157211Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Commit-Queue: Sam Maier <smaier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579591}
parent fd6fd0c8
......@@ -70,7 +70,7 @@ public class IntentWithGesturesHandler {
}
return secureRandom;
}
}.execute();
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
/**
......
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