Update config from ancestor if it can handle orientation request

When calling Activity#setRequestedOrientation, the orientation of task
may not be updated yet. If the requested orientation are mismatched,
the configuration could be letterboxed (unresizable activity) according
to the intermediate state. And because WindowProcessController may be a
configuration listener of the activity, the app may receive unexpected
configuration and keep calling setRequestedOrientation to cause a
relaunch loop.

Now the direct onConfigurationChanged from setOrientation is only
called when:
 - In multi window mode: if the activity is unresizable, its requested
   orientation should be still respected to compute letterboxed bounds
   if needed. Otherwise the orientation is ignored for resizable.
 - The ancestor ignores orientation request from descendant, e.g. in a
   fixed orientation display.

This should save an extra onConfigurationChanged for the most common
case in fullscreen windowing mode.

Fixes: 169349616
Test: atest WindowContainerTests#testSetOrientation

Change-Id: I49ba2003699422a491c1183b10a691e25867ffa7
2 files changed