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:27cab264853b4387fc60fea13a0e3c904aae4008
Merged-In: Id96246a0a03dfaef8aa457d6c0ddc40a30b76b4f
Change-Id: Id96246a0a03dfaef8aa457d6c0ddc40a30b76b4f
1 file changed