Fix background bypass via notifications
This is a CP of ag/14736230 to qt-dev.
Apps were able to bypass BAL and BG-FGS restrictions by retrieving their
own notifications and firing their PI since those were allowlisted for
Now we strip the token that granted them that ability
from notifications returned via NM.getActiveNotifications(), which
returns the notifications of the caller.
Notifications returned via notification listener APIs still contain such
token, as they should.
Test: Manually tested
(cherry picked from commit 5fbeff59df3ea1441c3843aa1834616876ef1985)
(cherry picked from commit 14c1c7b4a732c517ba18f5dd0598adb9f3b72221)
2 files changed