aboutsummaryrefslogtreecommitdiffstats
path: root/java (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Update Android portPo Lu2023-05-011-4/+5
| | | | | | | | | | | | | | | | | | | * Makefile.in (extraclean): Clean in exec as well. * configure.ac: Fix detection of absolute srcdir. Also, pass CFLAGS. * exec/Makefile.in: (.c.o): Add -I. so config.h can be found.:(.s.o): Don't create m4 temporary in srcdir. * exec/config-mips.m4.in (DADDI2, DADDI3): New macros. Define to substitute if as cannot assemble daddi. * exec/configure.ac (user_h): Look for user.h in asm/ as well. Use new user.h. Also look in ptrace.h on arm systems. Check if as supports daddi on mips64. * exec/exec.c (check_interpreter): Fix char signedness bug. * exec/loader-mips64el.s (__start): Use DADDI2 and DADDI3 for two- and 3-operand daddi. * exec/mipsel-user.h: Don't include sgidefs.h. * java/INSTALL: Document that m4 is now required. * src/android.c (android_rewrite_spawn_argv): Add missing NULL.
* Add helper binary `exec1'Po Lu2023-04-301-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * .gitignore: New files. * Makefile.in (mostlyclean_dirs): Add libexec, if its Makefile exists. * autogen.sh (do_git): Autoreconf in exec as well. * configure.ac: Configure libexec on Android. * exec/Makefile.in: * exec/README: * exec/config-mips.m4.in: * exec/config.guess: * exec/config.h.in: * exec/config.sub: * exec/configure: * exec/configure.ac: * exec/deps.mk: * exec/exec.c (MIN, struct exec_open_command) (struct exec_map_command, struct exec_jump_command) (write_open_command, write_load_command, process_interpreter_1) (process_interpreter, process_program_header, insert_args) (exec_0): * exec/exec.h (_EXEC_H_, struct elf_header_32) (struct program_header_32, struct dt_entry_32) (struct elf_header_64, struct program_header_64) (struct dt_entry_64, struct exec_tracee): * exec/exec1.c (main): * exec/install-sh (scriptversion): * exec/loader-aarch64.s (_start): * exec/loader-armeabi.s (_start): * exec/loader-mips64el.s (__start): * exec/loader-mipsel.s (__start): * exec/loader-x86.s (_start): * exec/loader-x86_64.s (_start): * exec/mipsel-user.h (_MIPSEL_USER_H_): * exec/mipsfpu.c (MIPS_ABI_FP_ANY, fpu_reqs, valid_abi_p) (fp_mode_for_abi, cpu_supports_fr0_p, determine_fpu_mode): * exec/mipsfpu.h (_MIPSFPU_H_, FP_FR0): * exec/test.c (print_usage, main): * exec/trace.c (MAX_TRACEES, aarch64_set_regs, read_memory) (user_alloca, user_copy, remove_tracee, handle_clone) (syscall_trap_p, handle_exec, process_system_call, tracing_execve) (after_fork, find_tracee, exec_waitpid, exec_init): New files. * java/Makefile.in (CROSS_EXEC_BINS): Add exec1 and loader. ($(CROSS_EXEC_BINS) &): New target.
* Update Android portPo Lu2023-04-291-1/+1
| | | | | | | | | | | | | | | | | | * build-aux/ndk-build-helper.mk (TARGET_ARCH): Define variable. * configure.ac (ENABLE_CHECKING, CHECK_STRUCTS) (GC_CHECK_STRING_OVERRUN, GC_CHECK_STRING_FREE_LIST, GLYPH_DEBUG) (GC_CHECK_STRING_BYTES): Enable checking correctly on Android. * java/README: Fix typos. * m4/ndk-build.m4 (ndk_run_test): Pass target arch. * src/android.c (android_get_content_name, android_close) (android_fclose, android_check_string): Fix various typos caught by checking. * src/charset.c (load_charset_map_from_file): Call emacs_fclose, not fclose. * src/image.c (image_set_transform): Fix thinko. (png_load_body, jpeg_load_body, gif_load): Call emacs_fclose, not fclose. Use open instead of fdopen. * src/xfaces.c (Fx_load_color_file): Likewise.
* Implement `yank-media' on AndroidPo Lu2023-04-063-0/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/android.texi (Android Windowing): Update selection restrictions. * java/org/gnu/emacs/EmacsClipboard.java (EmacsClipboard): New functions `getClipboardTargets' and `getClipboardData'. * java/org/gnu/emacs/EmacsSdk11Clipboard.java (EmacsSdk11Clipboard, getClipboardTargets, getClipboardData): Implement. * java/org/gnu/emacs/EmacsSdk8Clipboard.java: Stub out new functions. * lisp/term/android-win.el (android-get-clipboard-1): Implement MIME type targets. * src/android.c (android_exception_check) (android_exception_check_1, android_exception_check_2): Fix punctuation in warning message. (android_exception_check_nonnull_1): New function. * src/android.h: Update prototypes. * src/androidselect.c (struct android_emacs_clipboard): New methods. (android_init_emacs_clipboard): Initialize new methods. (Fandroid_get_clipboard_targets, android_xfree_inside) (Fandroid_get_clipboard_data): New functions. (syms_of_androidselect): Define new subrs.
* ; * java/INSTALL: Fix typo.Po Lu2023-03-201-0/+3
|
* Update Android portPo Lu2023-03-201-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Add support for HarfBuzz on Android. * java/INSTALL: Document where to get Emacs with HarfBuzz. * lisp/subr.el (overriding-text-conversion-style, y-or-n-p): Correctly set text conversion style if y-or-n-p is called inside the minibuffer. * src/sfnt.c (sfnt_read_cmap_format_8) (sfnt_read_cmap_format_12): Fix typos. (sfnt_read_24, sfnt_read_cmap_format_14): New function. (sfnt_read_cmap_table_1, sfnt_read_cmap_table): Handle format 14 cmap tables. (sfnt_read_default_uvs_table, sfnt_read_nondefault_uvs_table) (sfnt_compare_table_offsets, sfnt_create_uvs_context) (sfnt_free_uvs_context, sfnt_compare_uvs_mapping) (sfnt_variation_glyph_for_char, sfnt_map_table, sfnt_unmap_table) (sfnt_read_table, sfnt_test_uvs): New functions. (main): Add UVS tests. * src/sfnt.h (struct sfnt_cmap_format_14) (struct sfnt_variation_selector_record) (struct sfnt_default_uvs_table, struct sfnt_unicode_value_range) (struct sfnt_nondefault_uvs_table, struct sfnt_uvs_mapping) (struct sfnt_mapped_variation_selector_record) (struct sfnt_table_offset_rec, struct sfnt_uvs_context) (struct sfnt_mapped_table): New structures. Update prototypes. * src/sfntfont-android.c (android_sfntfont_driver): Register HarfBuzz callbacks where required. * src/sfntfont.c (sfntfont_select_cmap): Look for a format 14 table. Save it in new arg FORMAT14. (sfntfont_read_cmap): Adjust accordingly. (struct sfnt_font_info): New field `uvs'. New fields `hb_font', `fd' and `directory'. (sfntfont_open): Open uvs context. Under HarfBuzz, don't close the fd or subtable, but save them in the font info instead. (sfntfont_close): Free UVS context. Close font fd and table directory and HarfBuzz font. (sfntfont_draw): Handle case where s->padding_p. (sfntfont_get_variation_glyphs): New function. (sfntfont_unmap_blob, sfntfont_get_font_table) (sfntfont_begin_hb_font): New functions. * src/sfntfont.h: Update prototypes. * src/textconv.c (Fset_text_conversion_style): Fix doc string.
* Update Android portPo Lu2023-03-181-1/+2
| | | | | * java/org/gnu/emacs/EmacsView.java (onAttachedToWindow): Send measured width and height in exposures again.
* Update Android portPo Lu2023-03-183-63/+128
| | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsView.java (EmacsView) (prepareForLayout): New function. Call this prior to mapping the view. (onGlobalLayout): New function. Register as global layout listener. * java/org/gnu/emacs/EmacsWindow.java (EmacsWindow) (notifyContentRectPosition): New function. Use specified xPosition and yPosition when reporting the offsets of children of the root window. * java/org/gnu/emacs/EmacsWindowAttachmentManager.java (registerWindow): Specify activity launch bounds if necessary. * src/androidterm.c (handle_one_android_event): Send MOVE_FRAME_EVENT where necessary.
* Improve radio button appearance in Android menusPo Lu2023-03-171-3/+20
| | | | | | | | | | | | * java/org/gnu/emacs/EmacsContextMenu.java (EmacsContextMenu): New field `lastGroupId'. (Item): New field `isRadio'. (addItem): New arg `isRadio'. (inflateMenuItems): Apply an empty radio button group if required. * src/androidmenu.c (android_init_emacs_context_menu): Adjust accordingly. (android_menu_show): Likewise.
* Update Android portPo Lu2023-03-172-1/+22
| | | | | | | | * java/org/gnu/emacs/EmacsView.java (cancelPopupMenu): Dismiss context menu correctly. (isOpaque): New function. * java/org/gnu/emacs/EmacsWindowAttachmentManager.java: Make consumer list public.
* Update Android portPo Lu2023-03-161-0/+2
| | | | | * java/org/gnu/emacs/EmacsDocumentsProvider.java (queryRoots): Add icon to document root.
* Update Android portPo Lu2023-03-151-8/+11
| | | | | | | | | | | | | | | | | * doc/lispref/commands.texi (Misc Events): Document variable `disable-inhibit-text-conversion'. * java/org/gnu/emacs/EmacsDialog.java (display1): Try an activity that is certain to be focused first. * lisp/touch-screen.el (touch-screen-track-tap) (touch-screen-track-drag): Bind `disable-inhibit-text-conversion'. * src/keyboard.c (read_key_sequence): Only disable text conversion if an actual function or numeric key is found in the key sequence. (syms_of_keyboard): New variable `disable-inhibit-text-conversion'. * src/lread.c (read_filtered_event): Check new variable. * src/textconv.c (textconv_query): Remove unused label.
* Update Android portPo Lu2023-03-141-1/+32
| | | | | | | | | | * java/org/gnu/emacs/EmacsWindow.java (figureChange): Detect mice on up events as well. (onSomeKindOfMotionEvent): Work past framework bug. * src/androidterm.c (android_perform_conversion_query): * src/textconv.c (textconv_query): * src/textconv.h (TEXTCONV_SKIP_ACTIVE_REGION): Remove unused code.
* Update Android portPo Lu2023-03-141-8/+37
| | | | | | | * doc/emacs/android.texi (Android Windowing): Document how to display dialogs when Emacs is in the background. * java/org/gnu/emacs/EmacsDialog.java (display1): Use system dialogs if possible.
* Update Android portPo Lu2023-03-133-6/+45
| | | | | | | | | | | | * doc/emacs/android.texi (Android Startup): Document changes to emacsclient wrapper. * java/org/gnu/emacs/EmacsOpenActivity.java (EmacsOpenActivity) (startEmacsClient): Open EmacsActivity if the service is not running. * java/org/gnu/emacs/EmacsService.java (onCreate): * java/org/gnu/emacs/EmacsThread.java (EmacsThread, run): Pass any file to open to Emacs. * lisp/term/android-win.el (handle-args-function): Implement.
* Update Android portPo Lu2023-03-121-1/+10
| | | | | | | | * java/org/gnu/emacs/EmacsOpenActivity.java (EmacsOpenActivity) (onCancel): New function. (displayFailureDialog): Handle dialog cancellation. * src/sfntfont.c (sfnt_parse_languages): Look for SLNG tag if DLNG is not present.
* Update Android portPo Lu2023-03-122-0/+18
| | | | | | | | * configure.ac: Take option `--with-shared-user-id' and give it to AndroidManifest.xml.in. * java/AndroidManifest.xml.in: Substitute that into the application info. * java/INSTALL (BUILDING WITH A SHARED USER ID): New section.
* Update Android portPo Lu2023-03-111-7/+14
| | | | | | | | | * configure.ac (HAVE_MAILUTILS, with_mailutils) (ANDROID_SDK_8_OR_EARLIER, XCONFIGURE): Fix POP and mailutils configuration on Android. * java/Makefile.in: * src/callproc.c (syms_of_callproc): Avoid using built-in movemail when --with-mailutils.
* Fix problems with the menu bar on large screen Android devicesPo Lu2023-03-112-8/+20
| | | | | | | | | * java/org/gnu/emacs/EmacsActivity.java (onContextMenuClosed): Process submenu closing normally if it happens more than 300 ms after a submenu item was selected. * java/org/gnu/emacs/EmacsContextMenu.java (EmacsContextMenu) (onMenuItemClick, display1): Give `wasSubmenuSelected' different values depending on how the submenu was selected.
* Update Android portPo Lu2023-03-103-1/+26
| | | | | | | | | | | | | | * doc/emacs/android.texi (Android Windowing): Document how to pass multimedia keys to the system. * java/org/gnu/emacs/EmacsNative.java (EmacsNative): New function. * java/org/gnu/emacs/EmacsView.java (onKeyDown, onKeyMultiple) (onKeyUp): Check that function. * java/org/gnu/emacs/EmacsWindow.java (defineCursor): Handle cases where cursor is NULL. * src/android.c (NATIVE_NAME): New function. * src/androidfns.c (syms_of_androidfns): New variable. * src/keyboard.c (lispy_function_keys): Add volume keys.
* * java/org/gnu/emacs/EmacsCursor.java: New file.Po Lu2023-03-101-0/+47
|
* Implement mouse cursors on Android 7.0 and laterPo Lu2023-03-101-0/+16
| | | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsWindow.java (defineCursor): New function. * src/android.c (struct android_emacs_cursor): New struct. (android_init_emacs_cursor): New function. (JNICALL): Call it. (android_create_font_cursor, android_define_cursor) (android_free_cursor): New functions. * src/android.h (enum android_handle_type): Add cursor handle type. * src/androidfns.c (Fx_create_frame, android_create_tip_frame) (enum mouse_cursor, struct mouse_cursor_types, mouse_cursor_types) (struct mouse_cursor_data, android_set_mouse_color) (syms_of_androidfns): * src/androidgui.h (enum android_cursor_shape): * src/androidterm.c (make_invisible_cursor) (android_toggle_invisible_pointer, android_free_frame_resources) (android_define_frame_cursor): * src/androidterm.h (struct android_display_info) (struct android_output): Port mouse cursor code over from X.
* ; * java/org/gnu/emacs/EmacsNative.java: Add missing dependency.Po Lu2023-03-101-1/+2
|
* Port Android battery status to Android 4.4 and earlierPo Lu2023-03-101-6/+59
| | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsService.java (EmacsService) (queryBattery19): New function. (queryBattery): Call it on old systems. Also, return AC line status and temperature. * lisp/battery.el (battery-android): Implement more format directives. * src/android.c (android_query_battery): Handle new status fields. * src/android.h (struct android_battery_state): Add `plugged' and `temperature'. * src/androidfns.c (Fandroid_query_battery): Return new fields.
* Fix menu and popup race conditions on AndroidPo Lu2023-03-094-11/+29
| | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsActivity.java (onContextMenuClosed): * java/org/gnu/emacs/EmacsContextMenu.java (EmacsContextMenu) (onMenuItemClick, run): * java/org/gnu/emacs/EmacsDialog.java (EmacsDialog, onClick) (createDialog, onDismiss): Take menu event serial, and pass it along in context menu events. * java/org/gnu/emacs/EmacsNative.java (sendContextMenu): New argument. * src/android.c (sendContextMenu): Pass serial number in event. * src/androidgui.h (struct android_menu_event): New field `menu_event_serial'. * src/androidmenu.c (FIND_METHOD_STATIC) (android_init_emacs_context_menu): Adjust method declarations. (android_menu_show, android_dialog_show): * src/androidterm.c (handle_one_android_event): Expect serial in context menu events. * src/androidterm.h: Update prototypes.
* Update Android portPo Lu2023-03-091-1/+1
| | | | | | | * java/debug.sh (is_root): Port to android versions which don't support `chmod +x'. * src/android.c (android_content_name_p): Disable before API level 19.
* Update Android portPo Lu2023-03-091-2/+6
| | | | | * java/org/gnu/emacs/EmacsContextMenu.java (EmacsContextMenu) (addItem): New argument `tooltip'.
* Update Android portPo Lu2023-03-082-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/android.texi (Android File System): Document what `temp~unlinked' means in the temporary files directory. * java/org/gnu/emacs/EmacsService.java (updateExtractedText): New function. * java/org/gnu/emacs/EmacsView.java (onCreateInputConnection): Ask the input method nicely to not display the extracted text UI. * src/android.c (struct android_emacs_service): New method `updateExtractedText'. (android_hack_asset_fd_fallback): Improve naming convention. Fix typo. (android_init_emacs_service): Add new method. (android_update_extracted_text): New function. (android_open_asset): Fix typo. * src/androidgui.h: Update prototypes. * src/androidterm.c (struct android_get_extracted_text_context): New field `flags'. (android_get_extracted_text): Set flags on the frame's output data. (android_build_extracted_text): New function. (getExtractedText): Move out class structures. (android_update_selection): Send updates to extracted text if the input method asked for them. (android_reset_conversion): Clear extracted text flags. * src/androidterm.h (struct android_output): New fields for storing extracted text data.
* Save build timestamps in Android buildsPo Lu2023-03-071-1/+5
| | | | | | | | | | | | * java/Makefile.in (install_temp/assets/build_info): New rule.:(emacs.apk-in): Depend on that file. * lisp/version.el (android-read-build-system) (android-read-build-time): New functions. (emacs-build-system, emacs-build-time): Use those functions on Android, as dumping is done after installation on Android. * src/fileio.c (Finsert_file_contents): * src/window.c (replace_buffer_in_windows): Don't call functions if they are not defined, which can happen during loadup.
* Update Android portPo Lu2023-03-071-3/+10
| | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsWindow.java (onSomeKindOfMotionEvent): Dismiss splurious LeaveNotify events from button presses. * src/android.c (android_change_window_attributes) (android_change_gc, android_set_clip_rectangles) (android_reparent_window, android_clear_window, android_map_window) (android_unmap_window, android_resize_window, android_move_window) (android_swap_buffers, android_fill_rectangle, android_copy_area) (android_fill_polygon, android_draw_rectangle, android_draw_point) (android_draw_line, android_clear_area, android_bell) (android_set_input_focus, android_raise_window) (android_lower_window, android_set_dont_focus_on_map) (android_set_dont_accept_focus, android_get_keysym_name) (android_toggle_on_screen_keyboard, android_restart_emacs) (android_display_toast, android_update_ic, android_reset_ic) (android_set_fullscreen): Optimize by specifying the class explicitly when calling a method.
* Update Android portPo Lu2023-03-062-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsNative.java (EmacsNative): New function requestSelectionUpdate. * java/org/gnu/emacs/EmacsView.java (onCreateInputConnection): Call it instead of losing if getting the current selection fails. * src/android-asset.h (AAsset_seek): Define stub. * src/android.c (android_open): Take mode_t. (android_open_asset, android_close_asset, android_asset_read_quit) (android_asset_read, android_asset_lseek, android_asset_fstat): New functions. * src/android.h (struct android_fd_or_asset): Update prototypes. * src/androidgui.h (enum android_ime_operation): Add new operation to update the selection position. * src/androidterm.c (android_handle_ime_event): Handle new operation. (requestSelectionUpdate): New function. * src/fileio.c (close_file_unwind_emacs_fd): New function. (Fcopy_file, union read_non_regular, read_non_regular) (Finsert_file_contents): Use optimized codepath to insert Android asset files. * src/frame.h (enum text_conversion_operation): New operation. * src/textconv.c (really_request_point_update) (handle_pending_conversion_events_1, request_point_update): New functions. * src/textconv.h: Update prototypes.
* Update Android portPo Lu2023-03-063-21/+12
| | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsService.java (sync): Delete function. * java/org/gnu/emacs/EmacsView.java (handleDirtyBitmap): Erase with window background. (onDetachedFromWindow): Only recycle bitmap if non-NULL. * java/org/gnu/emacs/EmacsWindow.java (background): New field. (changeWindowBackground): Set it. * src/android.c (struct android_emacs_service): Remove `sync'. (android_init_emacs_service): Likewise. (android_sync): Delete function. * src/androidfns.c (android_create_tip_frame): Set frame background color correctly. (Fx_show_tip): Make the tip frame visible. * src/androidgui.h: Update prototypes. * src/androidterm.c (handle_one_android_event): Handle tooltip movement correctly.
* Update Android portPo Lu2023-03-0519-117/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsActivity.java (onCreate): * java/org/gnu/emacs/EmacsContextMenu.java: * java/org/gnu/emacs/EmacsDocumentsProvider.java (getMimeType): * java/org/gnu/emacs/EmacsDrawLine.java (perform): * java/org/gnu/emacs/EmacsDrawRectangle.java (perform): * java/org/gnu/emacs/EmacsFillPolygon.java: * java/org/gnu/emacs/EmacsFontDriver.java: * java/org/gnu/emacs/EmacsHandleObject.java: * java/org/gnu/emacs/EmacsInputConnection.java: * java/org/gnu/emacs/EmacsMultitaskActivity.java (EmacsMultitaskActivity): * java/org/gnu/emacs/EmacsNative.java: * java/org/gnu/emacs/EmacsNoninteractive.java (EmacsNoninteractive, main): * java/org/gnu/emacs/EmacsOpenActivity.java (EmacsOpenActivity) (startEmacsClient): * java/org/gnu/emacs/EmacsSdk7FontDriver.java: * java/org/gnu/emacs/EmacsSdk8Clipboard.java: * java/org/gnu/emacs/EmacsService.java (EmacsService, onCreate): * java/org/gnu/emacs/EmacsView.java (EmacsView, onLayout): * java/org/gnu/emacs/EmacsWindow.java (EmacsWindow): * java/org/gnu/emacs/EmacsWindowAttachmentManager.java (EmacsWindowAttachmentManager): Remove redundant includes. Reorganize some functions around, remove duplicate `getLibDir' functions, and remove unused local variables.
* Update Android portPo Lu2023-03-055-5/+5
| | | | | | | | | | | | | * java/org/gnu/emacs/EmacsOpenActivity.java (onCreate): Don't set the style here. * java/res/values-v11/style.xml: * java/res/values-v14/style.xml: * java/res/values-v29/style.xml: * java/res/values/style.xml: Define styles for the emacsclient wrapper. * src/keyboard.c (read_key_sequence): Don't disable text conversion if use_mouse_menu or if a menu bar prefix key is being displayed.
* Improve context menus on old versions of AndroidPo Lu2023-03-043-31/+76
| | | | | | | | | | | * java/org/gnu/emacs/EmacsActivity.java (EmacsActivity): New field `lastClosedMenu'. (onContextMenuClosed): Don't send event if a menu is closed twice in a row. Also, clear wasSubmenuSelected immediately. * java/org/gnu/emacs/EmacsContextMenu.java: Display submenus manually in Android 6.0 and earlier. * java/org/gnu/emacs/EmacsView.java (onCreateContextMenu) (popupMenu): Adjust accordingly.
* Port to broken Android NDK versionPo Lu2023-03-041-0/+9
| | | | | | | | | * configure.ac: Check for __ctype_get_mb_cur_max. Then see if MB_CUR_MAX is defined to it, and define REPLACEMENT_MB_CUR_MAX if so and it does not link. * java/INSTALL: Update documentation. * src/conf_post.h (MB_CUR_MAX): Define replacement if necessary.
* Improve support for building Android C++ dependenciesPo Lu2023-03-041-0/+18
| | | | | | | | | | | | * configure.ac: Call ndk_LATE after gl_EARLY. * cross/ndk-build/Makefile.in (NDK_BUILD_CXX): New variable. * cross/ndk-build/ndk-build-shared-library.mk: * cross/ndk-build/ndk-build-static-library.mk: Use it. * java/INSTALL: Describe how to build C++ dependencies. * m4/ndk-build.m4 (ndk_LATE): New macro. (ndk_INIT): Try to find a suitable C++ compiler. (ndk_CHECK_MODULES): Make sure the C++ compiler works before allowing C++ dependencies.
* Fix visiting and saving writable content provider filesPo Lu2023-03-031-0/+2
| | | | | | | | | | * java/org/gnu/emacs/EmacsService.java (checkContentUri): Improve debug output. * lisp/files.el (basic-save-buffer): Check whether or not file itself exists before checking for the existence of the directory containing it. * src/android.c (android_open): Don't forget to set errno after open_content_uri fails.
* Update Android portPo Lu2023-03-031-10/+32
| | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsActivity.java (EmacsActivity) (onCreate): Add view tree observer. (onGlobalLayout): Sync fullscreen state. (syncFullscreenWith): Improve visibility flag setting. * src/textconv.c (select_window): New function. (textconv_query): (restore_selected_window): (really_commit_text): (really_set_composing_text): (really_set_composing_region): (really_delete_surrounding_text): (really_set_point_and_mark): (get_extracted_text): Call it instead of Fselect_window to avoid selecting the mini window if it is no longer active.
* Summary: Update Android portPo Lu2023-03-022-1/+912
| | | | | | | | | | | | | | | | * INSTALL: Document where to find Android installation instructions. * configure.ac (CHECK_LISP_OBJECT_TYPE): Pacify -Wsuggest-attribute=noreturn only on Android. * cross/ndk-build/README: New file. * doc/emacs/android.texi (Android): * doc/emacs/emacs.texi (Top): * doc/emacs/input.texi (Other Input Devices): Untabify menus. * etc/NEWS: Move INSTALL.android to java/INSTALL. * java/INSTALL: New file. * java/README: * src/coding.c (from_unicode_buffer): Make Android specific code only build on Android.
* Improve criteria for restoring fullscreen state on AndroidPo Lu2023-03-022-3/+10
| | | | | | | | | * java/Makefile.in ($(CLASS_FILES) &): Touch all class files, even those javac chose not to rebuild. * java/org/gnu/emacs/EmacsActivity.java (onWindowFocusChanged): Restore fullscreen state here. (onResume): And not here.
* Update Android portPo Lu2023-03-026-10/+33
| | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/android.texi (Android Windowing): Reword documentation. * java/org/gnu/emacs/EmacsActivity.java (EmacsActivity): * java/org/gnu/emacs/EmacsContextMenu.java (EmacsContextMenu): * java/org/gnu/emacs/EmacsFontDriver.java (EmacsFontDriver): * java/org/gnu/emacs/EmacsSdk7FontDriver.java (EmacsSdk7FontDriver): * java/org/gnu/emacs/EmacsService.java (queryBattery): * java/org/gnu/emacs/EmacsWindow.java (EmacsWindow): Make functions final and classes static where necessary. * src/android.c (struct android_emacs_service): New method `display_toast'. (android_init_emacs_service): Load new method. (android_display_toast): New function. * src/android.h: Export. * src/androidfns.c (Fandroid_detect_mouse): * src/androidselect.c (Fandroid_clipboard_owner_p) (Fandroid_set_clipboard, Fandroid_get_clipboard) (Fandroid_browse_url): Prevent crashes when called from libandroid-emacs.so. * src/androidterm.c (handle_one_android_event): Fix out of date commentary.
* Fix out-of-tree Android buildsPo Lu2023-03-011-18/+24
| | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (JAVA_PUSH_LINT): Push to WARN_JAVAFLAGS instead of JAVAFLAGS. (cross/lib): Always AS_MKDIR_P. * cross/Makefile.in (srcdir): New variable. (LIB_SRCDIR): Take realpath relative to srcdir, not .:(src/verbose.mk): Depend on verbose.mk.android in srcdir. (lib/Makefile): Edit srcdir and VPATH to LIB_SRCDIR. (src/Makefile): Edit -I$$(top_srcdir) to -I../$(srcdir)/lib, instead of ommitting it. (clean): Allow ndk-build clean to fail. * java/Makefile.in (builddir): New variable. (WARN_JAVAFLAGS): Likewise. (JAVAFLAGS): Define in terms of WARN_JAVAFLAGS. (SIGN_EMACS, SIGN_EMACS_V2): Use emacs.keystore relative to srcdir. Allow inclusion of ndk-build.mk to fail. (install_temp, emacs.apk-in) (../config.status): Depend relative to top_srcdir. (AndroidManifest.xml, $(APK_NAME)): Likewise. (RESOURCE_FILE, CLASS_FILES, classes.dex): Output class files to $(srcdir); these are arch independents, so this is okay.
* Update Android portPo Lu2023-03-011-1/+8
| | | | | | | | | | | | * doc/emacs/android.texi (Android File System): Document new behavior of starting a subprocess from /assets. * java/org/gnu/emacs/EmacsWindow.java (onSomeKindOfMotionEvent): Don't use isFromSource where not present. * src/androidterm.c (android_scroll_run): Avoid undefined behavior writing to bitfields. * src/callproc.c (get_current_directory): When trying to run a subprocess inside /assets, run it from the home directory instead.
* Update Android portPo Lu2023-03-016-8/+103
| | | | | | | | | | | * java/AndroidManifest.xml.in: Specify @style/EmacsStyle. * java/org/gnu/emacs/EmacsActivity.java (onCreate): Stop setting the theme here. * java/res/values-v11/style.xml: * java/res/values-v14/style.xml: * java/res/values-v29/style.xml: * java/res/values/style.xml: Extract style resources into res/values.
* Update Android portPo Lu2023-03-0127-37/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/Makefile.in (ETAGS, clean): New rules to generate tags. * java/org/gnu/emacs/EmacsActivity.java (EmacsActivity): * java/org/gnu/emacs/EmacsApplication.java (EmacsApplication): * java/org/gnu/emacs/EmacsContextMenu.java (EmacsContextMenu): * java/org/gnu/emacs/EmacsCopyArea.java (EmacsCopyArea): * java/org/gnu/emacs/EmacsDialog.java (EmacsDialog)::(dialog. Then): * java/org/gnu/emacs/EmacsDocumentsProvider.java (EmacsDocumentsProvider): * java/org/gnu/emacs/EmacsDrawLine.java (EmacsDrawLine): * java/org/gnu/emacs/EmacsDrawPoint.java (EmacsDrawPoint): * java/org/gnu/emacs/EmacsDrawRectangle.java (EmacsDrawRectangle): * java/org/gnu/emacs/EmacsFillPolygon.java (EmacsFillPolygon): * java/org/gnu/emacs/EmacsFillRectangle.java (EmacsFillRectangle): * java/org/gnu/emacs/EmacsGC.java (EmacsGC): * java/org/gnu/emacs/EmacsInputConnection.java (EmacsInputConnection): * java/org/gnu/emacs/EmacsNative.java (EmacsNative): * java/org/gnu/emacs/EmacsNoninteractive.java (EmacsNoninteractive): * java/org/gnu/emacs/EmacsOpenActivity.java (EmacsOpenActivity): * java/org/gnu/emacs/EmacsPixmap.java (EmacsPixmap): * java/org/gnu/emacs/EmacsPreferencesActivity.java (EmacsPreferencesActivity): * java/org/gnu/emacs/EmacsSdk11Clipboard.java (EmacsSdk11Clipboard): * java/org/gnu/emacs/EmacsSdk23FontDriver.java (EmacsSdk23FontDriver): * java/org/gnu/emacs/EmacsSdk8Clipboard.java (EmacsSdk8Clipboard): * java/org/gnu/emacs/EmacsService.java (EmacsService): * java/org/gnu/emacs/EmacsSurfaceView.java (EmacsSurfaceView) (buffers): * java/org/gnu/emacs/EmacsView.java (EmacsView, ViewGroup): * java/org/gnu/emacs/EmacsWindow.java (EmacsWindow, drawables): * java/org/gnu/emacs/EmacsWindowAttachmentManager.java (EmacsWindowAttachmentManager): Make classes final where appropriate.
* Update Android portPo Lu2023-02-261-2/+6
| | | | | | | | | | | | * doc/lispref/commands.texi (Misc Events): Update documentation. * java/org/gnu/emacs/EmacsService.java (EmacsService) (onStartCommand): Improve notification message. * src/android.c (android_hack_asset_fd): Detect if ashmem is available dynamically. (android_detect_ashmem): New function. * src/textconv.c (record_buffer_change): Use markers to represent BEG and END instead. (syms_of_textconv): Update doc string.
* Update Android portPo Lu2023-02-251-1/+1
| | | | | | | | | | * java/debug.sh (is_root): Fix tee detection again for old systems which don't return exit codes from adb shell. * src/android.c (android_run_select_thread, NATIVE_NAME, JNICALL): * src/android.h (NATIVE_NAME): * src/androidterm.c (JNICALL, NATIVE_NAME): Apply stack alignment to all JNICALL functions.
* Update Android portPo Lu2023-02-251-42/+76
| | | | | | | | | | | * java/org/gnu/emacs/EmacsNoninteractive.java (main): Port to Android 2.2. * src/android-asset.h (AAsset_openFileDescriptor): Delete stub function. * src/android.c (android_check_compressed_file): Delete function. (android_open): Stop trying to find compressed files or to use the system provided file descriptor. Explain why.
* Update Android portPo Lu2023-02-251-1/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/android.texi (Android Startup, Android File System) (Android Environment, Android Windowing, Android Troubleshooting): Improve documentation; fix typos. * doc/lispref/commands.texi (Misc Events): Likewise. * java/org/gnu/emacs/EmacsService.java (queryBattery): New function. * lisp/battery.el (battery-status-function): Set appropriately for Android. (battery-android): New function. * src/android.c (struct android_emacs_service): New method `query_battery'. (android_check_content_access): Improve exception checking. (android_init_emacs_service): Look up new method. (android_destroy_handle, android_create_window) (android_init_android_rect_class, android_init_emacs_gc_class) (android_set_clip_rectangles) (android_create_pixmap_from_bitmap_data, android_fill_polygon) (android_get_image, android_put_image, android_bell) (android_set_input_focus, android_raise_window) (android_lower_window, android_query_tree, android_get_geometry) (android_translate_coordinates, android_wc_lookup_string) (android_damage_window, android_build_string) (android_build_jstring, android_exception_check_1) (android_exception_check_2): New functions. (android_browse_url): Improve exception handling. Always use android_exception_check and don't leak local refs. (android_query_battery): New function. * src/android.h (struct android_battery_state): New struct. * src/androidfns.c (Fandroid_query_battery, syms_of_androidfns): New function. * src/androidfont.c (androidfont_from_lisp, DO_SYMBOL_FIELD) (DO_CARDINAL_FIELD, androidfont_list, androidfont_match) (androidfont_draw, androidfont_open_font) (androidfont_close_font): * src/androidselect.c (Fandroid_set_clipboard) (Fandroid_get_clipboard): * src/sfnt.c (sfnt_map_glyf_table): * src/sfntfont.c (sfntfont_free_outline_cache) (sfntfont_free_raster_cache, sfntfont_close): Allow font close functions to be called twice.