Sandbox only if an activity may enter size compat mode.

The check shouldCreateCompatDisplayInsets will catch any
apps that are eligible for size compat mode, and apply sandboxing
to them.

If an app is in letterbox only - and is never eligible for size
compat mode- then the app handles resizing and multiwindow mode.
We can assume, since it has explicitly declared it is resizable,
that it will use the Display size APIs correctly.

This decision is consistent with test results, as well, which only
shows apps in size compat mode benefiting from sandboxing.

Bug: 185456980
Test: atest WmTests:SizeCompatTests
Change-Id: I4b66454b3515738554c63cffe73e2f0500889cf6
2 files changed