Commit graph

246 commits

Author SHA1 Message Date
Po Lu
e56e9c1954 Adjust dump file location under Android
* java/org/gnu/emacs/EmacsApplication.java (EmacsApplication)
<apkFileName>: New field.
(getApkFile): Move from EmacsService.java.
(findDumpFile): If the dump file is older than the APK, delete
it irrespective of whether the checksums agree.
(onCreate): Initialize apkFileName.

* java/org/gnu/emacs/EmacsService.java (onCreate): Use
EmacsApplication.apkFileName.

* src/android.c (android_on_low_memory): Correct arguments to
Fclear_image_cache.

* src/image.c (Fclear_image_cache): Check that animation_cache
is always a cons.
2023-11-12 11:44:58 +08:00
Po Lu
5324723c2b Clear image caches in reaction to system VM warnings
* java/org/gnu/emacs/EmacsNative.java (onLowMemory):

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

* src/android.c (android_on_low_memory, onLowMemory): New
functions called when a VM caution is registered.  Clear
the image cache and run garbage collection.
2023-11-10 14:58:16 +08:00
Po Lu
21f3670526 Guarantee files are auto-saved when Emacs is terminated by Android
* java/org/gnu/emacs/EmacsNative.java (shutDownEmacs):

* java/org/gnu/emacs/EmacsService.java (onDestroy): New
function.  When invoked, call shut_down_emacs and await its
completion.

* src/android.c (android_shut_down_emacs, shutDownEmacs): New
functions.
2023-11-09 10:12:24 +08:00
Po Lu
59a3edc355 Avert a crash and file descriptor leak in yank-media
* java/org/gnu/emacs/EmacsNative.java (close): New declaration.

* java/org/gnu/emacs/EmacsSdk11Clipboard.java
(getClipboardData): Catch SecurityException and guarantee file
descriptors are closed even if exceptions arise.

* src/android.c (dup): Export another function.
2023-10-29 12:59:45 +08:00
Po Lu
f0d42c5e47 Minor adjustments to Android drag and drop and content URIs
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow)
<dndXPosition, dndYPosition>: New fields initialized to -1.
(onDragEvent): Remember the position of the previous event to
avoid sending duplicates.

* src/androidvfs.c (EMACS_PATH_MAX): New define.
(android_saf_tree_rename, android_saf_tree_opendir)
(android_name_file, android_fstatat, android_faccessat)
(android_fchmodat, android_readlinkat): Use EMACS_PATH_MAX where
SAF file names might be encountered.
2023-10-28 10:19:41 +08:00
Po Lu
9ad22b3a01 Facilitate opening multiple files through DND under Android
* java/org/gnu/emacs/EmacsWindow.java (onDragEvent): Agglomerate
each provided content URI into a text/uri list.
2023-10-21 14:25:02 +08:00
Po Lu
8fa0f13e6e Repair detection of empty mailto URLs
* java/org/gnu/emacs/EmacsOpenActivity.java (onCreate):
Additonally regard mailto:// as an empty URL, since Android does
interpret them as such.
2023-10-20 19:09:39 +08:00
Po Lu
90bfb1075d Treat empty mailto URIs properly under Android
* java/org/gnu/emacs/EmacsOpenActivity.java (onCreate): If an
empty mailto: URI is supplied, ascertain if EXTRA_EMAIL is set,
then derive a mailto URI from that if so.
2023-10-20 15:03:56 +08:00
Po Lu
e84e0cfb38 Relay body and attachments within Android e-mails to message-mailto
* java/org/gnu/emacs/EmacsOpenActivity.java (onCreate): Infer
e-mail body and subject from its parameters and convey this
information to message-mailto.

