Avoid compacting when app has foreground activities

As those processes will likely need to execute code
as soon as screen is unlocked and trigger unlocked
and this would also potentially mitigates situations
where process starts from Cached state which triggers
a during compaction during its startup

Bug: 227494533
Test: Manual
Change-Id: I82e501fbab130ec4b272e310d09d37c5ac944675
2 files changed