Merge pull request #2380 from k9mail/GH-2282_fix_crash_with_old_intent_extra
Continue to support old 'search' extra in MessageList Intent
This commit is contained in:
commit
b901b81882
1 changed files with 8 additions and 2 deletions
|
@ -72,8 +72,11 @@ public class MessageList extends K9Activity implements MessageListFragmentListen
|
||||||
MessageViewFragmentListener, OnBackStackChangedListener, OnSwipeGestureListener,
|
MessageViewFragmentListener, OnBackStackChangedListener, OnSwipeGestureListener,
|
||||||
OnSwitchCompleteListener {
|
OnSwitchCompleteListener {
|
||||||
|
|
||||||
// for this activity
|
@Deprecated
|
||||||
private static final String EXTRA_SEARCH = "search";
|
//TODO: Remove after 2017-09-11
|
||||||
|
private static final String EXTRA_SEARCH_OLD = "search";
|
||||||
|
|
||||||
|
private static final String EXTRA_SEARCH = "search_bytes";
|
||||||
private static final String EXTRA_NO_THREADING = "no_threading";
|
private static final String EXTRA_NO_THREADING = "no_threading";
|
||||||
|
|
||||||
private static final String ACTION_SHORTCUT = "shortcut";
|
private static final String ACTION_SHORTCUT = "shortcut";
|
||||||
|
@ -431,6 +434,9 @@ public class MessageList extends K9Activity implements MessageListFragmentListen
|
||||||
mSearch.addAccountUuid(LocalSearch.ALL_ACCOUNTS);
|
mSearch.addAccountUuid(LocalSearch.ALL_ACCOUNTS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (intent.hasExtra(EXTRA_SEARCH_OLD)) {
|
||||||
|
mSearch = intent.getParcelableExtra(EXTRA_SEARCH_OLD);
|
||||||
|
mNoThreading = intent.getBooleanExtra(EXTRA_NO_THREADING, false);
|
||||||
} else {
|
} else {
|
||||||
// regular LocalSearch object was passed
|
// regular LocalSearch object was passed
|
||||||
mSearch = intent.hasExtra(EXTRA_SEARCH) ?
|
mSearch = intent.hasExtra(EXTRA_SEARCH) ?
|
||||||
|
|
Loading…
Reference in a new issue