1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00
Commit graph

317 commits

Author SHA1 Message Date
Po Lu
db8f7ed7f6 Enable customization of the quit key on Android
* doc/emacs/android.texi (Android Windowing):

* doc/emacs/input.texi (On-Screen Keyboards): Document various
tidbits related to the quit key.

* java/org/gnu/emacs/EmacsNative.java (getQuitKeycode): New
function.

* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow): Rename
`lastVolumeButtonRelease' to `lastQuitKeyRelease'.
(onKeyUp): Treat value returned by getQuitKeycode as the quit
key rather than mandate KEYCODE_VOLUME_DOWN.

* src/android.c (getQuitKeycode): Implement new function.

* src/androidterm.c (syms_of_androidterm)
<android_quit_keycode>: New variable.
2024-04-27 10:47:12 +08:00
Po Lu
cd56e85c08 ; Fix default Android tile mode
* java/org/gnu/emacs/EmacsGC.java (markDirty): Use rather REPEAT
than MIRROR.
2024-04-23 17:09:50 +08:00
Po Lu
b9c191d690 Implement face stipples on Android
* .gitignore:

* java/Makefile.in: Fix typos.

* java/org/gnu/emacs/EmacsFillRectangle.java (perform): Call
blitOpaqueStipple if filling an unobscured rectangle with an
opaque stipple.

* java/org/gnu/emacs/EmacsGC.java (EmacsGC) <tileObject>: New
field.
(markDirty): Synchronize the current stipple with tileObject.
(prepareStipple, blitOpaqueStipple): New functions.

* java/org/gnu/emacs/EmacsService.java (EmacsService)
<resources>: New static field.
(onCreate): Set it.

* src/android.c (android_create_bitmap_from_data): Correct order
of arguments to android_create_pixmap_from_bitmap_data.
(HAS_BUILTIN_TRAP): Delete macro.
(emacs_abort): Always induce backtraces by means of a NULL
pointer deference.

* src/dispextern.h (Emacs_GC, Emacs_Rectangle, GCForeground)
(GCBackground, GCFillStyle, GCStipple, FillOpaqueStipple)
[HAVE_ANDROID]: Define to their Android counterparts rather
than simulating their existence.

* src/epaths.in: Set bitmap path to /assets/bitmaps on Android.

* src/image.c (image_bitmap_pixmap): Also enable when
HAVE_ANDROID.

* src/sfntfont-android.c (sfntfont_android_put_glyphs): Assert
that this is never called to draw a stippled background.
* src/xfaces.c (x_create_gc) [HAVE_ANDROID]: Redefine as
wrapper around android_create_gc.
(prepare_face_for_display) [HAVE_ANDROID]: Enable stipples.
2024-04-23 14:30:38 +08:00
Po Lu
931cd93313 ; * java/Makefile.in: Fix typos. 2024-04-22 16:37:01 +08:00
Po Lu
3bcdf010a9 Generate Android shared library list automatically
* .gitignore: Ignore new generated files.

* cross/Makefile.in (src/Makefile): Remove leftover
specification of the source Gnulib directory.

* cross/ndk-build/ndk-build.mk.in (NDK_BUILD_READELF): New
variable.

* java/Makefile.in (CONFIG_FILE, ALL_DEPENDENCIES, READELF)
(cf-stamp-1, cf-stamp): New variables and rules; compute the set
of library files in the order of loading and generate a file
with this information.
(ALL_CLASS_FILES): New variable; if builddir is not srcdir,
$($(CONFIG_FILE), $(CLASS_FILES)): Depend on EmacsConfig.java.
add generated files in the build directory.
(classes.dex): Adjust to match.

* java/org/gnu/emacs/EmacsNative.java (EmacsNative)
<static initializer>: Load shared libraries from
EMACS_SHARED_LIBRARIES rather than a hard-coded list.

* m4/ndk-build.m4 (ndk_INIT): Search for readelf...
(ndk_CHECK_MODULES): ...and substitute its path as
NDK_BUILD_READELF.
2024-04-22 16:30:15 +08:00
Po Lu
7d6f4d9085 Fix load order of certain Android shared libraries
* java/org/gnu/emacs/EmacsNative.java (libraryDeps): Move
dependencies of selinux and gnutls before their respective
dependents.
2024-04-22 13:32:34 +08:00
Po Lu
571fd42d48 Eliminate minor wart in EmacsService.java
* java/org/gnu/emacs/EmacsService.java (openContentUri): Replace
arg BYTES with URI and change its type to String.

