Add onPropertiesChangedListener for GET_CONTENT device config flag
Previously, we were checking GET_CONTENT take over device config flag
only #onCreate. This was done because we need to intercept external
calls so that they start getting routed to MediaProvider. So, we
couldn't do it in any other workflow, but had to do it independently and
MediaProvider#onCreate seemed to be the apt place to do this check.
However due to a recent bug, we uncovered that this would cause some
unprecedented disambiguous screen for users that have active work
profile. This is because work profile's MediaProvider's #onCreate method
is called before personal profile, this leads to the user seeing
disambiguous screen as the highest priority handler for GET_CONTENT is
MediaProvider in one profile and DocumentsUI in another.
onPropertiesChangedListener helps us make the changes without the need
for a reboot.
Bug: 245883162
Test: manual
Change-Id: If38bfb9b0fe680676b1ce32b34c1753dd8d9f51e
1 file changed