Fix crash when activity not attached after search index finishes.
When search indexing completes, check for valid activity before proceeding with further operations. Change-Id: I7c72aa358574f79e2184d60bc9d0241595ea5d3b Fix: 38198223 Test: make RunSettingsRoboTests
This commit is contained in:
@@ -291,6 +291,9 @@ public class SearchFragment extends InstrumentedFragment implements SearchView.O
|
||||
*/
|
||||
@Override
|
||||
public void onIndexingFinished() {
|
||||
if (getActivity() == null) {
|
||||
return;
|
||||
}
|
||||
if (mShowingSavedQuery) {
|
||||
mSavedQueryController.loadSavedQueries();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user