diff options
| author | Po Lu | 2024-05-01 11:45:53 +0800 |
|---|---|---|
| committer | Po Lu | 2024-05-01 11:46:31 +0800 |
| commit | 2451456695d0e03b89365cbbe64effb2f99af2d5 (patch) | |
| tree | b6bcd3e227454b436ab4ee0fad447d946b5179cf /src/android.h | |
| parent | 294335b2304028cc97aca036bd37adf2f8e1c508 (diff) | |
| download | emacs-2451456695d0e03b89365cbbe64effb2f99af2d5.tar.gz emacs-2451456695d0e03b89365cbbe64effb2f99af2d5.zip | |
Fix compatibility issues with Android clipboards
* java/org/gnu/emacs/EmacsClipboard.java (getClipboardData):
Return an AssetFileDescriptor.
* java/org/gnu/emacs/EmacsContextMenu.java (onMenuItemClick):
Typo corrections in commentary.
* java/org/gnu/emacs/EmacsOpenActivity.java (onCreate): Raise
minimum version on which to read file descriptors from
ParcelFileDescriptor objects to Honeycomb.
* java/org/gnu/emacs/EmacsSdk11Clipboard.java
(getClipboardData): Return the asset file descriptor.
* java/org/gnu/emacs/EmacsSdk8Clipboard.java (getClipboardData):
Adjust return type to match.
* src/android.h (struct android_parcel_file_descriptor_class):
Move from androidselect.c.
* src/androidselect.c (fd_class): Export function.
(android_init_emacs_clipboard): Adjust signature of
getClipboardData.
(android_init_asset_file_descriptor, close_asset_fd)
(extract_fd_offsets): New functions.
(Fandroid_get_clipboard_data): Extract file descriptor and
offset from the AssetFileDescriptor here, rather than in
getClipboardData.
(init_androidselect): Call android_init_asset_file_descriptor.
* src/androidvfs.c (android_init_fd_class): Export and enable
calling this function more than once.
Diffstat (limited to 'src/android.h')
| -rw-r--r-- | src/android.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/android.h b/src/android.h index 19adfa38087..7074ca2630c 100644 --- a/src/android.h +++ b/src/android.h | |||
| @@ -53,6 +53,22 @@ extern char *android_user_full_name (struct passwd *); | |||
| 53 | 53 | ||
| 54 | 54 | ||
| 55 | 55 | ||
| 56 | /* Structure describing the android.os.ParcelFileDescriptor class used | ||
| 57 | to wrap file descriptors sent over IPC. */ | ||
| 58 | |||
| 59 | struct android_parcel_file_descriptor_class | ||
| 60 | { | ||
| 61 | jclass class; | ||
| 62 | jmethodID close; | ||
| 63 | jmethodID get_fd; | ||
| 64 | jmethodID detach_fd; | ||
| 65 | }; | ||
| 66 | |||
| 67 | /* The ParcelFileDescriptor class. */ | ||
| 68 | extern struct android_parcel_file_descriptor_class fd_class; | ||
| 69 | |||
| 70 | extern void android_init_fd_class (JNIEnv *); | ||
| 71 | |||
| 56 | /* File I/O operations. Many of these are defined in | 72 | /* File I/O operations. Many of these are defined in |
| 57 | androidvfs.c. */ | 73 | androidvfs.c. */ |
| 58 | 74 | ||