Merge "Tidy warnings in AccountSettingsFragment" into jb-ub-mail-ur10

This commit is contained in:
Tony Mantler 2013-09-05 18:04:07 +00:00 committed by Android (Google) Code Review
commit 19c11c0b77

View File

@ -141,7 +141,6 @@ public class AccountSettingsFragment extends PreferenceFragment
private Ringtone mRingtone; private Ringtone mRingtone;
private AccountPreferences mAccountPreferences;
private FolderPreferences mInboxFolderPreferences; private FolderPreferences mInboxFolderPreferences;
/** The e-mail of the account being edited. */ /** The e-mail of the account being edited. */
@ -338,9 +337,9 @@ public class AccountSettingsFragment extends PreferenceFragment
/** /**
* Listen to all preference changes in this class. * Listen to all preference changes in this class.
* @param preference * @param preference The changed Preference
* @param newValue * @param newValue The new value of the Preference
* @return * @return True to update the state of the Preference with the new value
*/ */
@Override @Override
public boolean onPreferenceChange(Preference preference, Object newValue){ public boolean onPreferenceChange(Preference preference, Object newValue){
@ -581,12 +580,13 @@ public class AccountSettingsFragment extends PreferenceFragment
folderCursor.close(); folderCursor.close();
} }
mAccountPreferences = new AccountPreferences(mContext, mUiAccount.name); final AccountPreferences accountPreferences =
new AccountPreferences(mContext, mUiAccount.name);
mInboxFolderPreferences = mInboxFolderPreferences =
new FolderPreferences(mContext, mUiAccount.name, folder, true); new FolderPreferences(mContext, mUiAccount.name, folder, true);
NotificationUtils.moveNotificationSetting( NotificationUtils.moveNotificationSetting(
mAccountPreferences, mInboxFolderPreferences); accountPreferences, mInboxFolderPreferences);
final String ringtoneUri = mInboxFolderPreferences.getNotificationRingtoneUri(); final String ringtoneUri = mInboxFolderPreferences.getNotificationRingtoneUri();
if (!TextUtils.isEmpty(ringtoneUri)) { if (!TextUtils.isEmpty(ringtoneUri)) {