Another attempt fix for account preference screen.

Fix: 34219500
Test: RunSettingsRoboTests

Change-Id: I316e36496fc9d7eca9c718275c0f113b181d7f1e
This commit is contained in:
Fan Zhang
2017-01-13 14:57:01 -08:00
parent ce6bf59a9a
commit c7804c130b
2 changed files with 4 additions and 2 deletions

View File

@@ -63,7 +63,6 @@ import java.util.List;
import static android.content.Intent.EXTRA_USER;
import static android.os.UserManager.DISALLOW_MODIFY_ACCOUNTS;
import static android.os.UserManager.DISALLOW_REMOVE_MANAGED_PROFILE;
import static android.os.UserManager.DISALLOW_REMOVE_USER;
import static android.provider.Settings.EXTRA_AUTHORITIES;
public class AccountPreferenceController extends PreferenceController
@@ -405,7 +404,8 @@ public class AccountPreferenceController extends PreferenceController
}
private void updateAccountTypes(ProfileData profileData) {
if (mParent.getPreferenceManager() == null) {
if (mParent.getPreferenceManager() == null
|| profileData.preferenceGroup.getPreferenceManager() == null) {
// This could happen if activity is finishing
return;
}