Don't send configuration that app doesn't support to it.

If an app doesn't support the current device orientation configuration,
then don't run the app in that configuration. Instead have the run in
the last configuration that it supports.
This mostly fixes transient cases where there is a short window that the
device is switching configuration and the app could be sent the single
incorrect configuration that is quickly corrected

Test: Will be added soon.
Fixes: 36897968
Change-Id: I030a04200fdf33c4c1938bda980ea8c14aa1c736
2 files changed