Added fail-safe

pull/208/head
M66B 3 years ago
parent 388af6e7c5
commit 5a8763a7dc

@ -1527,6 +1527,7 @@ public class Helper {
} }
static boolean isKeyboardVisible(final View view) { static boolean isKeyboardVisible(final View view) {
try {
if (view == null) if (view == null)
return false; return false;
View root = view.getRootView(); View root = view.getRootView();
@ -1538,6 +1539,10 @@ public class Helper {
boolean visible = insets.isVisible(WindowInsetsCompat.Type.ime()); boolean visible = insets.isVisible(WindowInsetsCompat.Type.ime());
Log.i("isKeyboardVisible=" + visible); Log.i("isKeyboardVisible=" + visible);
return visible; return visible;
} catch (Throwable ex) {
Log.e(ex);
return false;
}
} }
static String getViewName(View view) { static String getViewName(View view) {

Loading…
Cancel
Save