Log failure to load memtrack module only once

get_instance() only attempts to get the memtrack module once, since
it is a static variable. Therefore it makes sense to log an error if
the module is not available only once. The error shouldn't be
printed in logcat more than once during boot, since the API is only
used by one process (SystemServer).

This should allow devices that do not have anything to report in
memtrack (like HiKey and DragonBoard) to get rid of their dummy
memtrack implementation (which is optional anyway).

Test: boot aosp_x86_64 and check logcat (only one error)
Change-Id: I785f1ac288b7e497ff511ddb3d2b866fa5190d07
1 file changed
tree: e50e610b781a8f1373d5cac4d4d7b393a02b2bec
  1. include/
  2. Android.bp
  3. memtrack.cpp
  4. memtrack_test.cpp
  5. OWNERS