mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-04 06:20:26 +00:00
Prevent crash
This commit is contained in:
parent
3c0e6a4f63
commit
c759c90b41
1 changed files with 20 additions and 1 deletions
|
@ -88,7 +88,26 @@ public class FragmentDialogFolder extends FragmentDialogBase {
|
|||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
if (hasFocus)
|
||||
etSearch.showDropDown();
|
||||
try {
|
||||
etSearch.showDropDown();
|
||||
} catch (Throwable ex) {
|
||||
Log.w(ex);
|
||||
/*
|
||||
Caused by: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?
|
||||
at android.view.ViewRootImpl.setView(ViewRootImpl.java:958)
|
||||
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:381)
|
||||
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:100)
|
||||
at android.widget.PopupWindow.invokePopup(PopupWindow.java:1467)
|
||||
at android.widget.PopupWindow.showAsDropDown(PopupWindow.java:1316)
|
||||
at android.widget.ListPopupWindow.show(ListPopupWindow.java:740)
|
||||
at android.widget.AutoCompleteTextView.showDropDown(AutoCompleteTextView.java:1226)
|
||||
at eu.faircode.email.FragmentDialogFolder$1.onFocusChange(SourceFile:91)
|
||||
at android.view.View.onFocusChanged(View.java:7573)
|
||||
at android.widget.TextView.onFocusChanged(TextView.java:10958)
|
||||
at android.widget.EditText.onFocusChanged(EditText.java:277)
|
||||
at android.widget.AutoCompleteTextView.onFocusChanged(AutoCompleteTextView.java:1125)
|
||||
*/
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue