Fix BAL bypass via pinned windows in SDK sandbox and PCC

Untrusted applications could bypass Background Activity Launch (BAL) restrictions by entering Picture-in-Picture (PiP) mode and launching an activity through their SDK Sandbox or Private Compute Core (PCC).

This commit updates BackgroundActivityStartController to use hasActiveVisibleNotPinnedWindow() in SDK Sandbox and PCC visibility checks.

TAG=agy
CONV=d05c04fd-f15d-4691-82bb-7a004945e342

Bug: 527036109
Test: atest WmTests:BackgroundActivityStartControllerTests
Flag: EXEMPT BUGFIX
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:c4780c5154456ddccb84b164039aad979b91afd5
Merged-In: I96bb706455fd3e95e73001e3515d3269815576c2
Change-Id: I96bb706455fd3e95e73001e3515d3269815576c2
1 file changed