<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/java/org, branch scratch/jsonrpc-things</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>Clean up some redundant or otherwise suspect code</title>
<updated>2023-11-29T02:51:49+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2023-11-29T02:46:42+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=265ffe59fbd7c01e2bd5a8c6dcac9035c00de004'/>
<id>265ffe59fbd7c01e2bd5a8c6dcac9035c00de004</id>
<content type='text'>
* java/org/gnu/emacs/EmacsOpenActivity.java (onCreate):
Don't check if URI is non-NULL, for instanceof checks this
also.

* java/org/gnu/emacs/EmacsSafThread.java (accessDocument1):
Don't check !writable twice.

* java/org/gnu/emacs/EmacsService.java (documentIdFromName):
Designate this function as public, since it is called
through JNI.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* java/org/gnu/emacs/EmacsOpenActivity.java (onCreate):
Don't check if URI is non-NULL, for instanceof checks this
also.

* java/org/gnu/emacs/EmacsSafThread.java (accessDocument1):
Don't check !writable twice.

* java/org/gnu/emacs/EmacsService.java (documentIdFromName):
Designate this function as public, since it is called
through JNI.
</pre>
</div>
</content>
</entry>
<entry>
<title>Dismiss Android Back key events that are canceled</title>
<updated>2023-11-25T02:41:09+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2023-11-25T02:40:13+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=207ee7f9880c72920d4b323d7d6ed16544ba948b'/>
<id>207ee7f9880c72920d4b323d7d6ed16544ba948b</id>
<content type='text'>
* java/org/gnu/emacs/EmacsWindow.java (onKeyDown): Disregard
KEYCODE_BACK events.
(onKeyUp): If the event is KEYCODE_BACK, deliver the disregarded
key press event, unless FLAG_CANCELED is set.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* java/org/gnu/emacs/EmacsWindow.java (onKeyDown): Disregard
KEYCODE_BACK events.
(onKeyUp): If the event is KEYCODE_BACK, deliver the disregarded
key press event, unless FLAG_CANCELED is set.
</pre>
</div>
</content>
</entry>
<entry>
<title>Offer to grant storage permissions if absent</title>
<updated>2023-11-18T06:15:55+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2023-11-18T06:15:55+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=669e754f5bdc9f9130a68eec6966babe9a85ecae'/>
<id>669e754f5bdc9f9130a68eec6966babe9a85ecae</id>
<content type='text'>
* java/org/gnu/emacs/EmacsService.java (externalStorageAvailable)
(requestStorageAccess23, requestStorageAccess30)
(requestStorageAccess): New functions.

* lisp/startup.el (fancy-startup-tail, normal-splash-screen):
Call android-win functions for inserting the new storage
permission notice.

* lisp/term/android-win.el
(android-display-storage-permission-popup)
(android-after-splash-screen): New functions.

* src/android.c (android_init_emacs_service): Link to new Java
functions.
(android_external_storage_available_p)
(android_request_storage_access): New functions.

* src/android.h: Update prototypes.

* src/androidfns.c (Fandroid_external_storage_available_p)
(Fandroid_request_storage_access): New functions.
(syms_of_androidfns): Register new subrs.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* java/org/gnu/emacs/EmacsService.java (externalStorageAvailable)
(requestStorageAccess23, requestStorageAccess30)
(requestStorageAccess): New functions.

* lisp/startup.el (fancy-startup-tail, normal-splash-screen):
Call android-win functions for inserting the new storage
permission notice.

* lisp/term/android-win.el
(android-display-storage-permission-popup)
(android-after-splash-screen): New functions.

* src/android.c (android_init_emacs_service): Link to new Java
functions.
(android_external_storage_available_p)
(android_request_storage_access): New functions.

* src/android.h: Update prototypes.

* src/androidfns.c (Fandroid_external_storage_available_p)
(Fandroid_request_storage_access): New functions.
(syms_of_androidfns): Register new subrs.
</pre>
</div>
</content>
</entry>
<entry>
<title>Register ``pinch to zoom'' touch screen gestures</title>
<updated>2023-11-15T13:07:14+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2023-11-15T12:58:46+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=a9a8d5e95992ab63a63305e2a0b2d2b36bb2c698'/>
<id>a9a8d5e95992ab63a63305e2a0b2d2b36bb2c698</id>
<content type='text'>
* doc/emacs/input.texi (Touchscreens): Address pinch gestures.

* doc/lispref/commands.texi (Touchscreen Events): Address touch
screen pinch events and the process by which they are produced.

* java/org/gnu/emacs/EmacsWindow.java (figureChange)
&lt;ACTION_POINTER_DOWN&gt;: Supply pointer index to getX and getY,
correcting a mistake where the first touch point's coordinate
was saved here in lieu of the pointer that was pressed's.

