Generate per-use prompt only when the process is foreground

This change is to implement dialog when device log access request comes
from foreground.

Bug: 228220847
Test: CtsVerifier
Ignore-AOSP-First: pending fix for logcat privacy issue
Change-Id: I71aa0dbcf97aba1ad65f378d1e68b8c180c32fda
1 file changed