Disallow entering PiP when activity is locked.

- Also ensuring that when we request for a task to be locked
  via the shell, we directly set the locked state instead of
  relying on the SystemUI to show a prompt to lock (necessary
  for the CTS test to run).

Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testDisallowEnterPipActivityLocked

Change-Id: Ice608e6d8e7f018dbd5e20ae457343bfdd0a8630
2 files changed