* lisp/touch-screen.el (touch-screen-current-tool): Revise doc
string.
(touch-screen-aux-tool): New variable.
(touch-screen-scroll-point-to-y, touch-screen-pinch): New
functions.
(global-map): Bind [touchscreen-pinch] to touch-screen-pinch.
(touch-screen-handle-point-update): Revise doc string; set new
tenth field of t-s-c-t to POINT relative to its window, without
regard to whether an event has been sent.
(touch-screen-distance, touch-screen-centrum): New functions.
(touch-screen-handle-aux-point-update): New function; generate
and send touchscreen-pinch if need be.
(touch-screen-handle-point-up): If an ancillary tool exists,
transfer the information there into touch-screen-current-tool
and clear t-s-a-t.
(touch-screen-handle-touch): Call t-s-a-p-u as is proper; set
t-s-a-t if a touchscreen-down event arrives and t-s-c-t is set.

* src/androidterm.c (handle_one_android_event): Properly save
the event's X and Y when a new touch point is registered.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* doc/emacs/input.texi (Touchscreens): Address pinch gestures.

* doc/lispref/commands.texi (Touchscreen Events): Address touch
screen pinch events and the process by which they are produced.

* java/org/gnu/emacs/EmacsWindow.java (figureChange)
&lt;ACTION_POINTER_DOWN&gt;: Supply pointer index to getX and getY,
correcting a mistake where the first touch point's coordinate
was saved here in lieu of the pointer that was pressed's.

* lisp/touch-screen.el (touch-screen-current-tool): Revise doc
string.
(touch-screen-aux-tool): New variable.
(touch-screen-scroll-point-to-y, touch-screen-pinch): New
functions.
(global-map): Bind [touchscreen-pinch] to touch-screen-pinch.
(touch-screen-handle-point-update): Revise doc string; set new
tenth field of t-s-c-t to POINT relative to its window, without
regard to whether an event has been sent.
(touch-screen-distance, touch-screen-centrum): New functions.
(touch-screen-handle-aux-point-update): New function; generate
and send touchscreen-pinch if need be.
(touch-screen-handle-point-up): If an ancillary tool exists,
transfer the information there into touch-screen-current-tool
and clear t-s-a-t.
(touch-screen-handle-touch): Call t-s-a-p-u as is proper; set
t-s-a-t if a touchscreen-down event arrives and t-s-c-t is set.

* src/androidterm.c (handle_one_android_event): Properly save
the event's X and Y when a new touch point is registered.
</pre>
</div>
</content>
</entry>
<entry>
<title>Properly merge EXTRA_EMAIL content with mailto URIs</title>
<updated>2023-11-14T02:57:18+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2023-11-14T02:57:18+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=bda31b2c6d62652c742e800b692dffd926f8284b'/>
<id>bda31b2c6d62652c742e800b692dffd926f8284b</id>
<content type='text'>
* java/org/gnu/emacs/EmacsOpenActivity.java (onCreate):
EXTRA_EMAIL is an array rather than a string, so insert
its first element into an empty mailto URI.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* java/org/gnu/emacs/EmacsOpenActivity.java (onCreate):
EXTRA_EMAIL is an array rather than a string, so insert
its first element into an empty mailto URI.
</pre>
</div>
</content>
</entry>
<entry>
<title>Adjust dump file location under Android</title>
<updated>2023-11-12T03:44:58+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2023-11-12T03:44:58+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=e56e9c19545f43c35dec85fa650f3799c6e9c308'/>
<id>e56e9c19545f43c35dec85fa650f3799c6e9c308</id>
<content type='text'>
* java/org/gnu/emacs/EmacsApplication.java (EmacsApplication)
&lt;apkFileName&gt;: 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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* java/org/gnu/emacs/EmacsApplication.java (EmacsApplication)
&lt;apkFileName&gt;: 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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Clear image caches in reaction to system VM warnings</title>
<updated>2023-11-10T06:58:16+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2023-11-10T06:57:24+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=5324723c2bcab7062f393a5057e51733a1715788'/>
<id>5324723c2bcab7062f393a5057e51733a1715788</id>
<content type='text'>
* 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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Guarantee files are auto-saved when Emacs is terminated by Android</title>
<updated>2023-11-09T02:12:24+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2023-11-09T02:12:24+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=21f36705266934d5a351d4d7f360734540132139'/>
<id>21f36705266934d5a351d4d7f360734540132139</id>
<content type='text'>
* 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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Avert a crash and file descriptor leak in yank-media</title>
<updated>2023-10-29T04:59:45+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2023-10-29T04:59:45+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=59a3edc3559057e6f0346e3f1b3b13e8ef3e1683'/>
<id>59a3edc3559057e6f0346e3f1b3b13e8ef3e1683</id>
<content type='text'>
* 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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Minor adjustments to Android drag and drop and content URIs</title>
<updated>2023-10-28T02:19:41+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2023-10-28T02:02:58+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=f0d42c5e47eaba2c8ccee0a804965a2b71923d41'/>
<id>f0d42c5e47eaba2c8ccee0a804965a2b71923d41</id>
<content type='text'>
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow)
&lt;dndXPosition, dndYPosition&gt;: 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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow)
&lt;dndXPosition, dndYPosition&gt;: 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.
</pre>
</div>
</content>
</entry>
</feed>
