Bind to TestNetworkStackService as user 0 in IpClientRootTest
By default, context.bindService() will try to bind to the service as the
current user. On a multi-user device with another user (not user 0) as
the current user, this intent will in turn starts another test service
as the current user, which is unexpected in this test.
This patch change this call to bindServiceAsUser() with the SYSTEM user
to always bind to the network stack service running as user 0. Also
gives INTERACT_ACROSS_USERS_FULL permission for sending the intent (note
that INTERACT_ACROSS_USERS is not enough).
Bug: b/353415286
Test: `atest NetworkStackRootTests` on a multi-user device.
Change-Id: Ia3f795fd2bedcfea3d6b9a008189235fdad8a6d8
2 files changed