OSDN Git Service

Fix new account not shown for work profile.
authorDoris Ling <dling@google.com>
Mon, 23 Jul 2018 23:13:39 +0000 (16:13 -0700)
committerDoris Ling <dling@google.com>
Mon, 23 Jul 2018 23:13:39 +0000 (16:13 -0700)
commitce5f9c07dac577ab58cf053a9499f704f95c604a
tree7799d3ea7084bc7e475f65622a106c7c94a0d585
parentb9dce70c976a079a49b6add81e88b6b7be5ce384
Fix new account not shown for work profile.

When refreshing the Accounts settings UI, we uses the cached user info
for checking user status. However, when the work profile is being
updated, the UserInfo obejct for the user might be updated even the
user id is the same. Using the cached data causes stale info to be
returned for the user and results in the latest account data not
being shown properly for the user. Update the cache to the latest user
info retrieved from user manager.

Change-Id: Ic0127842203f0288f2fdea6c6346cd11e42a8bf0
Fix: 38302246
Test: make RunSettingsRoboTests
src/com/android/settings/accounts/AccountPreferenceController.java
tests/robotests/src/com/android/settings/accounts/AccountPreferenceControllerTest.java