Viewpager2 created view based on the first tab height, when tab is
selected, viewpager2 should recalculate height.
But this solution may not suitable for App list, so we only enable
for Location Settings which have different items in personal & work
profile.
Bug: 224521665
Test: manual
Change-Id: Ib19b30cb82b8b4f13f651795906289da53ded4ed
Controller generates the injection location settings
in updateState() which happens in onResume.
That's the primary reason why we observed the shifting issue.
In a good practice, we generate preference in displayPreference(),
and then update the setting state in updateState().
In this cl, we create a base controller class to encapsulate
most implementation, and developer need to inject location
services in child class.
Test: Add work profile, and see correct services list.
Bug: 183169265
Change-Id: I5735ba974da87ad83b56791abd8a8637c2317571