interceptor: generalize environment variable access

Generalize the access to single environment variable values as this is a
commonly used functionality. command_getenv returns an optional to
indicate whether the value had been set at all and hence allows
contextual boolean use, e.g.

  if (command_getenv(command, kEnvVariable)) {
      // something
  }

Bug: 206894758
Signed-off-by: Matthias Maennich <[email protected]>
Change-Id: Icda8d0709b6fe394630729c245a0486fcf718157
1 file changed
tree: a85da4d12d0a1098487e2bab5c7bf9e0b0c2e1a6
  1. analysis.cc
  2. Android.bp
  3. CMakeLists.txt
  4. interceptor.cc
  5. interceptor.h
  6. LICENSE
  7. log.proto
  8. main.cc
  9. METADATA
  10. MODULE_LICENSE_APACHE2
  11. OWNERS