提交 30eebad5 编写于 作者: B Blankj

see 02/20 log

上级 6117368a
......@@ -267,8 +267,8 @@ public final class KeyboardUtils {
(InputMethodManager) Utils.getApp().getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm == null) return;
String[] leakViews = new String[]{"mLastSrvView", "mCurRootView", "mServedView", "mNextServedView"};
try {
for (String leakView : leakViews) {
for (String leakView : leakViews) {
try {
Field leakViewField = InputMethodManager.class.getDeclaredField(leakView);
if (leakViewField == null) continue;
if (!leakViewField.isAccessible()) {
......@@ -280,8 +280,8 @@ public final class KeyboardUtils {
if (view.getRootView() == activity.getWindow().getDecorView().getRootView()) {
leakViewField.set(imm, null);
}
}
} catch (Throwable ignore) { /**/ }
} catch (Throwable ignore) { /**/ }
}
}
/**
......
......@@ -340,8 +340,8 @@ public final class Utils {
(InputMethodManager) Utils.getApp().getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm == null) return;
String[] leakViews = new String[]{"mLastSrvView", "mCurRootView", "mServedView", "mNextServedView"};
try {
for (String leakView : leakViews) {
for (String leakView : leakViews) {
try {
Field leakViewField = InputMethodManager.class.getDeclaredField(leakView);
if (leakViewField == null) continue;
if (!leakViewField.isAccessible()) {
......@@ -353,8 +353,8 @@ public final class Utils {
if (view.getRootView() == activity.getWindow().getDecorView().getRootView()) {
leakViewField.set(imm, null);
}
}
} catch (Throwable ignore) { /**/ }
} catch (Throwable ignore) { /**/ }
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册