* lisp/gnus/message.el (message-mailto): New arguments SUBJECT,
BODY and FILE-ATTACHMENTS.
(message-mailto-1): Insert these arguments as appropriate.
2023-10-19 16:19:36 +08:00
Po Lu
93104cff53 Correctly receive files through Android DND
* java/org/gnu/emacs/EmacsService.java (getUsefulContentResolver)
(getContentResolverContext): New functions which return a
content resolver from an EmacsActivity, if at all possible.
(openContentUri, checkContentUri): Probe or open URIs through
such content resolvers.  Probe URIs by opening them if merely
testing permissions fails, for DND URIs do not make
checkCallingUriPermission return true.

* java/org/gnu/emacs/EmacsWindow.java (onDragEvent): Address
potential crash.

* src/androidvfs.c (android_check_content_access): Circumvent
JNI dynamic method dispatch.
(android_authority_name): Guarantee NAME is never a directory.
2023-10-15 13:11:37 +08:00
Po Lu
03f5a06a05 Implement multi-window drag-and-drop under Android
* java/org/gnu/emacs/EmacsNative.java (sendDndDrag, sendDndUri)
(sendDndText): Declare new event-sending functions.

* java/org/gnu/emacs/EmacsView.java (onDragEvent): New function.

* java/org/gnu/emacs/EmacsWindow.java (onDragEvent): New
function; respond to each drag and drop event, request
permissions if necessary and transfer dropped data to Lisp.

* lisp/dnd.el (dnd-unescape-file-uris): New variable.
(dnd-get-local-file-name): If that variable is nil, refrain from
unescaping URLs provided.

* lisp/term/android-win.el (android-handle-dnd-event): New
function.
(special-event-map): Bind drag-n-drop-event.

* src/android.c (sendDndDrag, sendDndUri, sendDndText): New
functions.

* src/androidgui.h (enum android_event_type): New event types
ANDROID_DND_DRAG_EVENT, ANDROID_DND_URI_EVENT,
ANDROID_DND_TEXT_EVENT.
(struct android_dnd_event): New structure.
(union android_event) <dnd>: New field.

