Skip to content
Commit 0fe52c8b authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Merge dup code at thread entry and param change

This CL is mostly just cleanup, but there are a couple of fixes marked
"FIX" below.

Merge the duplicate code that was at the beginning of threadLoop() and
after a parameter change.  cacheParameters_l() is now called at entry to
threadLoop() and after any parameter change.  It re-calculates all values
that are derived from parameters, and caches them in instance variables.

updateWaitTime_l():
 - FIX activeSleepTime depends on mWaitTimeMs, which was initially set
   to infinity.  updateWaitTime_l() was not called at entry to
   threadLoop(), so activeSleepTime was not set correctly before the
   first parameter change.

 - FIX reversed the order of calls after parameter change
   for the same reason so that updateWaitTime_l() is called before
   calculating values that are derived from wait time.

 - marked it private since now it's only called from DuplicatingThread

Change-Id: If2607d2ed66c6893d910433e48208a93c41fb7e9
parent c4ffe77a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment