LastMileLogger: make fail-safe more robust

In order to minimize dependencies, we don't synchronize
the execution of wifi-events.rc, and the start-up of
WifiService. Consequently, it may be possible for
LastMileLogger to be initialized before the Wifi
tracing instance.

Given the above, we shouldn't manipulate the Wifi tracing
instance in the LastMileLogger ctor. In particular,
attempting to arm the fail-safe (opening the free_buffer
file) in the ctor risks never arming the fail-safe.

Resolve this problem, by arming the fail-safe on calls
to enableTracing().

While there: if the fail-safe cannot be armed, bail out
of enableTracing().

Bug: 34683800
Test: runtests.sh
Change-Id: Ibb2922609bf8e33f2a3ce087d383e59d86683b7e
2 files changed
tree: efd1a4530fef6bac5e878ce0051f719ad9fb7f50
  1. libwifi_hal/
  2. libwifi_system/
  3. service/
  4. tests/
  5. PREUPLOAD.cfg