Skip to content

Commit 147a8d4

Browse files
committed
🔊 Add logging siyuan-note/siyuan#14512
1 parent 4285fbd commit 147a8d4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/src/main/java/org/b3log/siyuan/Utils.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
*
6060
* @author <a href="https://88250.b3log.org">Liang Ding</a>
6161
* @author <a href="https://github.com/wwxiaoqi">Jane Haring</a>
62-
* @version 1.4.0.0, Mar 28, 2025
62+
* @version 1.4.0.1, Apr 6, 2025
6363
* @since 1.0.0
6464
*/
6565
public final class Utils {
@@ -127,20 +127,24 @@ public static String getChannel(final PackageManager pm) {
127127
public static void registerSoftKeyboardToolbar(final Activity activity, final WebView webView) {
128128
KeyboardUtils.registerSoftInputChangedListener(activity, height -> {
129129
if (activity.isInMultiWindowMode()) {
130+
Utils.logInfo("keyboard", "In multi window mode, do not show keyboard toolbar");
130131
return;
131132
}
132133

133134
final long now = System.currentTimeMillis();
134135
if (KeyboardUtils.isSoftInputVisible(activity)) {
135136
webView.evaluateJavascript("javascript:showKeyboardToolbar()", null);
136137
lastShowKeyboard = now;
138+
Utils.logInfo("keyboard", "Show keyboard toolbar");
137139
} else {
138140
if (now - lastShowKeyboard < 500) {
139141
// 短时间内键盘显示又隐藏,强制再次显示键盘 https://github.com/siyuan-note/siyuan/issues/11098#issuecomment-2273704439
140142
KeyboardUtils.showSoftInput(activity);
143+
Utils.logInfo("keyboard", "Force show keyboard");
141144
return;
142145
}
143146
webView.evaluateJavascript("javascript:hideKeyboardToolbar()", null);
147+
Utils.logInfo("keyboard", "Hide keyboard toolbar");
144148
}
145149
});
146150
}

0 commit comments

Comments
 (0)