* src/android.c (android_init_emacs_service):

* src/androidvfs.c (android_authority_name)
(android_authority_open): Adjust commentary and code to match.
2024-04-20 20:46:17 +08:00
Po Lu
2675c2824f * java/INSTALL: Update instructions. 2024-04-19 17:39:29 +08:00
Po Lu
c19b988c29 Correctly verify availability of Android content URIs
* java/org/gnu/emacs/EmacsService.java (checkContentUri): Call
checkUriPermission with IPC-effective PID and UID rather than
checkCallingUriPermission, which never considers permissions of
Emacs itself, and delete the now-redundant workaround.
2024-04-18 10:38:22 +08:00
Po Lu
2823eae0b7 Remove leftover tasks from previous Emacs sessions on startup
* java/org/gnu/emacs/EmacsService.java (onCreate): Call
removeOldTasks.

* java/org/gnu/emacs/EmacsWindowManager.java (removeOldTasks):
New function.

* java/proguard.conf: Optimize optimizer configuration.
2024-04-14 10:36:50 +08:00
Po Lu
4fc3771078 Fix task-switching failures on Android 2.3
* java/org/gnu/emacs/EmacsWindowManager.java (registerWindow):
Don't specify F_A_MULTIPLE_TASK on Android 4.4 and earlier.
2024-04-13 11:28:48 +08:00
Po Lu
b9acfd7c2b Optimize R8 configuration
* java/org/gnu/emacs/EmacsWindowManager.java (WindowConsumer):
Mark as package-local.

