Fix security vulnerability allowing apps to start from background

Bug: 317048338
Test: Using the steps in b/317048338#comment12
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c5fc8ea92c0aabbb2fdccc23b743c18a8bf62e64)
Merged-In: Ia91199fdb23beed27bde687fdca8fe5d3a5a4759
Change-Id: Ia91199fdb23beed27bde687fdca8fe5d3a5a4759
2 files changed