Move compat behavior in #onPipRequested to ActivityThread

Removes the pause-hint-resume cycle to trigger PiP out of the
default implementation of #onPictureInPictureRequested and replaces
it with a bool check in its caller in ActivityThread.
This prevents exposing the pause/resume cycle to the public API.

Bug: 148011369
Test: atest FrameworksCoreTests:android.app.activity.ActivityThreadTest
Test: atest CtsWindowManagerDeviceTestCases:PinnedStackTests
Test: atest WmTests:ActivityTaskManagerServiceTests
Change-Id: Iec4f602ccf411a31f0cee5a4599cf2fea6f25994
4 files changed