* src/androidterm.c (handle_one_android_event)
<ANDROID_DND_..._EVENT>: Generate drag-n-drop events for each
of these types.
(syms_of_androidterm) <Quri, Qtext>: New defsyms.
2023-10-14 10:15:42 +08:00
Po Lu
963e3dd28d Clarify java/INSTALL
* java/INSTALL: Correct erroneous include exports and also
introduce those omitted within patches to external libraries.
(bug#66507)
2023-10-13 12:57:36 +08:00
Po Lu
336c367411 Implement frame restacking under Android
* java/org/gnu/emacs/EmacsActivity.java (invalidateFocus1):
Synchronize with window.children for iteration through it.

* java/org/gnu/emacs/EmacsService.java (queryTree): Synchronize
with windowList for iteration through it.

* java/org/gnu/emacs/EmacsView.java (moveChildToBack): Correct
formatting mistake.
(moveAbove, moveBelow): New functions.

* java/org/gnu/emacs/EmacsWindow.java (destroyHandle, reparentTo)
(raise, lower): Remedy synchronization blunders.
(reconfigure): New function.

* src/android.c (android_init_emacs_window): Link with
`reconfigure'.
(android_reconfigure_wm_window): New wrapper function.

* src/androidfns.c (android_frame_restack): New function.
(Fandroid_frame_restack): Properly implement this function and
expunge outdated comment.

* src/androidgui.h (enum android_stack_mode)
(enum android_window_changes): New enumerators.
2023-10-10 13:11:14 +08:00
Po Lu
123b77436e Introduce an input method callback required by Android 34
* java/org/gnu/emacs/EmacsInputConnection.java (replaceText):
New function.

* java/org/gnu/emacs/EmacsNative.java (replaceText): Declare
native function.

* src/androidgui.h (enum android_ime_operation): New operation
ANDROID_IME_REPLACE_TEXT.

* src/androidterm.c (android_handle_ime_event): Decode text when
encountering an ANDROID_IME_REPLACE_TEXT operation.  Return if
decoding overflowed rather than presenting Qnil to textconv
functions.
(replaceText): New JNI function.

* src/frame.h (enum text_conversion_operation): New operation
TEXTCONV_REPLACE_TEXT.

* src/textconv.c (really_commit_text): Move point to start if
the composing region is set.
(really_replace_text): New function.
(handle_pending_conversion_events_1) <TEXTCONV_REPLACE_TEXT>:
New case.
(replace_text): New function.

* src/textconv.h: Update prototypes.
2023-10-05 14:23:20 +08:00
Po Lu
253f1aff1a Port Emacs to Android 34
* configure.ac: Detect and require Android 34 headers.

* doc/emacs/android.texi (Android Environment): Mention new
permissions mandated by Android 34.

* java/AndroidManifest.xml.in: Introduce new permissions and
foreground service types prerequisite for background execution under
Android 34.

* java/INSTALL: Update installation documentation.

* java/org/gnu/emacs/EmacsSdk7FontDriver.java (Sdk7FontEntity)
(Sdk7FontObject):

* java/org/gnu/emacs/EmacsService.java (onCreate): Silence deprecation
warnings.

* src/android.c: Update documentation.
2023-10-05 11:57:26 +08:00
Po Lu
db704687bb Update Android port
* java/AndroidManifest.xml.in: Exclude non-files from opening in
Emacs.

* java/org/gnu/emacs/EmacsOpenActivity.java (onCreate): Avert
crash should scheme be NULL.
2023-10-02 11:00:39 +08:00
Eli Zaretskii
46978fa1ef Merge from origin/emacs-29
4776d90c31 Add new Tramp test
ca5b48fd76 Fix tmm-mid-prompt :type (Bug#66179)
7447d3df94 Fix tree-sitter indentation conflict with multiple languages
bee18e5273 Fix bug#66093 in Tramp
7d5fee0fea Support regeneration of ja-dic.el under '--with-small-ja-...

Conflicts:
	make-dist
2023-09-30 13:50:07 -04:00
Po Lu
7b43d70c73 Update Android port
* doc/emacs/android.texi (Android Windowing): Document
`android-keyboard-bell-duration'.

* java/org/gnu/emacs/EmacsService.java (ringBell): New argument
DURATION.

* src/android.c (android_init_emacs_service): Adjust
correspondingly.
(android_bell): Provide the duration of the vibration.

* src/androidfns.c (syms_of_androidfns)
<android_keyboard_bell_duration>: New variable.
2023-09-28 08:46:35 +08:00
Po Lu
df5a9a78b5 Update Android port
* doc/lispref/os.texi (Desktop Notifications): Revise
documentation for android-notifications-notify to reflect
changes.

* java/org/gnu/emacs/EmacsDesktopNotification.java (display1):
Convert notification importance to a legacy priority between
Android 7.1 and 4.1.

* java/org/gnu/emacs/EmacsPixmap.java (EmacsPixmap): Remove
immutable bitmap constructor, as the underlying Android API
functions are erroneously implemented.

* src/android.c (android_init_emacs_pixmap): Cease searching for
deleted constructor.
(android_create_pixmap_from_bitmap_data): Create a pixmap, then
fill it with the contents of the bitmap, in lieu of employing
the aforementioned constructor.

* src/androidselect.c (Fandroid_notifications_notify): Revise
doc string.
2023-09-25 13:01:44 +08:00
Po Lu
38cd3cb433 Update Android port
* java/org/gnu/emacs/EmacsSdk11Clipboard.java
(getClipboardData): Correct typo in comment.

* src/androidvfs.c (android_authority_open)
(android_saf_delete_document): Circumvent JNI dynamic method
dispatch.
2023-09-24 18:19:54 +08:00
Po Lu
d2f024af61 Display background dialogs using the correct style
* java/org/gnu/emacs/EmacsDialog.java (toAlertDialog): Wrap
CONTEXT within EmacsStyle such that dialogs are displayed in the
same style used by activities.
2023-09-23 08:31:45 +08:00
Po Lu
d71b9673a0 Enable opening mailto URLs under Android
* doc/emacs/android.texi (Android Startup): Mention how mailto
URLs are treated by the emacsclient wrapper.

* java/AndroidManifest.xml.in: Register `mailto' scheme filters
for EmacsOpenActivity.

* java/org/gnu/emacs/EmacsOpenActivity.java (startEmacsClient):
Extract code that starts Emacs when it isn't already running,
and take a list of arguments rather than a single file name.
(onCreate): If the scheme is `mailto', escape the URI and call
`message-mailto'.
2023-09-22 09:36:40 +08:00
Po Lu
4e46df9651 Optimize damage region tracking under Android
* java/org/gnu/emacs/EmacsDrawLine.java (perform):

* java/org/gnu/emacs/EmacsDrawRectangle.java (perform): Call
damageRect with integer coordinates in lieu of consing a new
Rect.

* java/org/gnu/emacs/EmacsDrawable.java (damageRect) <IIII>:
Declare a new variant of damageRect, accepting four integers
designating the extents of the damage rectangle.

* java/org/gnu/emacs/EmacsPixmap.java (damageRect) <IIII>: New
stub.

* java/org/gnu/emacs/EmacsView.java (damageRect) <IIII>:
Implement this overloaded variant of damageRect.

* java/org/gnu/emacs/EmacsWindow.java (damageRect): Ditto.

* src/android.c (android_init_emacs_drawable)
(android_init_emacs_window): Move search for `damageRect' to
android_init_emacs_window.
(android_damage_window): Call IIII variant of `damageRect' to
avoid consing a new rectangle.  Ameliorate dynamic method
dispatch overhead.
2023-09-18 10:59:55 +08:00
Po Lu
ee4b6a4a2d Update Android port
* java/org/gnu/emacs/EmacsContextMenu.java (display): Return
false if the list of menu buttons is empty, lest Android cease
displaying menus on the assumption that Emacs is defective.

* java/org/gnu/emacs/EmacsView.java (popupMenu): Likewise.

* src/fns.c (sort_list): Render sentence motion commands
functional within commentary

* src/sfntfont.c (sfntfont_list_family): Sort and deduplicate
the returned family list and make it a list of symbols.
(syms_of_sfntfont) <Qstring_lessp>: New defsym.
2023-09-16 10:38:46 +08:00
Po Lu
6ffb0a1719 Avert a crash in the Android last resort font driver
* java/org/gnu/emacs/EmacsFontDriver.java (FONT_INVALID_CODE):
New constant.
(hasChar, encodeChar): Accept a jint character code rather than
a jchar.

* java/org/gnu/emacs/EmacsSdk23FontDriver.java (hasChar)
(encodeChar): Return 0 or FONT_INVALID_CODE if the character is
not representable in a Java char.

* java/org/gnu/emacs/EmacsSdk7FontDriver.java (hasChar): Ditto.

* src/androidfont.c (android_init_font_driver): Adjust signature
to match.
2023-09-14 16:53:21 +08:00
Po Lu
921c0a16ce Improve the Android last resort font driver
* java/org/gnu/emacs/EmacsSdk7FontDriver.java (Sdk7Typeface):
Rename fileName to familyName and cease attempting to infer a
style from it.
(EmacsSdk7FontDriver): Employ preset typefaces rather than
enumerating each typeface within the system fonts directory.
(draw): Circumvent kerning difficulties by advancing past each
character individually.
2023-09-14 09:59:45 +08:00
Po Lu
dfaaedfba8 Request additional permissions on Android
* doc/emacs/android.texi (Android Environment): List two
additional permissions within the summary of permissions granted
by default.

* java/AndroidManifest.xml.in: Request READ_CALENDAR and
WRITE_CALENDAR.
2023-09-13 09:30:14 +08:00
Po Lu
9500fbe231 Facilitate opening content:// files without a linked file name
* java/org/gnu/emacs/EmacsOpenActivity.java
(checkReadableOrCopy): If FILE is NULL, return a matching
content URI if possible, else generate a file name with the URI
as a reference.
(onCreate): Catch SecurityException around calls to
openFileDescriptor.
2023-09-13 09:30:14 +08:00
Po Lu
aa872f2540 Properly run emacsclient under Android if DISPLAY is set
* java/org/gnu/emacs/EmacsPixmap.java (EmacsPixmap): Make
dimensions final, since they are never changed after the
constructor.

* lib-src/emacsclient.c (decode_options): If --display is not
provided, always set display to `android' even if DISPLAY is
provided.

* lisp/net/browse-url.el (browse-url): Cease setting DISPLAY
under Android.

* src/callproc.c (getenv_internal, make_environment_block):
Don't afford DISPLAY special treatment under Android.
2023-09-06 10:31:26 +08:00
Po Lu
4bbad20d70 Correct deadlock in Android port
* java/org/gnu/emacs/EmacsService.java (updateCursorAnchorInfo):
Delete extraneous whitespace.
(updateExtractedText): Encase synchronous IM manager operation
in deadlock prevention mechanism.
2023-09-04 09:42:10 +08:00
Po Lu
6278e15f62 Update Android port
* java/org/gnu/emacs/EmacsService.java (browseUrl): Confer
rights to write the URI indefinitely.
2023-09-03 20:21:14 +08:00
Po Lu
4debb110d7 Move Android port internals documentation to admin/notes
* admin/notes/java: New file.  Move most of its contents from
README, and introduce a section on compatibility.

* java/README: Move internals to admin/notes/java.
2023-09-03 10:05:15 +08:00
Po Lu
d286f6889c Open org-protocol:// links on Android
* doc/emacs/android.texi (Android Startup): Revise to reflect
changes in the set of files registered for Emacsclient and
mention org-protocol support.

* java/AndroidManifest.xml.in: Open all files, not just a
particular subset of image and data files.  Register an
org-protocol scheme handler.

* java/org/gnu/emacs/EmacsOpenActivity.java (onCreate): Provide
URI to Emacs verbatim if its scheme is `org-protocol'.
2023-09-02 10:06:05 +08:00
Po Lu
297ccd967f Facilitate typing `C-SPC' on Android
* doc/emacs/android.texi (Android Windowing): Mention C-SPC
interception and how it may be disabled.

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

* java/org/gnu/emacs/EmacsView.java (onKeyPreIme): New function.
If the provided key code is SPC and the event's modifier key
mask contains ControlMask, relay it directly to onKeyDown.

* java/org/gnu/emacs/EmacsWindow.java (eventModifiers): Export
and make static.

* src/android.c (shouldForwardCtrlSpace): New function.

* src/androidfns.c (syms_of_androidfns)
<android_intercept_control_space>: New defvar.
2023-08-30 10:07:49 +08:00
Po Lu
2134fd9f27 Update Android port
* java/org/gnu/emacs/EmacsActivity.java (attachWindow, onDestroy)
(onWindowFocusChanged, onContextMenuClosed):

* java/org/gnu/emacs/EmacsContextMenu.java (onMenuItemClick):

* java/org/gnu/emacs/EmacsDialog.java (onClick, display1, onDismiss):

* java/org/gnu/emacs/EmacsOpenActivity.java (checkReadableOrCopy)
(onDestroy, onWindowFocusChanged, onPause):

* java/org/gnu/emacs/EmacsWindowAttachmentManager.java
(registerWindow, removeWindowConsumer, detachWindow)
(noticeIconified, noticeDeiconified): Remove superfluous
debugging code now that the Android port is stable.

* java/org/gnu/emacs/EmacsView.java (onLayout): Detect if the
IME is hidden while a toplevel window is focused, and clear
isCurrentlyTextEditor in that case.
(onApplyWindowInsets): New function.
(raise, lower, popupMenu, onCreateInputConnection): Delete
aforementioned debugging code.
2023-08-28 13:08:22 +08:00
Po Lu
55dd110cf3 Update Android port
* java/org/gnu/emacs/EmacsView.java (onLayout): Provide for
occasions where the saved measured dimensions differ from that
saved by the view.
2023-08-27 09:24:01 +08:00
Po Lu
32fe187bdf Install rcs2log within Emacs packages for Android
* doc/emacs/android.texi (Android Environment): Mention the
`rcs2log' program name variable.  Also refine the wording of the
paragraph describing bundled programs a bit.

* doc/lispref/processes.texi (Subprocess Creation): Mention
`rcs2log' and `rcs2log-program-name'.  Correct typos and
spelling mistakes within the variable index.

* etc/NEWS: Amend the announcement of *-program-name to also
cite rcs2log.

* java/Makefile.in (install_temp): Copy rcs2log to
lib/*/librcs2log.so after minor revisions to change the
interpreter name.

* lisp/vc/vc-rcs.el (vc-rcs-rcs2log-program): Ground the program
name upon `rcs2log-program-name'.

* src/callproc.c (syms_of_callproc) <Vrcs2log_program_name>: New
defvar.  Define to `librcs2log.so' under Android, `rcs2log'
elsewhere.
2023-08-24 12:41:54 +08:00
Po Lu
bb2dab61a1 Take precautions against NULL returns from getPrimaryClip
* java/org/gnu/emacs/EmacsSdk11Clipboard.java (getClipboardData):
Return null if the clip data is not set.  Also delete superfluous
debugging code.  (bug#65445)
(getClipboard): Don't dereference NULL clip data.
2023-08-22 15:28:38 +08:00
Jim Porter
0df2efa4d6 ; Fix issues running gitmerge
* .gitattributes: Ignore whitespace issues in java/INSTALL.

* build-aux/git-hooks/pre-commit (git_diff): Explicitly allow
"ChangeLog.android".

* java/README: Remove extra trailing newline.
2023-08-21 18:22:59 -07:00
Po Lu
b7bd7e92a9 Improve Android adaptive icon
* java/res/drawable/emacs_background.xml: Delete trailing whitespace
and modify gradient offset to match emacs.svg.

* java/res/drawable/emacs_foreground.xml: Delete trailing
whitespace and remove redundant path.
2023-08-22 09:20:47 +08:00
Po Lu
b411761cbb Repair desktop notification on Android 31
* java/org/gnu/emacs/EmacsDesktopNotification.java (display1):
Provide FLAG_IMMUTABLE under Android S and later, not just
versions of Android after S.  (bug#65433)
2023-08-22 08:04:16 +08:00
Po Lu
c63f178a30 Make the Emacs icon ``adaptive''
* java/AndroidManifest.xml.in (EmacsApplication): Set icon to
@mipmap/emacs_icon.

* java/org/gnu/emacs/EmacsService.java (onStartCommand): Pick a
better name for the persistent notification channel.

* java/res/drawable/emacs_background.xml:

* java/res/drawable/emacs_foreground.xml:

* java/res/mipmap/emacs_icon.png:

* java/res/mipmap-v26/emacs_icon.xml: New files, comprising an
``adaptive icon'' required by some Android launchers.
2023-08-21 14:39:51 +08:00
Po Lu
b1e498ac8c Enable providing icons for Android desktop notifications
* doc/lispref/os.texi (Desktop Notifications)
<android-notifications-notify>: Mention the :icon parameter.

* java/org/gnu/emacs/EmacsDesktopNotification.java
(EmacsDesktopNotification) <icon>: New field.
(<init>): New argument ICON.  Set this.icon to its value.
(display1): Use provided icon and always supply a pending intent
to open Emacs once the notification is clicked.

* java/res/layout/sdk8_notifications_view.xml
(sdk8_notifications_title, sdk8_notifications_content): Set
foreground color to #000000.

* src/androidselect.c (android_init_emacs_desktop_notification):
Update signature of <init>.
(android_locate_icon): New function.
(android_notifications_notify_1): New arg ICON.
(Fandroid_notifications_notify): New parameter icon.
(syms_of_androidselect): <QCicon>: New symbol.
2023-08-21 09:36:52 +08:00
Po Lu
392d00e0aa Repair desktop notification display on Android 2.3 and 2.2
* java/org/gnu/emacs/EmacsDesktopNotification.java (display1):
Create a pending intent and set it as the contentIntent when
building a notification by hand.
2023-08-20 21:40:08 +08:00
Po Lu
4f714dc081 Support desktop notifications on Android
* doc/emacs/android.texi (Android Environment): Correct list of
permissions granted by default.

* doc/lispref/os.texi (Desktop Notifications): Document the new
function `android-notifications-notify' and its limitations.

* java/AndroidManifest.xml.in: Request notification permissions.

* java/org/gnu/emacs/EmacsDesktopNotification.java: New file.

* java/res/layout/sdk8_notifications_view.xml: New file holding
substitute notification widget definitions for Android versions
prior to 3.0.

* java/res/values/strings.xml: Remove inadvertently introduced
tag attribute.

* lisp/org/org-clock.el (haiku-notifications-notify): Correct
file name in function declaration.
(android-notifications-notify): New declaration.
(org-show-notification): Use `android-notifications-notify'.

* src/androidselect.c (android_init_emacs_desktop_notification)
(android_notifications_notify_1, Fandroid_notifications_notify):
New functions.
(init_androidselect, syms_of_androidselect): Initialize new
class and define new subr.
2023-08-20 20:25:53 +08:00
Po Lu
cbe6b48b36 Fix potential NULL pointer dereference
* java/org/gnu/emacs/EmacsDialog.java (display): Initialize
rc.thing to false.
2023-08-17 08:25:40 +08:00
Po Lu
9fb00904f9 Improve efficiency of checking for access to authority documents
* java/org/gnu/emacs/EmacsService.java (checkContentUri): Take a
string instead of a byte array.  Then, use
checkCallingUriPermission, in lieu of opening the file.
* src/android.c (android_check_content_access): Delete unused
function.
(android_init_emacs_service): Adjust for changes to
checkContentUri's signature.
* src/androidvfs.c (android_get_content_name): Return the file
name in a new buffer.
(android_check_content_access): Adjust correspondingly.
(android_authority_name): Verify NAME is a valid JNI string.
2023-08-14 13:15:08 +08:00
Eli Zaretskii
b289f0769f Merge from origin/emacs-29
4767f5eaee Better fix for bug#65156
dd1d8414b3 Fix insert-file-contents with pipes and /dev/stdin
50649a6d1a ; * etc/PROBLEMS: Fix wording.
f0dda682ff ; * etc/NEWS.28: Add deletion of levents.el.
f4acae842c Fix bug#65042
e1874c4e8b * configure.ac (HAVE_TREE_SITTER): Set NEED_DYNLIB=yes (b...
ef8838c3a5 * etc/NEWS: Mention tramp-show-ad-hoc-proxies.
495bee253f * test/lisp/net/tramp-tests.el (tramp-test42-utf8): Skip ...
de1effd73b ; Fix last change
7c7966862b * test/lisp/net/tramp-tests.el (tramp-test10-write-region...
16205e8db6 ; Improve help-echo in package.el
a95e700698 ; Filter packages available for upgrade via menu bar
adff72dd1d Fix reverting Rmail buffers
2023-08-12 13:42:14 -04:00
Stefan Kangas
98e7d37451 ; Fix typo 2023-08-12 15:46:32 +02:00
Po Lu
69a1a63ebd ; * java/INSTALL (LOCATING NECESSARY FILES): New section. 2023-08-12 20:59:10 +08:00