Avoid killing the sandbox in hostside tests

After running runDeviceTests() in a hostside test, the app
instrumentation and sandbox are no longer alive, so there is no sandbox
to be killed. A new permission and a test API stopSdkSandbox is added to
allow an app to kill its own sandbox. Hostside tests that were
previously trying to kill a sandbox are rewritten.

Additionally, register a sandbox death recipient for cleaning up the
state of SdkSandboxManagerService each time onServiceConnected() is
called as the system can restart a new sandbox after the death of an old
one.

Bug: 239690000
Bug: 239553253
Bug: 240164606
Test: atest
SdkSandboxManagerTest#testReloadingSdkAfterSandboxDeathIsSuccessful
Test: atest SdkSandboxManagerServiceUnitTest
Change-Id: I74b625767da8f49f1a07eba438ec54e14a2536dd

Change-Id: If5b90e8285882902f8d56df0c43b3b1a6b36de6d
20 files changed
tree: e087e17d1b90285656ffb6c64e19f95b5fe7b483
  1. adservices/
  2. apex/
  3. sdksandbox/
  4. groups
  5. OWNERS
  6. PREUPLOAD.cfg
  7. project.config