* java/proguard.conf: List only symbols that must be preserved,
enabling R8 to optimize the remainder.
2024-04-11 10:15:25 +08:00
Po Lu
7720c614af Adjust priority of Emacs background service notification
* java/org/gnu/emacs/EmacsService.java (onStartCommand): Reword
lightly and set importance to IMPORTANCE_LOW.
2024-04-11 09:16:57 +08:00
Po Lu
2733329b46 ; * java/Makefile.in: Render config.status relative to builddir. 2024-04-11 09:16:57 +08:00
Po Lu
15bafc0432 * java/Makefile.in (classes.dex): Make proguard.conf relative to srcdir. 2024-04-10 23:22:38 +08:00
Po Lu
049bdfdaec * java/proguard.conf: New file. 2024-04-10 22:33:33 +08:00
Po Lu
ed88bed3af Optimize generated Android DEX bytecode
* configure.ac (D8): Attempt to locate the bundle where d8 is
installed, detect whether an installation of `r8' is similarly
present, and use this installation in place of d8 if so.

* java/Makefile.in (ANDROID_MIN_SDK, IS_D8_R8): New
substitutions.
(classes.dex): Provide --min-api, --debug or --release and
--pg-conf to d8 or r8.
2024-04-10 22:33:08 +08:00
Po Lu
8ee1dc8f1f Resolve disagreements in accounting of tooltip positions on Android
* java/org/gnu/emacs/EmacsService.java (getLocationInWindow):
New function.

* java/org/gnu/emacs/EmacsWindow.java (translateCoordinates):
Derive "root window" position from the origin point of the
containing activity's window rather than that of the screen,
the two of which differ when "freeform mode" is enabled.
2024-04-07 14:51:29 +08:00
Po Lu
ae296d762b Port new Android window management strategy to Android 5.0
* doc/emacs/android.texi (Android Windowing): Revise to match.

* java/org/gnu/emacs/EmacsWindowManager.java (registerWindow)
(removeWindowConsumer, pruneWindows): Decrease minimum API for
monitoring of tasks to Android 5.0.
(getTaskToken): Ignore misleading documentation and access
baseIntent by way of RecentTaskInfo.
2024-04-07 12:15:39 +08:00
Po Lu
617bd85cd0 Correct typos in and omissions from earlier Android port changes
* java/AndroidManifest.xml.in: Remove duplicate permissions.

* java/org/gnu/emacs/EmacsWindowManager.java
(removeWindowConsumer): Disregard isFinishing for non-initial
activities.
2024-04-06 11:17:49 +08:00
Po Lu
aad63f935f Enable relinquishing access to Android content directories
* doc/emacs/android.texi (Android Document Providers): Document
new command.

* java/org/gnu/emacs/EmacsService.java (relinquishUriRights):
New function.

* src/Makefile.in (SOME_MACHINE_OBJECTS): Add androidvfs.c.

* src/android.c (android_init_emacs_service): Link to new
function.

* src/android.h (struct android_emacs_service)
<relinquish_uri_rights>: New field.

* src/androidfns.c:

* src/androidvfs.c (android_saf_tree_name)
(android_saf_tree_opendir): Minor adjustments to commentary.
(Fandroid_relinquish_directory_access): New function.
(syms_of_androidvfs): Define new subr.
2024-04-05 15:04:09 +08:00
Po Lu
42c0603c7a Avoid destroying windows after they are unmapped
* java/org/gnu/emacs/EmacsActivity.java (destroy): Detach from
current window before calling finish.

* java/org/gnu/emacs/EmacsWindow.java (reparentTo): Don't clear
attachment state here...

* java/org/gnu/emacs/EmacsWindowManager.java (detachWindow):
...but do so here instead.
2024-04-04 09:53:07 +08:00
Po Lu
48dc75f235 ; * java/org/gnu/emacs/EmacsView.java (onKeyDown): Delete debugging code. 2024-04-03 20:43:42 +08:00
Po Lu
1f5a2c75e6 Prevent detachWindow from deleting frames
* java/org/gnu/emacs/EmacsWindowManager.java (detachWindow):
Remove WINDOW from the window list prior to pruning.
2024-04-03 20:41:08 +08:00
Po Lu
a0da5d04ba ; * java/org/gnu/emacs/EmacsWindow.java (reparentTo): Typo. 2024-04-03 20:33:58 +08:00
Po Lu
7df66b4762 Better align Emacs window management with Android task lifecycles
* java/org/gnu/emacs/EmacsActivity.java (onCreate): Permit
overriding by child classes.
(onDestroy): Minor stylistic adjustments.
(getAttachmentToken): New function.

* java/org/gnu/emacs/EmacsMultitaskActivity.java (onCreate)
(getAttachmentToken): New functions.

* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow):
<attachmentToken, preserve, previouslyAttached>: New variables.
(onActivityDetached): Remove redundant isFinishing argument.
(reparentTo): Reset the foregoing fields before registering with
the window manager.

* java/org/gnu/emacs/EmacsWindowManager.java
(EmacsWindowManager): Rename from EmacsWindowAttachmentManager.
(WindowConsumer): New function getAttachmentToken.
(isWindowEligible): New function.
(registerWindowConsumer, registerWindow, removeWindowConsumer)
(detachWindow): Implement a new window management strategy on
API 29 and subsequent releases where both varieties of toplevel
window are permanently, except when reparented, bound to the
activities to which they attach, and Emacs establishes at
strategic junctures whether those activities remain present.
(getTaskToken, pruneWindows): New functions.
2024-04-03 20:31:22 +08:00
Mattias Engdegård
1135ce461d Always enable native JSON support and remove Jansson references
* src/json.c (Fjson__available_p): Remove.
* lisp/subr.el (json-available-p): Always return t.
* admin/nt/dist-build/build-dep-zips.py:
* configure.ac:
* doc/lispref/text.texi (Parsing JSON):
* java/INSTALL:
* java/org/gnu/emacs/EmacsNative.java (EmacsNative):
* lisp/term/w32-win.el (dynamic-library-alist):
* m4/ndk-build.m4 (ndk_INIT):
* msdos/sed1v2.inp:
* nt/INSTALL:
* nt/INSTALL.W64:
* src/Makefile.in:
* src/emacs.c (main):
* src/lisp.h:
Remove JSON configuration options and references to it and Jansson from
documentation and build files.
* etc/NEWS: Announce.
2024-03-30 15:19:56 +01:00
Po Lu
4c9926fed1 Rationalize java/Makefile.in
* java/Makefile.in: (emacs.apk-in): Bring commentary up to date,
and package classes.dex at this stage of the process.
($(APK_NAME)): Adjust to match.
2024-03-30 09:59:36 +08:00
Po Lu
c3684b9788 ; * java/org/gnu/emacs/EmacsActivity.java (isReallyFinishing): Fix typo. 2024-03-29 08:26:48 +08:00
Po Lu
755665d95a Prevent Android OS task trimming from deleting Emacs frames
* doc/emacs/android.texi (Android Windowing): Document proviso
on Android 7.0 and later.

* java/org/gnu/emacs/EmacsActivity.java (EmacsActivity)
<timeOfLastInteraction>: New field.
(onStop, onResume): Set and clear timeOfLastInteraction.
(isReallyFinishing): New function.
(onDestroy): Don't delete frame even in the event isFinishing
returns true if more than 4 hours have elapsed since the
activity last moved into the background.
2024-03-29 08:26:48 +08:00
Po Lu
5a7c46355b Remove IME_FLAG_FORCE_ASCII from password input IME flags
* java/org/gnu/emacs/EmacsView.java (onCreateInputConnection):
Passwords might also be non-ASCII, and this flag apparently
requests an IME limited to ASCII characters, rather than just
capable of ASCII input.
2024-03-27 10:03:15 +08:00
Po Lu
b7b9a0a5c1 Prevent focus "stalemates" on Android
* java/org/gnu/emacs/EmacsActivity.java (invalidateFocus1): New
argument resetWhenChildless.
(invalidateFocus): If a toplevel window has no focus window,
transfer focus to the toplevel itself.
2024-03-26 10:54:39 +08:00
Po Lu
728bf2c9e5 Prevent passwords from being recorded during text conversion
* doc/lispref/commands.texi (Misc Events): Document new value of
text-conversion-style.

* java/org/gnu/emacs/EmacsService.java (EmacsService)
<IC_MODE_PASSWORD>: New constant.

* java/org/gnu/emacs/EmacsView.java (onCreateInputConnection):
Set TYPE_TEXT_VARIATION_PASSWORD and IME_FLAG_FORCE_ASII if mode
is IC_MODE_PASSWORD.

* lisp/subr.el (read-passwd): Set text-conversion-style to
`password'.

