Update DecorContext's Resource cache when calling getResources.

DecorContext is created with the resources from the activity. However,
the resources in DecorContext may not get updated properly
ResourcesManager if the original resource object it's pointing to isn't
updated by ResourcesManager. Because of this, resources for the
DecorView can be incorrect when the activity's resources are updated.
This change updates the DecorContext's resources with the activity's
resources when getResources is called to ensure they get properly
updated.

This fixes the issue where windowing mode was incorrect when determining
what the window elevation should be. It was incorrectly getting full
screen when it should have gotten pinned. This was preventing surface
insets from getting set on the WM side, so PIP windows didn't get
shadows.

Change-Id: I5af2364f81b167e3732811d7413554d035c4a021
Test: PIP has shadows
Fixes: 78214575
3 files changed