Fix crash when showing accounts.

Accounts page crashed when showing a disabled
manged profile.

Bug: 17486462
Change-Id: Iaaef23e135ee723bcf0d3101d85f9f0422b64c33
This commit is contained in:
Kenny Guy
2014-09-12 19:49:11 +01:00
parent 37b1253a01
commit 7b72e2835b

View File

@@ -117,6 +117,7 @@ public class AccountSettings extends SettingsPreferenceFragment
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mUm = (UserManager) getSystemService(Context.USER_SERVICE);
mProfileNotAvailablePreference = new Preference(getActivity());
mAuthorities = getActivity().getIntent().getStringArrayExtra(EXTRA_AUTHORITIES);
if (mAuthorities != null) {
mAuthoritiesCount = mAuthorities.length;