Add isUidActiveOrForeground for camera/audio to use.

The new interface isUidActiveOrForeground will call AM.isUidActiveOrForeground()
which check isUidActive() first, if flase, then check isUidForeground.

Bug: 151185692, 151777097, 109950150
Test: manual test.
Change-Id: I51ed1fe780dbead0688e73a37c6c762f84e8bf23
4 files changed