diff options
| author | Po Lu | 2023-03-08 15:04:49 +0800 |
|---|---|---|
| committer | Po Lu | 2023-03-08 15:04:49 +0800 |
| commit | bb55528c7b58c5f50336ed3f2ff9759559d78680 (patch) | |
| tree | 6a4422afb19dc4ac9644d62b12d2a8aaf145deb3 /java | |
| parent | fdff5442a59fd2387c23e2be2658dafa39466891 (diff) | |
| download | emacs-bb55528c7b58c5f50336ed3f2ff9759559d78680.tar.gz emacs-bb55528c7b58c5f50336ed3f2ff9759559d78680.zip | |
Update Android port
* 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.
Diffstat (limited to 'java')
| -rw-r--r-- | java/org/gnu/emacs/EmacsService.java | 12 | ||||
| -rw-r--r-- | java/org/gnu/emacs/EmacsView.java | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/java/org/gnu/emacs/EmacsService.java b/java/org/gnu/emacs/EmacsService.java index f99d7a40067..848ad4de789 100644 --- a/java/org/gnu/emacs/EmacsService.java +++ b/java/org/gnu/emacs/EmacsService.java | |||
| @@ -29,6 +29,7 @@ import android.graphics.Point; | |||
| 29 | 29 | ||
| 30 | import android.view.InputDevice; | 30 | import android.view.InputDevice; |
| 31 | import android.view.KeyEvent; | 31 | import android.view.KeyEvent; |
| 32 | import android.view.inputmethod.ExtractedText; | ||
| 32 | 33 | ||
| 33 | import android.app.Notification; | 34 | import android.app.Notification; |
| 34 | import android.app.NotificationManager; | 35 | import android.app.NotificationManager; |
| @@ -811,4 +812,15 @@ public final class EmacsService extends Service | |||
| 811 | } | 812 | } |
| 812 | }); | 813 | }); |
| 813 | } | 814 | } |
| 815 | |||
| 816 | public void | ||
| 817 | updateExtractedText (EmacsWindow window, ExtractedText text, | ||
| 818 | int token) | ||
| 819 | { | ||
| 820 | if (DEBUG_IC) | ||
| 821 | Log.d (TAG, "updateExtractedText: @" + token + ", " + text); | ||
| 822 | |||
| 823 | window.view.imManager.updateExtractedText (window.view, | ||
| 824 | token, text); | ||
| 825 | } | ||
| 814 | }; | 826 | }; |
diff --git a/java/org/gnu/emacs/EmacsView.java b/java/org/gnu/emacs/EmacsView.java index 90a2c912a5a..6ace609f386 100644 --- a/java/org/gnu/emacs/EmacsView.java +++ b/java/org/gnu/emacs/EmacsView.java | |||
| @@ -569,6 +569,7 @@ public final class EmacsView extends ViewGroup | |||
| 569 | /* Make sure the input method never displays a full screen input | 569 | /* Make sure the input method never displays a full screen input |
| 570 | box that obscures Emacs. */ | 570 | box that obscures Emacs. */ |
| 571 | info.imeOptions = EditorInfo.IME_FLAG_NO_FULLSCREEN; | 571 | info.imeOptions = EditorInfo.IME_FLAG_NO_FULLSCREEN; |
| 572 | info.imeOptions |= EditorInfo.IME_FLAG_NO_EXTRACT_UI; | ||
| 572 | 573 | ||
| 573 | /* Set a reasonable inputType. */ | 574 | /* Set a reasonable inputType. */ |
| 574 | info.inputType = InputType.TYPE_CLASS_TEXT; | 575 | info.inputType = InputType.TYPE_CLASS_TEXT; |