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:
TreeHugger Robot
2017-01-11 22:02:32 +00:00
committed by Android (Google) Code Review
3 changed files with 27 additions and 6 deletions

View File

@@ -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(

View File

@@ -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);
}
}