Restore systemBarsAppearance from preserved window

When an activity is relaunching, the systemBarsAppearance set by the
application is automatically restored on the client views by function
of the same DecorView instance being transfered to the new Window
instance. However, the server (who is also aware of appearance changes
via TaskDescription updates), was having its appearance reset during
the activity recreation process.
To fix this, this change transfers the existing systemBarsAppearance
state held in Window.java from the preserved window to the new window
instance. Then, when ActivityThread#performLaunchActivity sets the
new activity instance's theme for the first time, we make sure that the
preserved appearance is also transfered to the new TaskDescription that
will soon be sent to the server.

Fix: 325125042
Test: manual - set custom system bars appearance in an activity, then
force activity recreation (e.g. with a resize). Ensure TaskDescription
in WM/Shell remains unchanged.

Change-Id: I0fee6244e5c1551b9cfe1c4c0a75c9476da385ac
3 files changed