* src/androidgui.h (enum android_ic_mode): New value
ANDROID_IC_MODE_PASSWORD.

* src/androidterm.c (android_reset_conversion): Handle
`password'.

* src/buffer.c (syms_of_buffer)
<&BVAR (current_buffer, text_conversion_style)>: Update doc
string.

* src/textconv.c (syms_of_textconv) <Qpassword>: New DEFSYM.
<Vtext_conversion_edits>: Fix typos in doc string.
2024-03-26 10:11:26 +08:00
Po Lu
ba96c4ec56 Port restart-emacs to Android 4.3 and earlier
* java/org/gnu/emacs/EmacsService.java (restartEmacs): Run Emacs
from an alarm if required.
2024-03-25 15:42:23 +08:00
Po Lu
2be41da38e Improve consistency of content file name handling
* java/org/gnu/emacs/EmacsService.java (getDisplayNameHash):
Always encode file names as modified UTF-8, as insurance against
future changes to undocumented behavior of the JVM.
2024-03-24 11:00:47 +08:00
Po Lu
ad0492c5a9 Android compatibility fixes
* doc/emacs/android.texi (Android Windowing): Document
restrictions on number of windows under Android 4.4 and earlier.

* java/AndroidManifest.xml.in <EmacsActivity>
<EmacsOpenActivity, EmacsMultitaskActivity>: Assign each class
of activity a unique task affinity.

* java/org/gnu/emacs/EmacsDesktopNotification.java (display1):
Remove redundant priority assignment.

* java/org/gnu/emacs/EmacsOpenActivity.java (onCreate): Handle
file URIs when processing attachments from a mailto URI, and
check for KitKat before opening content ones.

* java/org/gnu/emacs/EmacsWindow.java <pointerMap>
(figureChange): Replace coordinate HashMap with a SparseArray.

* java/org/gnu/emacs/EmacsWindowAttachmentManager.java
(registerWindow): Don't specify FLAG_ACTIVITY_NEW_DOCUMENT on
systems where it is absent.
2024-03-21 14:23:40 +08:00
Po Lu
e72f17e462 Respect file display names during Android drag-and-drop
* java/org/gnu/emacs/EmacsService.java (buildContentName):
Remove redundant projection argument to resolver.query.

* java/org/gnu/emacs/EmacsWindow.java (onDragEvent): If a
content resolver is available, attempt to convert content URIs
into file names in advance.

* lisp/term/android-win.el (android-handle-dnd-event): Adjust
correspondingly.
2024-03-20 10:23:42 +08:00
Po Lu
f2e239c6a7 Respect display names of Android content URIs
* java/org/gnu/emacs/EmacsNative.java (displayNameHash): New
function.

* java/org/gnu/emacs/EmacsService.java (buildContentName): New
argument RESOLVER.  Generate names holding URI's display name if
available.  All callers changed.

* lisp/international/mule-cmds.el (set-default-coding-systems):
Fix file name coding system as utf-8-unix on Android as on Mac
OS.

* src/androidvfs.c (enum android_vnode_type): New enum
ANDROID_VNODE_CONTENT_AUTHORITY_NAMED.
(android_content_name): Register root directories for this new
type.
(displayNameHash): New function.
(android_get_content_name): New argument WITH_CHECKSUM.  If
present, treat the final two components as a pair of checksum
and display name, and verify and exclude the two.
(android_authority_name): Provide new argument as appropriate.
(android_authority_initial_name): New function.
2024-03-19 12:08:17 +08:00
Po Lu
7a0f4de3c1 Improve C++ standard library detection on Android
* configure.ac: Stop relaying --with-ndk-cxx-shared to the
nested invocation of configure.

* build-aux/ndk-build-helper-1.mk (SYSTEM_LIBRARIES):

* build-aux/ndk-build-helper-2.mk (SYSTEM_LIBRARIES): Insert all
of the C++ libraries available on Android.

* configure.ac: Call ndk_LATE and ndk_LATE_EARLY within if
statement at toplevel, averting needless calls to AC_PROG_CXX.

* cross/ndk-build/Makefile.in (NDK_BUILD_CXX_STL)
(NDK_BUILD_CXX_LDFLAGS):

* cross/ndk-build/ndk-build.mk.in (NDK_BUILD_CXX_STL)
(NDK_BUILD_CXX_LDFLAGS): New variables.

* cross/ndk-build/ndk-resolve.mk (NDK_SYSTEM_LIBRARIES):
Introduce several other C++ libraries sometimes present on
Android.
(NDK_SO_EXTRA_FLAGS_$(LOCAL_MODULE)): Insert NDK_BUILD_CXX_STL
when any of these new C++ libraries are requested.

* m4/ndk-build.m4: Completely rewrite C++ compiler and library
detection.

* java/org/gnu/emacs/EmacsNative.java (EmacsNative): Attempt to
load more libraries from static initializer.

* java/INSTALL: Remove obsolete information.
2024-03-17 19:34:09 +08:00
Po Lu
db5c8bda63 ; * java/org/gnu/emacs/EmacsDesktopNotification.java (display1): Another fix. 2024-03-14 08:24:42 +08:00
Po Lu
e7e285ec34 Fix crash when displaying notifications on Android 3.0
* java/org/gnu/emacs/EmacsDesktopNotification.java (display1):
Don't call setPriority until Jelly Bean.
2024-03-13 15:35:40 +08:00
Po Lu
6b40d557c4 Port more notification senders to non-XDG systems
* doc/lispref/os.texi (Desktop Notifications): Document that
`:timeout' is now implemented.

