Move thread creation to setCallback() from start()
This change only modifies the Cuttlefish emulator behavior.
Creating a new thread is a heavy operation. Doing so in start() slows
down the request handling. In a stress test like
testVariedRatesRepetitive, 100+ requests are received in a short time,
which results in accumulated requests waiting to be handled, and thus
breaks the subsequent tests.
This change moves creating a new thread from start() to setCallback()
to avoid thread creation for each new request.
Bug: 400325468
Test: atest CtsLocationGnssTestCases
Test: atest GtsLocationTestCases
Test: atest VtsHalGnssTargetTest
Change-Id: I6bf89989c572b0e7b1b9ba9339b922363ef26ce4
3 files changed