Merge changes Idf05ffee,Ie7371ba4
* changes: Update "More" button text to "Advanced" Fix NPE when adding account but prefManager doesn't exist
This commit is contained in:
committed by
Android (Google) Code Review
commit
382550a12d
@@ -286,6 +286,9 @@ public class AccountPreferenceController extends PreferenceController
|
||||
}
|
||||
|
||||
private void updateProfileUi(final UserInfo userInfo) {
|
||||
if (mParent.getPreferenceManager() == null) {
|
||||
return;
|
||||
}
|
||||
final Context context = mContext;
|
||||
final ProfileData profileData = new ProfileData();
|
||||
profileData.userInfo = userInfo;
|
||||
@@ -402,6 +405,10 @@ public class AccountPreferenceController extends PreferenceController
|
||||
}
|
||||
|
||||
private void updateAccountTypes(ProfileData profileData) {
|
||||
if (mParent.getPreferenceManager() == null) {
|
||||
// This could happen if activity is finishing
|
||||
return;
|
||||
}
|
||||
profileData.preferenceGroup.removeAll();
|
||||
if (profileData.userInfo.isEnabled()) {
|
||||
final ArrayList<AccountTypePreference> preferences = getAccountTypePreferences(
|
||||
|
@@ -48,7 +48,7 @@ public class ExpandPreference extends Preference {
|
||||
private void init() {
|
||||
setLayoutResource(R.layout.expand_preference);
|
||||
setIcon(R.drawable.ic_arrow_down_24dp);
|
||||
setTitle(R.string.wifi_more);
|
||||
setTitle(R.string.advanced_section_header);
|
||||
setOrder(999);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user