* java/org/gnu/emacs/EmacsDesktopNotification.java
(EmacsDesktopNotification): New field delay.
(display1): Set delay on Android 8.0 and up.

* lisp/erc/erc-desktop-notifications.el
(erc-notifications-notify): Call Android or Haiku notification
functions on those systems.

* lisp/gnus/gnus-notifications.el (gnus-notifications-action)
(gnus-notification-close): Remove dismissed notifications from
the notification to message map.
(gnus-notifications-notify): Call android-notifications-notify
if possible.

* src/androidselect.c (android_init_emacs_desktop_notification):
Update accordingly.
(android_notifications_notify_1): New argument TIMEOUT.
(Fandroid_notifications_notify): New argument QCtimeout.
(syms_of_androidselect) <QCtimeout>: New symbol.
2024-03-13 11:01:39 +08:00
Po Lu
fd293c7c67 ; Check in missing change to AndroidManifest.xml.in
* java/AndroidManifest.xml.in: Register CancellationReceiver.
2024-03-12 10:46:20 +08:00
Po Lu
d7ded99608 Implement notification residency on Android
* doc/lispref/os.texi (Desktop Notifications): Document support
for `:resident'.

* java/org/gnu/emacs/EmacsService.java (cancelNotification):

* src/android.c (android_init_emacs_service):

* src/android.h (struct android_emacs_service): New function.

* src/androidselect.c (android_notifications_notify_1)
(Fandroid_notifications_notify): New parameter QCresident; save
it within notification lists.
(android_notification_deleted, android_notification_action):
Adjust for changes to the format of notification lists and
cancel non-resident notifications when an action is selected.
(syms_of_androidselect): <QCresident>: New symbol.
2024-03-12 09:48:53 +08:00
Po Lu
bf38783c32 Fix notification cancellation detection on Android
* java/org/gnu/emacs/EmacsDesktopNotification.java (display1):
Don't specify FLAG_ONE_SHOT in cancel intents.
2024-03-12 08:51:52 +08:00
Po Lu
a7a37341ca Implement notification callbacks on Android
* doc/lispref/os.texi (Desktop Notifications): Document that
:on-cancel, :on-action and :actions are now supported on
Android.

* java/org/gnu/emacs/EmacsActivity.java (onNewIntent): New
function.

* java/org/gnu/emacs/EmacsDesktopNotification.java
(NOTIFICATION_ACTION, NOTIFICATION_TAG, NOTIFICATION_DISMISSED):
New constants.  <actions, titles>: New fields.
(insertActions): New function.
(display1, display): Insert actions on Jelly Bean and up, and
arrange to be notified when the notification is dismissed.
(CancellationReceiver): New class.

* java/org/gnu/emacs/EmacsNative.java (sendNotificationDeleted)
(sendNotificationAction): New functions.

* src/android.c (sendDndDrag, sendDndUri, sendDndText): Correct
return types.
(sendNotificationDeleted, sendNotificationAction)
(android_exception_check_5, android_exception_check_6): New
functions.

* src/android.h:

* src/androidgui.h (struct android_notification_event): New
structure.
(union android_event): New member for notification events.

* src/androidselect.c (android_init_emacs_desktop_notification):
Update JNI signatures.
(android_notifications_notify_1, Fandroid_notifications_notify):
New arguments ACTIONS, ACTION_CB and CANCEL_CB.  Convert and
record them as appropriate.
(android_notification_deleted, android_notification_action): New
functions.
(syms_of_androidselect): Prepare a hash table of outstanding
notifications.
<QCactions, QCon_action, QCon_cancel> New defsyms.

* src/androidterm.c (handle_one_android_event)
<ANDROID_NOTIFICATION_DELETED>
<ANDROID_NOTIFICATION_ACTION>: Dispatch event contents to
androidselect.c for processing.

* src/androidterm.h:

* src/androidvfs.c (java_string_class): Export.

* src/keyboard.c (kbd_buffer_get_event) <NOTIFICATION_EVENT>:
Call callback specified by the event.

* src/termhooks.h (enum event_kind) [HAVE_ANDROID]: New
enum NOTIFICATION_EVENT.
2024-03-11 21:41:14 +08:00
Po Lu
18b6289adf ; * java/org/gnu/emacs/EmacsPreferencesActivity.java: Fix commentary. 2024-03-10 10:37:14 +08:00
Po Lu
e4d1739a29 Declare 124 new Android permissions
* doc/emacs/android.texi (Android Environment): Document new
permissions and delete recently introduced permissions from the
list for Android 5.1 and earlier.

* java/AndroidManifest.xml.in: Declare 124 new permissions to
enable invoking features they protect from code running inside
Emacs.
2024-03-08 10:58:17 +08:00
Po Lu
8d5983aa78 Fix bug#69321
* java/org/gnu/emacs/EmacsWindow.java (onKeyDown, onKeyUp):
Provide Right Alt (Alt Gr) masks to system keymap routines.
(bug#69321)
2024-02-24 10:01:57 +08:00
Po Lu
0a4d4781dd * java/org/gnu/emacs/EmacsContextMenu.java (display): Reduce timeout. 2024-02-21 21:55:48 +08:00