Update RTL/dark theme/orientation dynamically
Currently, we don't update the views once they are inflated, only
on initialization. In practice, this means that while RTL will
work correctly after rebooting the phone (or after the screenshot
process is killed and then recreated), it will not update between
taking two screenshots in quick succession.
This change adds a ConfigurationListener, which updates the dark
mode, RTL state, and phone orientation (portrait/landscape) on
a change in the configuration. Also makes the width of the preview
in landscape the correct size.
Bug: 149487205
Bug: 151351984
Fix: 149487205
Fix: 151351984
Test: manual -- tested changing RTL, orientation, and dark mode
while the screenshot process was running (including while the UI
was visible)
Change-Id: Icfe332e073546c47e92f1e7c0a4f8749bfaf833a
5 files changed