aboutsummaryrefslogtreecommitdiffstats
path: root/java (unfollow)
Commit message (Collapse)AuthorFilesLines
2025-05-18; Bump Emacs version to 30.1.90Eli Zaretskii1-1/+1
* README: * configure.ac: * exec/configure.ac: * java/AndroidManifest.xml.in (Version-code): * nt/README.W32: * msdos/sed2v2.inp: Bump Emacs version to 30.1.90.
2025-04-27Fix the Android buildPo Lu1-1/+1
* java/README.res: Move from java/res/README, as the AAPT does not permit non-resource files in resource directories.
2025-04-20; * java/res/README: Note origin of emacs_wrench.png.Sean Whitton1-0/+4
2025-04-10Respond to display configuration updates on AndroidPo Lu3-16/+64
* java/org/gnu/emacs/EmacsNative.java (sendConfigurationChanged): Declare function. * java/org/gnu/emacs/EmacsSdk7FontDriver.java (Sdk7FontEntity) (Sdk7FontObject): Do not access `metrics' field deleted from `EmacsService'. * java/org/gnu/emacs/EmacsService.java (EmacsService) <metrics, resources>: Delete fields. <dpiX, dpiY, dpiScaled>: New fields. (onCreate): Adjust accordingly. Record current display metrics for subsequent comparison. (onConfigurationChanged): New function. * lisp/dynamic-setting.el (font-setting-change-default-font): Enable on systems where font-get-system-font is not defined if invoked with SET-FONT nil. * src/android.c (sendConfigurationChanged): New function. * src/androidgui.h (ANDROID_CONFIGURATION_CHANGED): New enumerator. (struct android_configuration_changed): New structure. (union android_event): Add `config' member. * src/androidterm.c (handle_one_android_event): Handle ANDROID_CONFIGURATION_CHANGED events. (syms_of_androidterm): Define Qfont_render, and Qdynamic_setting. Provide the latter.
2025-03-26; Remove obsolete file `java/incrementing-version-code'.Po Lu1-0/+0
2025-03-22Remove ctags programPaul Eggert1-3/+1
Remove our old ctags and suggest Universal Ctags instead. This fixes a FIXME in lib-src/Makefile.in and speeds up compilation quite a bit on my older CPU when I compile with --enable-gcc-warnings. It also lessens installation and runtime footprint. (Bug#76322) * .gitignore: Remove lib-src/ctags. * admin/authors.el (authors-renamed-files-alist): Remove ctags.1. * admin/check-man-pages: ctags.1 is no longer a special case. * admin/quick-install-emacs (PUBLIC_LIBSRC_BINARIES): Remove ctags. * cross/Makefile.in (LIBSRC_BINARIES): Remove lib-src/ctags. * doc/man/ctags.1, lib-src/ctags.c: Remove. * java/Makefile.in (CROSS_LIBSRC_BINS): Remove ctags. * lib-src/Makefile.in (INSTALLABLES): Remove ctags${EXEEXT}. (ctags${EXEEXT}): Remove. * lib-src/etags.c (CTAGS): Remove. All uses replaced by ... (ctags): ... this new static var. (STDIN): Remove macro. All uses replaced by new STDIN_OPTION constant. (CTAGS_OPTION, STDIN_OPTION): New contants. (longopts): New --ctags option. (ctags_default_C_help): New constant, to override default_C_help at runtime. (default_C_help): Now always the etags version. (C_LANG_NAMES_INDEX): New macro. (print_language_names): Do not assume etags. (PROGRAM_NAME): Remove. All uses removed. (print_help): Document --ctags if PRINT_UNDOCUMENTED_OPTIONS_HELP. (main): Support new --ctags option, and support all [ce]tags options. * test/manual/etags/Makefile (CTAGS_PROG): Now etags --ctags, since there is no longer a ctags.
2025-03-20; * java/org/gnu/emacs/EmacsInputConnection.java: Fix commentary typo.Po Lu1-3/+3
2025-03-09; * java/org/gnu/emacs/EmacsWindow.java (viewLayout): Typo in comment.Po Lu1-1/+1
2025-03-06; * java/AndroidManifest.xml.in (Version-code): Update for Emacs 30.0.50.Po Lu1-1/+1
2025-03-05; * java/AndroidManifest.xml.in (Version-code): Update for Emacs 31.Po Lu1-1/+1
2025-03-05Move java/incrementing-version-code to AndroidManifest.xml.inPo Lu2-12/+15
* admin/admin.el (admin-android-version-code-regexp): New variable. (set-version): Modify AndroidManifest.xml.in instead. * java/AndroidManifest.xml.in (Version-code): Define version code. * java/incrementing-version-code: Delete file.
2025-03-05Provide an Android version code derived from the Emacs versionPeter Oliver1-0/+12
The version code is intended to be an integer that increments for each Android package release (https://developer.android.com/studio/publish/versioning#versioningsettings). If we keep this updated under version control, then F-Droid (a third-party Android package repository), can watch for that, and use it to automatically build Emacs packages for Android each time a new Emacs release is tagged (https://f-droid.org/en/docs/Build_Metadata_Reference/#UpdateCheckData). * admin/admin.el (set-version): Update version code in java/incrementing-version-code * java/incrementing-version-code: New file containing an Android version code corresponding to the current Emacs version. (bug#75809)
2025-03-04Circumvent another styling issue in Android 15 QPR1Po Lu1-0/+12
* java/org/gnu/emacs/EmacsView.java (popupMenu): On Android 15 and later, reload the default theme before displaying popup menus.
2025-03-03Fix styling issues on Android 15 QPR1Po Lu4-23/+65
* java/org/gnu/emacs/EmacsView.java (EmacsView): Guarantee that frame views are created with the correct theme. * java/res/values-v20/style.xml (EmacsStyle): * java/res/values-v29/style.xml (EmacsStyle): Disable a swiping gesture enabled on certain Android systems. * java/res/values-v35/style.xml: Rename from `styles'.xml.
2025-02-19Fix remaining Android bugs reported over the past monthsPo Lu4-22/+69
* java/org/gnu/emacs/EmacsActivity.java (attachWindow): Guarantee that child windows promoted to toplevels receive layout parameters that direct them to receive their parents' dimensions. Otherwise, the size of the window as a child is retained on Huawei HarmonyOS 4.2 and possibly other Android distributions. * java/org/gnu/emacs/EmacsService.java (updateCursorAnchorInfo): Run anchor updates on the UI thread, as `InputMethodManager#updateCursorAnchorInfo' is liable to call `View#requestLayout'. * java/org/gnu/emacs/EmacsView.java (onMeasure): Always call `measureChildren', or child frames' onLayout handlers might not be invoked after they request a layout cycle and are duly processed in `onLayout'. (swapBuffers): Delete erroneous commentary. * java/org/gnu/emacs/EmacsWindow.java (viewLayout): If overrideRedirect, don't inadvertently clear rect.left and rect.top by recording the window's WM window-relative position. Fix typos. (reparentTo): Invalidate focus after transferring frame. (translateCoordinates): Account for override-redirect windows. Mostly important for mouse-drag-and-drop-region.
2025-02-19Properly move existing tooltips on AndroidPo Lu1-2/+11
* java/org/gnu/emacs/EmacsWindow.java (requestViewLayout): If an override redirect window, additionally notify the window manager of layout changes.
2025-02-17Fix crash in frame deletion on AndroidPo Lu1-2/+8
* java/org/gnu/emacs/EmacsWindow.java (destroyHandle): Invalidate the input focus in the UI thread, as is proper.
2025-02-07Prevent crash when requesting storage permissions on AndroidPo Lu1-1/+10
* java/org/gnu/emacs/EmacsService.java (requestStorageAccess30): Handle ActivityNotFoundException.
2025-01-02Update copyright year to 2025Stefan Kangas58-58/+58
Run "TZ=UTC0 admin/update-copyright".
2025-01-01Update copyright year to 2025Paul Eggert59-59/+59
Run "TZ=UTC0 admin/update-copyright".
2024-09-18Fix layout of preferences activity on Android 35Po Lu1-0/+11
* java/org/gnu/emacs/EmacsPreferencesActivity.java (onCreate): Align list view to system windows.
2024-09-05Better port to Android 35Po Lu2-2/+31
* java/INSTALL: Don't refer users to build-tools 33.0.x. * java/res/values-v35/styles.xml: New dark theme; define status bar colors properly for this release.
2024-09-04Port to Android 35Po Lu4-13/+48
* configure.ac: Temporary workaround for Gnulib bug. Verify that the provided android.jar corresponds to Android 35, or any later version. * cross/ndk-build/Makefile.in (NDK_BUILD_SO_LDFLAGS): New variable. * cross/ndk-build/ndk-resolve.mk (NDK_LOCAL_A_NAMES_$(LOCAL_MODULE)): Define to NDK_BUILD_SO_LDFLAGS by default to enable building binaries with support for 16 kb page sizes. * java/AndroidManifest.xml.in: Target SDK 35. * java/INSTALL (16KB PAGE SIZES): New section. Replace references to Android 34 with 35. * java/org/gnu/emacs/EmacsActivity.java (onCreate): Restore pre-SDK 35 inset-relative placement. * java/org/gnu/emacs/EmacsFillPolygon.java (perform): Suppress deprecation warnings, and document why. * m4/ndk-build.m4 (ndk_INIT, ndk_LATE): Check for and enable toolchain support for 16 KB page sizes, if available. (ndk_CONFIG_FILES): Export linker options so derived. * src/conf_post.h [__ANDROID_API__ < 35]: Include system time.h and redefine timezone_t to rpl_timezone_t, so that the Gnulib replacement may not conflict with the useless OS type.
2024-08-09Register for more Intents actions on AndroidPo Lu2-5/+6
* java/AndroidManifest.xml.in <EmacsOpenActivity>: Register for SEND Intents with mailto URIs. * java/org/gnu/emacs/EmacsOpenActivity.java (onCreate): Use Intent constants rather than string literals.
2024-07-18; Fix typosStefan Kangas1-1/+1
2024-07-18Port better to Android 3.0Po Lu1-4/+4
* java/org/gnu/emacs/EmacsNoninteractive.java (main): Use the old getPackageInfo calling convention if it exists rather than on Android 2.3.3 and earlier.
2024-07-14Do not set LD_LIBRARY_PATH during Android initializationPo Lu1-113/+137
* doc/emacs/android.texi (Android Environment): Adjust documentation to match. * java/org/gnu/emacs/EmacsNoninteractive.java (main1): New function. Remove initialization of EmacsNative hither. (main): Acquire an ApplicationInfo or LoadedApk, as the case may be on the host system, derive a ClassLoader from the result, and load and call `main1' from within this class loader. * src/android-emacs.c (main): * src/android.c (setEmacsParams): Do not override LD_LIBRARY_PATH or set EMACS_LD_LIBRARY_PATH. This enables Emacs to execute subprocesses in certain "fortified" Android systems, amongst other things.
2024-07-11Take precautions against ill-formed content URIsPo Lu1-1/+17
* java/org/gnu/emacs/EmacsService.java (openContentUri) (checkContentUri): Verify that URIs derived from user-provided file names can be parsed before attempting to open them.
2024-07-08Correct conditions for iconification on AndroidPo Lu1-14/+9
* java/org/gnu/emacs/EmacsActivity.java (EmacsActivity) <isPaused>: Rename to <isStopped>. (attachWindow): Adjust to match. (onPause): Delete function. (onStop): Deem frames iconified after calls to onStop instead.
2024-07-01* java/res/mipmap-v26/emacs_icon.xml: Define monospace icon.Po Lu1-0/+1
2024-06-30Improve Android "adaptive icon"Po Lu2-27/+25
* java/res/drawable/emacs_background.xml: * java/res/drawable/emacs_foreground.xml: Transform borders and gradient colors to better align with the original.
2024-06-30Respect --disable-build-details in Android buildsPo Lu1-3/+7
* java/Makefile.in (BUILD_DETAILS, GEN_BUILD_DETAILS): New variables. (install_tmp): Tolerate failures in generation of metadata files and prefix commands for such generation with GEN_BUILD_DETAILS. * lisp/version.el (android-read-build-system) (android-read-build-time): Return nil if metadata file does not exist.
2024-06-27Prevent crashes and related issues if initial activity is destroyed on AndroidPo Lu2-7/+47
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow) <initialWindowCreated>: New variable. (EmacsWindow): If the initial frame has not yet been created, set attachmentToken to -1. * java/org/gnu/emacs/EmacsWindowManager.java (registerWindow): When the window's attachment token is -1 (i.e., it is the default window), start EmacsActivity rather than EmacsMultitaskActivity. Catch exceptions around startActivity.
2024-06-24Fix omission of updates to child frames on AndroidPo Lu2-23/+17
* java/org/gnu/emacs/EmacsView.java (onAttachedFromWindow): Force a layout cycle rather than report exposure immediately. (prepareForLayout): Delete function. * java/org/gnu/emacs/EmacsWindow.java (mapWindow): Remove redundant calls to prepareForLayout. * src/androidterm.c (handle_one_android_event): Do not swap buffers when exposure is registered by a frame only partially updated.
2024-06-19Avoid races between the tooltip and compositor on X and AndroidPo Lu1-1/+1
* java/org/gnu/emacs/EmacsView.java (onLayout): Don't send exposure events when the window is still to be attached. * src/androidfns.c (Fx_show_tip): * src/xfns.c (Fx_show_tip): Block async input around initial frame update.
2024-06-18Fix window class of Android tooltipsPo Lu1-1/+1
* java/org/gnu/emacs/EmacsWindow.java (getWindowLayoutParams): Declare as a panel, rather than an attached dialog.
2024-06-18* java/Makefile.in (emacs.apk-in): Don't compress *.gz files on SDK 8.Po Lu1-1/+1
2024-06-17Reinforce bitmap reconfiguration on AndroidPo Lu1-68/+93
* java/org/gnu/emacs/EmacsView.java (EmacsView) <unswapped>: New field in which to record whether the back buffer has received contents beyond those present at the last buffer swap. <dimensionsLock>: Delete field. (onAttachedToWindow, onLayout, handleDirtyBitmap) (prepareForLayout): Rather, synchronize window dimensions with the view. (getCanvas, getBitmap): Do not reconfigure the back buffer bitmap if such outstanding data exists. (postSwapBuffers): New function. (swapBuffers): If such outstanding data exists and the back bufferis pending reconfiguration, recreate the back buffer and report exposure. * src/androidterm.c (handle_one_android_event): Fix indentation.
2024-06-16; Fix typosStefan Kangas1-2/+2
2024-06-16Minor adjustments to battery.el on AndroidPo Lu1-2/+2
* src/android.c (android_query_battery): * java/org/gnu/emacs/EmacsService.java (queryBattery19) (queryBattery): Reorder items in value for consistency with Fandroid_query_battery. * lisp/battery.el (battery-status-function): Select battery-android only when android-query-battery is present. (battery-android): Return temperature and correct values of power source constants.
2024-06-16Simplify bitmap reallocation on AndroidPo Lu1-18/+17
* java/org/gnu/emacs/EmacsView.java: Update outdated commentary. (handleDirtyBitmap): Don't copy contents of the previous bitmap to the new. (onLayout): Unconditionally expose upon layout changes.
2024-06-12Restore omitted dependencyPo Lu1-1/+2
* java/Makefile.in (install_temp): Depend on $(libsrc)/asset-directory-tool.
2024-06-12Restore functionality on Android 2.2Po Lu1-1/+3
* java/Makefile.in (install_temp): Do not compress directory-tree and generate such files in a special format that stores file sizes. * lib-src/asset-directory-tool.c (struct directory_tree): New field st_size. (need_file_size): New variable. (main_1, main_2, main): Write file sizes before sibling offsets if `--api-8' is specified. * src/android-asset.h (struct android_asset_manager): New field open. (struct android_asset): New field name. (AAssetManager_fromJava): Load AssetManager#open. (AAssetManager_open): If a directory tree has already been loaded, search for a matching asset and load its size thence, to avoid the requirement of an AssetFileDescriptor. (AAsset_close): Don't assume asset->fd exists. Release asset->name. (AAsset_getLength): Likewise. (android_asset_create_stream): If asset->name exists, call AssetManager#open, in order to open compressed files. * src/androidvfs.c (OLD_ANDROID_ASSETS): Define to 1 on API 8. (android_extract_long, android_scan_directory_tree): Mark arguments as const. Adjust offsets when OLD_ANDROID_ASSETS. (android_is_directory, android_init_assets, android_afs_readdir): Likewise. * src/lread.c (lread_fstat): Define to sys_fstat, not fstat.
2024-06-12; * java/Makefile.in: Fix typo.Po Lu1-1/+1
2024-06-12Improve compression of Emacs packages on Android 2.2Po Lu2-31/+100
* configure.ac (ZIP): Search for a `zip' executable and substitute the same if targeting SDK 8. * java/INSTALL: Document new requirement. * java/Makefile.in (GZIP_PROG, ZIP): New substitutions. (.PHONY): Delete references to directory-tree. (install_temp): On SDK 8 and earlier, compress large *.el and Info files with gzip, and divide install_temp into three separate directories, with one for large files, another for gzipped files, and one more for the remainder. (install_temp/assets/directory-tree, install_temp/assets/version) (install_temp/assets/build_info): Merge these rules into install_tmp, that they may execute before the assets directory is split. (emacs.apk-in): Package each directory separately, accounting for their varied compression requirements. * lisp/term/android-win.el (input-decode-map): Define select to return in input-decode-map.
2024-06-11Eliminate some redundant synchronization on AndroidPo Lu2-7/+15
* java/org/gnu/emacs/EmacsService.java (resetIC): Return on all versions of Android if the connection need not be reset. * java/org/gnu/emacs/EmacsView.java (getICMode, setICMode): Remove needless synchronization.
2024-06-07Eliminate Makefile racePo Lu1-2/+6
* java/Makefile.in (cf-stamp): Don't separately depend on NDK_BUILD_SHARED, as this renders make liable to descend into cross/ndk-build twice in different processes. (clean): Don't remove nonexistent file.
2024-06-07; * java/INSTALL (LIBRSVG): Typo.Po Lu1-1/+1
2024-06-07Document compilation of librsvg on AndroidPo Lu1-13/+45
* java/INSTALL (LIBRSVG): New section. (BUILDING WITH OLD NDK VERSIONS): Update recommended invocation of configure in the case of a combined toolchain.
2024-06-06* java/AndroidManifest.xml.in: Revert portions of last change.Po Lu1-2/+0