Include the liblog macros in the NDK.

Some time ago there was an effort to move these into android/log.h,
but that was abandoned because so much existing 3P code defines ALOG*
themselves (since we never shipped them), and defining those macros in
log.h caused conflicts with that existing code.

Instead, those macros are shipped in a separate log_macros.h that
developers can use instead of reinventing the wheel, unless they're
happy with their already reinvented wheel.

There are a lot of weird quirks in log_main.h (where these are defined
for the platform) that aren't obviously worth shipping, and are
probably difficult to change now. Rather than continue keeping this
out of the NDK until someone has the time to sort that out, the
definitions are just duplicates in the NDK's header.

The downside to the duplication rather than log_main.h reusing
log_macros.h is that log_macros.h (being brand new) isn't used
anywhere in the platform, so treehugger won't catch any issues. To
give this at least some basic testing, I've (locally) added an
`#include <android/log_macros.h>` to the top of `log_main.h` and done
a build. Since one of those suspicious behaviors in `log_main.h` is
allowing each of the `ALOG*` variants to be externally defined, those
are used instead.

Bug: None
Test: treehugger
Change-Id: I87b8a2030493a1828b7378d56832a5fcb2ecea6c
2 files changed
tree: 7ccc0ddc11aa97d0fa3f5a2224c8030f77a9394f
  1. liblog/
  2. logcat/
  3. logd/
  4. logwrapper/
  5. rust/
  6. OWNERS
  7. PREUPLOAD.cfg
  8. TEST_MAPPING