Skip to content

Commit

Permalink
Merge pull request #3246 from k9mail/replace_getLastNonConfigurationI…
Browse files Browse the repository at this point in the history
…nstance

Replace usage of getLastNonConfigurationInstance()
  • Loading branch information
cketti authored Mar 10, 2018
2 parents dca1476 + bc2b734 commit a82cec7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion k9mail/src/main/java/com/fsck/k9/activity/Accounts.java
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ public void onCreate(Bundle icicle) {
handler.setViewTitle();

// Handle activity restarts because of a configuration change (e.g. rotating the screen)
nonConfigurationInstance = (NonConfigurationInstance) getLastNonConfigurationInstance();
nonConfigurationInstance = (NonConfigurationInstance) getLastCustomNonConfigurationInstance();
if (nonConfigurationInstance != null) {
nonConfigurationInstance.restore(this);
}
Expand Down
2 changes: 1 addition & 1 deletion k9mail/src/main/java/com/fsck/k9/activity/FolderList.java
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ private void initializeActivityView() {

@SuppressWarnings("unchecked")
private void restorePreviousData() {
final Object previousData = getLastNonConfigurationInstance();
final Object previousData = getLastCustomNonConfigurationInstance();

if (previousData != null) {
adapter.mFolders = (ArrayList<FolderInfoHolder>) previousData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ public void onTextChanged(CharSequence s, int start, int before, int count) {

setTitle();

currentMessageBuilder = (MessageBuilder) getLastNonConfigurationInstance();
currentMessageBuilder = (MessageBuilder) getLastCustomNonConfigurationInstance();
if (currentMessageBuilder != null) {
setProgressBarIndeterminateVisibility(true);
currentMessageBuilder.reattachCallback(this);
Expand Down

0 comments on commit a82cec7

Please sign in to comment.