Adding AppOps setting for entering PiP when hidden.

- In O, apps can request to enter picture-in-picture when the user
  effectively leaves their activity for another task by default. To
  prevent this from being abused, we need to add a setting for the
  user to disable this behavior per-package in the system level.
  When disabled, any activity from that package will only be able
  to enter picture-in-picture when it is visible and resumed.

Bug: 34520451
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testAppOpsDenyPipOnPause
Change-Id: Ib3a993e99ffb071706c6b7d3fb1c882b74acc5d7
Signed-off-by: Winson Chung <winsonc@google.com>
4 files changed