diff options
Diffstat (limited to 'java')
60 files changed, 176 insertions, 69 deletions
diff --git a/java/AndroidManifest.xml.in b/java/AndroidManifest.xml.in index ceec7a97b98..a1760294046 100644 --- a/java/AndroidManifest.xml.in +++ b/java/AndroidManifest.xml.in | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <!-- @configure_input@ | 1 | <!-- @configure_input@ |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -207,7 +207,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. --> | |||
| 207 | <uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE"/> | 207 | <uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE"/> |
| 208 | 208 | ||
| 209 | <uses-sdk android:minSdkVersion="@ANDROID_MIN_SDK@" | 209 | <uses-sdk android:minSdkVersion="@ANDROID_MIN_SDK@" |
| 210 | android:targetSdkVersion="35"/> | 210 | android:targetSdkVersion="36"/> |
| 211 | 211 | ||
| 212 | <application android:name="org.gnu.emacs.EmacsApplication" | 212 | <application android:name="org.gnu.emacs.EmacsApplication" |
| 213 | android:label="Emacs" | 213 | android:label="Emacs" |
diff --git a/java/INSTALL b/java/INSTALL index 6fbf7ba5d6c..f0263037d22 100644 --- a/java/INSTALL +++ b/java/INSTALL | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | Installation instructions for Android | 1 | Installation instructions for Android |
| 2 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 3 | See the end of the file for license conditions. | 3 | See the end of the file for license conditions. |
| 4 | 4 | ||
| 5 | Please read the entirety of this file before attempting to build Emacs | 5 | Please read the entirety of this file before attempting to build Emacs |
| @@ -39,7 +39,7 @@ script like so: | |||
| 39 | Replacing the paths in the command line above with: | 39 | Replacing the paths in the command line above with: |
| 40 | 40 | ||
| 41 | - the path to the `android.jar' headers which come with the Android | 41 | - the path to the `android.jar' headers which come with the Android |
| 42 | SDK. They must correspond to Android version 15 (API level 35). | 42 | SDK. They must correspond to Android version 16 (API level 36). |
| 43 | 43 | ||
| 44 | - the path to the C compiler in the Android NDK, for the kind of CPU | 44 | - the path to the C compiler in the Android NDK, for the kind of CPU |
| 45 | you are building Emacs to run on. | 45 | you are building Emacs to run on. |
| @@ -116,7 +116,7 @@ DEX format employed by Android. There is one subdirectory for each | |||
| 116 | version of the build tools, but the version you opt for is not of | 116 | version of the build tools, but the version you opt for is not of |
| 117 | paramount significance: if your version does not work, configure will | 117 | paramount significance: if your version does not work, configure will |
| 118 | protest, so install a newer one. We anticipate that most recent | 118 | protest, so install a newer one. We anticipate that most recent |
| 119 | releases will work, such as those from the 34.0.x, and 35.0.x series. | 119 | releases will work, such as those from the 35.0.x and 36.0.x series. |
| 120 | 120 | ||
| 121 | 121 | ||
| 122 | BUILDING WITH OLD NDK VERSIONS | 122 | BUILDING WITH OLD NDK VERSIONS |
diff --git a/java/Makefile.in b/java/Makefile.in index 4988290a207..bd39f32a005 100644 --- a/java/Makefile.in +++ b/java/Makefile.in | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ### @configure_input@ | 1 | ### @configure_input@ |
| 2 | 2 | ||
| 3 | # Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | # Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | # This file is part of GNU Emacs. | 5 | # This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/debug.sh b/java/debug.sh index b81197675fe..ee1d50aa1f4 100755 --- a/java/debug.sh +++ b/java/debug.sh | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | ### Run Emacs under GDB or JDB on Android. | 2 | ### Run Emacs under GDB or JDB on Android. |
| 3 | 3 | ||
| 4 | ## Copyright (C) 2023-2025 Free Software Foundation, Inc. | 4 | ## Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ## This file is part of GNU Emacs. | 6 | ## This file is part of GNU Emacs. |
| 7 | 7 | ||
diff --git a/java/org/gnu/emacs/EmacsActivity.java b/java/org/gnu/emacs/EmacsActivity.java index 439a8defa32..d0d6ac49419 100644 --- a/java/org/gnu/emacs/EmacsActivity.java +++ b/java/org/gnu/emacs/EmacsActivity.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -50,6 +50,11 @@ import android.view.WindowInsetsController; | |||
| 50 | 50 | ||
| 51 | import android.widget.FrameLayout; | 51 | import android.widget.FrameLayout; |
| 52 | 52 | ||
| 53 | import android.window.BackEvent; | ||
| 54 | import android.window.OnBackAnimationCallback; | ||
| 55 | import android.window.OnBackInvokedCallback; | ||
| 56 | import android.window.OnBackInvokedDispatcher; | ||
| 57 | |||
| 53 | public class EmacsActivity extends Activity | 58 | public class EmacsActivity extends Activity |
| 54 | implements EmacsWindowManager.WindowConsumer, | 59 | implements EmacsWindowManager.WindowConsumer, |
| 55 | ViewTreeObserver.OnGlobalLayoutListener | 60 | ViewTreeObserver.OnGlobalLayoutListener |
| @@ -252,6 +257,59 @@ public class EmacsActivity extends Activity | |||
| 252 | return window; | 257 | return window; |
| 253 | } | 258 | } |
| 254 | 259 | ||
| 260 | private void | ||
| 261 | interceptBackGesture () | ||
| 262 | { | ||
| 263 | OnBackInvokedDispatcher dispatcher; | ||
| 264 | int priority = OnBackInvokedDispatcher.PRIORITY_DEFAULT; | ||
| 265 | OnBackInvokedCallback callback; | ||
| 266 | |||
| 267 | dispatcher = getOnBackInvokedDispatcher (); | ||
| 268 | callback = new OnBackAnimationCallback () { | ||
| 269 | @Override | ||
| 270 | public void | ||
| 271 | onBackInvoked () | ||
| 272 | { | ||
| 273 | View view = EmacsActivity.this.getCurrentFocus (); | ||
| 274 | EmacsWindow window; | ||
| 275 | |||
| 276 | if (view instanceof EmacsView) | ||
| 277 | { | ||
| 278 | window = ((EmacsView) view).window; | ||
| 279 | window.onBackInvoked (); | ||
| 280 | } | ||
| 281 | } | ||
| 282 | |||
| 283 | /* The three functions are overridden to prevent a misleading | ||
| 284 | back animation from being displayed, as Emacs intercepts all | ||
| 285 | back gestures and will not return to the home screen. */ | ||
| 286 | |||
| 287 | @Override | ||
| 288 | public void | ||
| 289 | onBackCancelled () | ||
| 290 | { | ||
| 291 | |||
| 292 | } | ||
| 293 | |||
| 294 | @Override | ||
| 295 | public void | ||
| 296 | onBackProgressed (BackEvent gestureEvent) | ||
| 297 | { | ||
| 298 | |||
| 299 | } | ||
| 300 | |||
| 301 | @Override | ||
| 302 | public void | ||
| 303 | onBackStarted (BackEvent gestureEvent) | ||
| 304 | { | ||
| 305 | |||
| 306 | } | ||
| 307 | }; | ||
| 308 | dispatcher.registerOnBackInvokedCallback (priority, callback); | ||
| 309 | } | ||
| 310 | |||
| 311 | |||
| 312 | |||
| 255 | @Override | 313 | @Override |
| 256 | public void | 314 | public void |
| 257 | onCreate (Bundle savedInstanceState) | 315 | onCreate (Bundle savedInstanceState) |
| @@ -286,6 +344,11 @@ public class EmacsActivity extends Activity | |||
| 286 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) | 344 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) |
| 287 | layout.setFitsSystemWindows (true); | 345 | layout.setFitsSystemWindows (true); |
| 288 | 346 | ||
| 347 | /* Android 16 replaces KEYCODE_BACK with a callback registered at | ||
| 348 | the window level. */ | ||
| 349 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.BAKLAVA) | ||
| 350 | interceptBackGesture (); | ||
| 351 | |||
| 289 | /* Maybe start the Emacs service if necessary. */ | 352 | /* Maybe start the Emacs service if necessary. */ |
| 290 | EmacsService.startEmacsService (this); | 353 | EmacsService.startEmacsService (this); |
| 291 | 354 | ||
diff --git a/java/org/gnu/emacs/EmacsApplication.java b/java/org/gnu/emacs/EmacsApplication.java index d5670bc31b4..d5d3b015a90 100644 --- a/java/org/gnu/emacs/EmacsApplication.java +++ b/java/org/gnu/emacs/EmacsApplication.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsClipboard.java b/java/org/gnu/emacs/EmacsClipboard.java index bab0e76ddaa..1fc1d6d94b4 100644 --- a/java/org/gnu/emacs/EmacsClipboard.java +++ b/java/org/gnu/emacs/EmacsClipboard.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsContextMenu.java b/java/org/gnu/emacs/EmacsContextMenu.java index fff77612227..d32f1c9fe06 100644 --- a/java/org/gnu/emacs/EmacsContextMenu.java +++ b/java/org/gnu/emacs/EmacsContextMenu.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsCursor.java b/java/org/gnu/emacs/EmacsCursor.java index 0b9732d2e1a..247e8d9c087 100644 --- a/java/org/gnu/emacs/EmacsCursor.java +++ b/java/org/gnu/emacs/EmacsCursor.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsDesktopNotification.java b/java/org/gnu/emacs/EmacsDesktopNotification.java index 390a0f03bd8..d449872f675 100644 --- a/java/org/gnu/emacs/EmacsDesktopNotification.java +++ b/java/org/gnu/emacs/EmacsDesktopNotification.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsDialog.java b/java/org/gnu/emacs/EmacsDialog.java index c706a60158a..d380c1c3041 100644 --- a/java/org/gnu/emacs/EmacsDialog.java +++ b/java/org/gnu/emacs/EmacsDialog.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsDialogButtonLayout.java b/java/org/gnu/emacs/EmacsDialogButtonLayout.java index a1f3813c28a..d65c41b277b 100644 --- a/java/org/gnu/emacs/EmacsDialogButtonLayout.java +++ b/java/org/gnu/emacs/EmacsDialogButtonLayout.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsDirectoryEntry.java b/java/org/gnu/emacs/EmacsDirectoryEntry.java index 86b14e51da0..06397f73cac 100644 --- a/java/org/gnu/emacs/EmacsDirectoryEntry.java +++ b/java/org/gnu/emacs/EmacsDirectoryEntry.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsDocumentsProvider.java b/java/org/gnu/emacs/EmacsDocumentsProvider.java index 400432cb742..daf24ece451 100644 --- a/java/org/gnu/emacs/EmacsDocumentsProvider.java +++ b/java/org/gnu/emacs/EmacsDocumentsProvider.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsDrawLine.java b/java/org/gnu/emacs/EmacsDrawLine.java index 7a60315c394..39069652061 100644 --- a/java/org/gnu/emacs/EmacsDrawLine.java +++ b/java/org/gnu/emacs/EmacsDrawLine.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsDrawPoint.java b/java/org/gnu/emacs/EmacsDrawPoint.java index 9e7a8dcff49..b36fb2e287c 100644 --- a/java/org/gnu/emacs/EmacsDrawPoint.java +++ b/java/org/gnu/emacs/EmacsDrawPoint.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsDrawRectangle.java b/java/org/gnu/emacs/EmacsDrawRectangle.java index b1d17313feb..6d3447c2b2d 100644 --- a/java/org/gnu/emacs/EmacsDrawRectangle.java +++ b/java/org/gnu/emacs/EmacsDrawRectangle.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsDrawable.java b/java/org/gnu/emacs/EmacsDrawable.java index 4bfe10060db..8f69a649570 100644 --- a/java/org/gnu/emacs/EmacsDrawable.java +++ b/java/org/gnu/emacs/EmacsDrawable.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsFillPolygon.java b/java/org/gnu/emacs/EmacsFillPolygon.java index 03919e723ef..f960e309eec 100644 --- a/java/org/gnu/emacs/EmacsFillPolygon.java +++ b/java/org/gnu/emacs/EmacsFillPolygon.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsFillRectangle.java b/java/org/gnu/emacs/EmacsFillRectangle.java index 1b98d420031..70e262f3f82 100644 --- a/java/org/gnu/emacs/EmacsFillRectangle.java +++ b/java/org/gnu/emacs/EmacsFillRectangle.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsFontDriver.java b/java/org/gnu/emacs/EmacsFontDriver.java index f451f53e636..1bdf041b0d0 100644 --- a/java/org/gnu/emacs/EmacsFontDriver.java +++ b/java/org/gnu/emacs/EmacsFontDriver.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Font backend for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Font backend for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsGC.java b/java/org/gnu/emacs/EmacsGC.java index dcec659ecc7..dbf00eb7606 100644 --- a/java/org/gnu/emacs/EmacsGC.java +++ b/java/org/gnu/emacs/EmacsGC.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsHandleObject.java b/java/org/gnu/emacs/EmacsHandleObject.java index 74837753424..b60f4b32f21 100644 --- a/java/org/gnu/emacs/EmacsHandleObject.java +++ b/java/org/gnu/emacs/EmacsHandleObject.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsHolder.java b/java/org/gnu/emacs/EmacsHolder.java index fe420afbc01..02a93d8e002 100644 --- a/java/org/gnu/emacs/EmacsHolder.java +++ b/java/org/gnu/emacs/EmacsHolder.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsInputConnection.java b/java/org/gnu/emacs/EmacsInputConnection.java index b872212d9eb..09433a28c0e 100644 --- a/java/org/gnu/emacs/EmacsInputConnection.java +++ b/java/org/gnu/emacs/EmacsInputConnection.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsLauncherPreferencesActivity.java b/java/org/gnu/emacs/EmacsLauncherPreferencesActivity.java index 36be0d15c86..25a9d68e055 100644 --- a/java/org/gnu/emacs/EmacsLauncherPreferencesActivity.java +++ b/java/org/gnu/emacs/EmacsLauncherPreferencesActivity.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsMultitaskActivity.java b/java/org/gnu/emacs/EmacsMultitaskActivity.java index 0ee1c8cf665..0a7677b84ef 100644 --- a/java/org/gnu/emacs/EmacsMultitaskActivity.java +++ b/java/org/gnu/emacs/EmacsMultitaskActivity.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsNative.java b/java/org/gnu/emacs/EmacsNative.java index 49a21ce1c4d..2c2537da27d 100644 --- a/java/org/gnu/emacs/EmacsNative.java +++ b/java/org/gnu/emacs/EmacsNative.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -61,6 +61,9 @@ public final class EmacsNative | |||
| 61 | scaledDensity is the DPI value used to translate point sizes to | 61 | scaledDensity is the DPI value used to translate point sizes to |
| 62 | pixel sizes when loading fonts. | 62 | pixel sizes when loading fonts. |
| 63 | 63 | ||
| 64 | uiMode holds the bits of the system's UI mode specification | ||
| 65 | defining the active system theme. | ||
| 66 | |||
| 64 | classPath must be the classpath of this app_process process, or | 67 | classPath must be the classpath of this app_process process, or |
| 65 | NULL. | 68 | NULL. |
| 66 | 69 | ||
| @@ -74,6 +77,7 @@ public final class EmacsNative | |||
| 74 | float pixelDensityX, | 77 | float pixelDensityX, |
| 75 | float pixelDensityY, | 78 | float pixelDensityY, |
| 76 | float scaledDensity, | 79 | float scaledDensity, |
| 80 | int uiMode, | ||
| 77 | String classPath, | 81 | String classPath, |
| 78 | EmacsService emacsService, | 82 | EmacsService emacsService, |
| 79 | int apiLevel); | 83 | int apiLevel); |
| @@ -197,8 +201,9 @@ public final class EmacsNative | |||
| 197 | public static native void sendNotificationAction (String tag, String action); | 201 | public static native void sendNotificationAction (String tag, String action); |
| 198 | 202 | ||
| 199 | /* Send an ANDROID_CONFIGURATION_CHANGED event. */ | 203 | /* Send an ANDROID_CONFIGURATION_CHANGED event. */ |
| 200 | public static native void sendConfigurationChanged (float dpiX, float dpiY, | 204 | public static native void sendConfigurationChanged (int detail, float dpiX, |
| 201 | float dpiScaled); | 205 | float dpiY, float dpiScaled, |
| 206 | int ui_mode); | ||
| 202 | 207 | ||
| 203 | /* Return the file name associated with the specified file | 208 | /* Return the file name associated with the specified file |
| 204 | descriptor, or NULL if there is none. */ | 209 | descriptor, or NULL if there is none. */ |
diff --git a/java/org/gnu/emacs/EmacsNoninteractive.java b/java/org/gnu/emacs/EmacsNoninteractive.java index 83ef04b1cf1..4ffe33e6dbb 100644 --- a/java/org/gnu/emacs/EmacsNoninteractive.java +++ b/java/org/gnu/emacs/EmacsNoninteractive.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -67,7 +67,7 @@ public final class EmacsNoninteractive | |||
| 67 | cacheDir = context.getCacheDir ().getCanonicalPath (); | 67 | cacheDir = context.getCacheDir ().getCanonicalPath (); |
| 68 | EmacsNative.setEmacsParams (assets, filesDir, | 68 | EmacsNative.setEmacsParams (assets, filesDir, |
| 69 | libDir, cacheDir, 0.0f, | 69 | libDir, cacheDir, 0.0f, |
| 70 | 0.0f, 0.0f, null, null, | 70 | 0.0f, 0.0f, 0x0, null, null, |
| 71 | Build.VERSION.SDK_INT); | 71 | Build.VERSION.SDK_INT); |
| 72 | 72 | ||
| 73 | /* Now find the dump file that Emacs should use, if it has already | 73 | /* Now find the dump file that Emacs should use, if it has already |
diff --git a/java/org/gnu/emacs/EmacsOpenActivity.java b/java/org/gnu/emacs/EmacsOpenActivity.java index 908465ad69d..d72fc50ea68 100644 --- a/java/org/gnu/emacs/EmacsOpenActivity.java +++ b/java/org/gnu/emacs/EmacsOpenActivity.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsPixmap.java b/java/org/gnu/emacs/EmacsPixmap.java index c4eb85d765d..12f2f426d6a 100644 --- a/java/org/gnu/emacs/EmacsPixmap.java +++ b/java/org/gnu/emacs/EmacsPixmap.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsPreferencesActivity.java b/java/org/gnu/emacs/EmacsPreferencesActivity.java index 18bff1ed508..bbae458091b 100644 --- a/java/org/gnu/emacs/EmacsPreferencesActivity.java +++ b/java/org/gnu/emacs/EmacsPreferencesActivity.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsSafThread.java b/java/org/gnu/emacs/EmacsSafThread.java index 3857397fe77..a02cbd50bdf 100644 --- a/java/org/gnu/emacs/EmacsSafThread.java +++ b/java/org/gnu/emacs/EmacsSafThread.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsSdk11Clipboard.java b/java/org/gnu/emacs/EmacsSdk11Clipboard.java index 48715646e77..75697c116ba 100644 --- a/java/org/gnu/emacs/EmacsSdk11Clipboard.java +++ b/java/org/gnu/emacs/EmacsSdk11Clipboard.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsSdk23FontDriver.java b/java/org/gnu/emacs/EmacsSdk23FontDriver.java index d1c6c7faad3..fa884db5461 100644 --- a/java/org/gnu/emacs/EmacsSdk23FontDriver.java +++ b/java/org/gnu/emacs/EmacsSdk23FontDriver.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Font backend for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Font backend for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsSdk7FontDriver.java b/java/org/gnu/emacs/EmacsSdk7FontDriver.java index b426c3ba74e..c4ef68382a3 100644 --- a/java/org/gnu/emacs/EmacsSdk7FontDriver.java +++ b/java/org/gnu/emacs/EmacsSdk7FontDriver.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Font backend for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Font backend for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsSdk8Clipboard.java b/java/org/gnu/emacs/EmacsSdk8Clipboard.java index ddb2171ceb1..f5dee4c9986 100644 --- a/java/org/gnu/emacs/EmacsSdk8Clipboard.java +++ b/java/org/gnu/emacs/EmacsSdk8Clipboard.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsService.java b/java/org/gnu/emacs/EmacsService.java index 3630329839f..9e85b195e67 100644 --- a/java/org/gnu/emacs/EmacsService.java +++ b/java/org/gnu/emacs/EmacsService.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -150,6 +150,10 @@ public final class EmacsService extends Service | |||
| 150 | consulted for font scaling. */ | 150 | consulted for font scaling. */ |
| 151 | private double dpiX, dpiY, dpiScaled; | 151 | private double dpiX, dpiY, dpiScaled; |
| 152 | 152 | ||
| 153 | /* The display's previously observed UI mode as it relates to the | ||
| 154 | system theme. */ | ||
| 155 | private int uiMode; | ||
| 156 | |||
| 153 | static | 157 | static |
| 154 | { | 158 | { |
| 155 | servicingQuery = new AtomicInteger (); | 159 | servicingQuery = new AtomicInteger (); |
| @@ -240,6 +244,7 @@ public final class EmacsService extends Service | |||
| 240 | float tempScaledDensity; | 244 | float tempScaledDensity; |
| 241 | Resources resources; | 245 | Resources resources; |
| 242 | DisplayMetrics metrics; | 246 | DisplayMetrics metrics; |
| 247 | Configuration configuration; | ||
| 243 | 248 | ||
| 244 | super.onCreate (); | 249 | super.onCreate (); |
| 245 | 250 | ||
| @@ -254,6 +259,8 @@ public final class EmacsService extends Service | |||
| 254 | tempScaledDensity = ((getScaledDensity (metrics) | 259 | tempScaledDensity = ((getScaledDensity (metrics) |
| 255 | / metrics.density) | 260 | / metrics.density) |
| 256 | * pixelDensityX); | 261 | * pixelDensityX); |
| 262 | configuration = resources.getConfiguration (); | ||
| 263 | uiMode = configuration.uiMode & Configuration.UI_MODE_NIGHT_MASK; | ||
| 257 | resolver = getContentResolver (); | 264 | resolver = getContentResolver (); |
| 258 | mainThread = Thread.currentThread (); | 265 | mainThread = Thread.currentThread (); |
| 259 | 266 | ||
| @@ -311,7 +318,8 @@ public final class EmacsService extends Service | |||
| 311 | EmacsNative.setEmacsParams (manager, filesDir, libDir, | 318 | EmacsNative.setEmacsParams (manager, filesDir, libDir, |
| 312 | cacheDir, pixelDensityX, | 319 | cacheDir, pixelDensityX, |
| 313 | pixelDensityY, scaledDensity, | 320 | pixelDensityY, scaledDensity, |
| 314 | classPath, EmacsService.this, | 321 | uiMode, classPath, |
| 322 | EmacsService.this, | ||
| 315 | Build.VERSION.SDK_INT); | 323 | Build.VERSION.SDK_INT); |
| 316 | } | 324 | } |
| 317 | }, extraStartupArguments); | 325 | }, extraStartupArguments); |
| @@ -375,8 +383,14 @@ public final class EmacsService extends Service | |||
| 375 | dpiX = pixelDensityX; | 383 | dpiX = pixelDensityX; |
| 376 | dpiY = pixelDensityY; | 384 | dpiY = pixelDensityY; |
| 377 | dpiScaled = scaledDensity; | 385 | dpiScaled = scaledDensity; |
| 378 | EmacsNative.sendConfigurationChanged (pixelDensityX, pixelDensityY, | 386 | EmacsNative.sendConfigurationChanged (0, pixelDensityX, pixelDensityY, |
| 379 | scaledDensity); | 387 | scaledDensity, 0); |
| 388 | } | ||
| 389 | |||
| 390 | if ((newConfig.uiMode & Configuration.UI_MODE_NIGHT_MASK) != uiMode) | ||
| 391 | { | ||
| 392 | uiMode = newConfig.uiMode & Configuration.UI_MODE_NIGHT_MASK; | ||
| 393 | EmacsNative.sendConfigurationChanged (1, 0.0f, 0.0f, 0.0f, uiMode); | ||
| 380 | } | 394 | } |
| 381 | 395 | ||
| 382 | super.onConfigurationChanged (newConfig); | 396 | super.onConfigurationChanged (newConfig); |
diff --git a/java/org/gnu/emacs/EmacsSurfaceView.java b/java/org/gnu/emacs/EmacsSurfaceView.java index 8e76113143b..4c6f1811a85 100644 --- a/java/org/gnu/emacs/EmacsSurfaceView.java +++ b/java/org/gnu/emacs/EmacsSurfaceView.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsThread.java b/java/org/gnu/emacs/EmacsThread.java index 312b657d336..3dc534a5ec2 100644 --- a/java/org/gnu/emacs/EmacsThread.java +++ b/java/org/gnu/emacs/EmacsThread.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsTileObject.java b/java/org/gnu/emacs/EmacsTileObject.java index 506e940657c..c080988e3d5 100644 --- a/java/org/gnu/emacs/EmacsTileObject.java +++ b/java/org/gnu/emacs/EmacsTileObject.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2024-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2024-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsView.java b/java/org/gnu/emacs/EmacsView.java index 8f16dbad257..f2ec99d720f 100644 --- a/java/org/gnu/emacs/EmacsView.java +++ b/java/org/gnu/emacs/EmacsView.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/org/gnu/emacs/EmacsWindow.java b/java/org/gnu/emacs/EmacsWindow.java index 394b2c26414..4edae96ca0d 100644 --- a/java/org/gnu/emacs/EmacsWindow.java +++ b/java/org/gnu/emacs/EmacsWindow.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -58,6 +58,7 @@ import android.util.SparseArray; | |||
| 58 | import android.util.Log; | 58 | import android.util.Log; |
| 59 | 59 | ||
| 60 | import android.os.Build; | 60 | import android.os.Build; |
| 61 | import android.os.SystemClock; | ||
| 61 | 62 | ||
| 62 | /* This defines a window, which is a handle. Windows represent a | 63 | /* This defines a window, which is a handle. Windows represent a |
| 63 | rectangular subset of the screen with their own contents. | 64 | rectangular subset of the screen with their own contents. |
| @@ -425,6 +426,16 @@ public final class EmacsWindow extends EmacsHandleObject | |||
| 425 | requestViewLayout (); | 426 | requestViewLayout (); |
| 426 | } | 427 | } |
| 427 | 428 | ||
| 429 | public synchronized void | ||
| 430 | moveResizeWindow (int x, int y, int width, int height) | ||
| 431 | { | ||
| 432 | rect.left = x; | ||
| 433 | rect.top = y; | ||
| 434 | rect.right = x + width; | ||
| 435 | rect.bottom = y + height; | ||
| 436 | requestViewLayout (); | ||
| 437 | } | ||
| 438 | |||
| 428 | /* Return WM layout parameters for an override redirect window with | 439 | /* Return WM layout parameters for an override redirect window with |
| 429 | the geometry provided here. */ | 440 | the geometry provided here. */ |
| 430 | 441 | ||
| @@ -890,6 +901,20 @@ public final class EmacsWindow extends EmacsHandleObject | |||
| 890 | EmacsNative.sendWindowAction (this.handle, 0); | 901 | EmacsNative.sendWindowAction (this.handle, 0); |
| 891 | } | 902 | } |
| 892 | 903 | ||
| 904 | /* Dispatch a back gesture invocation as a KeyPress event. Lamentably | ||
| 905 | the platform does not appear to support reporting keyboard | ||
| 906 | modifiers with these events. */ | ||
| 907 | |||
| 908 | public void | ||
| 909 | onBackInvoked () | ||
| 910 | { | ||
| 911 | long time = SystemClock.uptimeMillis (); | ||
| 912 | EmacsNative.sendKeyPress (this.handle, time, 0, | ||
| 913 | KeyEvent.KEYCODE_BACK, 0); | ||
| 914 | EmacsNative.sendKeyRelease (this.handle, time, 0, | ||
| 915 | KeyEvent.KEYCODE_BACK, 0); | ||
| 916 | } | ||
| 917 | |||
| 893 | 918 | ||
| 894 | 919 | ||
| 895 | /* Mouse and touch event handling. | 920 | /* Mouse and touch event handling. |
diff --git a/java/org/gnu/emacs/EmacsWindowManager.java b/java/org/gnu/emacs/EmacsWindowManager.java index 6b32c8f8614..91a2eecef19 100644 --- a/java/org/gnu/emacs/EmacsWindowManager.java +++ b/java/org/gnu/emacs/EmacsWindowManager.java | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- | 1 | /* Communication module for Android terminals. -*- c-file-style: "GNU" -*- |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/proguard.conf b/java/proguard.conf index a441fd2b17e..78a55e24bde 100644 --- a/java/proguard.conf +++ b/java/proguard.conf | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # Proguard configuration files for Emacs | 1 | # Proguard configuration files for Emacs |
| 2 | # | 2 | # |
| 3 | # Copyright (C) 2024-2025 Free Software Foundation, Inc. | 3 | # Copyright (C) 2024-2026 Free Software Foundation, Inc. |
| 4 | # | 4 | # |
| 5 | # This file is part of GNU Emacs. | 5 | # This file is part of GNU Emacs. |
| 6 | # | 6 | # |
diff --git a/java/res/drawable/emacs_background.xml b/java/res/drawable/emacs_background.xml index 9a75ade9156..582db0dfd79 100644 --- a/java/res/drawable/emacs_background.xml +++ b/java/res/drawable/emacs_background.xml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <!-- Adaptive icon for Emacs. | 1 | <!-- Adaptive icon for Emacs. |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/res/drawable/emacs_foreground.xml b/java/res/drawable/emacs_foreground.xml index 93bdb986489..4e6a584eaa3 100644 --- a/java/res/drawable/emacs_foreground.xml +++ b/java/res/drawable/emacs_foreground.xml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <!-- Adaptive icon for Emacs. | 1 | <!-- Adaptive icon for Emacs. |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/res/layout/sdk8_notifications_view.xml b/java/res/layout/sdk8_notifications_view.xml index 2165eeee2ef..e749007d3d3 100644 --- a/java/res/layout/sdk8_notifications_view.xml +++ b/java/res/layout/sdk8_notifications_view.xml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <!-- Notification content widget tree for GNU Emacs on Android 2.3. | 1 | <!-- Notification content widget tree for GNU Emacs on Android 2.3. |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/res/mipmap-v26/emacs_icon.xml b/java/res/mipmap-v26/emacs_icon.xml index a2f7a4cd166..de7e332473a 100644 --- a/java/res/mipmap-v26/emacs_icon.xml +++ b/java/res/mipmap-v26/emacs_icon.xml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <!-- Adaptive icon for Emacs. | 1 | <!-- Adaptive icon for Emacs. |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/res/values-v11/style.xml b/java/res/values-v11/style.xml index 5b9732614e5..f27d90b6d2f 100644 --- a/java/res/values-v11/style.xml +++ b/java/res/values-v11/style.xml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <!-- Style resources for GNU Emacs on Android. | 1 | <!-- Style resources for GNU Emacs on Android. |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/res/values-v14/style.xml b/java/res/values-v14/style.xml index e95974db6e5..d5b452e528c 100644 --- a/java/res/values-v14/style.xml +++ b/java/res/values-v14/style.xml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <!-- Style resources for GNU Emacs on Android. | 1 | <!-- Style resources for GNU Emacs on Android. |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/res/values-v19/bool.xml b/java/res/values-v19/bool.xml index 97890257a39..6dd921f058c 100644 --- a/java/res/values-v19/bool.xml +++ b/java/res/values-v19/bool.xml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <!-- Boolean resources for GNU Emacs on Android 4.4 or later. | 1 | <!-- Boolean resources for GNU Emacs on Android 4.4 or later. |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/res/values-v20/style.xml b/java/res/values-v20/style.xml index 285cd61ced6..7b0f4babb37 100644 --- a/java/res/values-v20/style.xml +++ b/java/res/values-v20/style.xml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <!-- Style resources for GNU Emacs on Android. | 1 | <!-- Style resources for GNU Emacs on Android. |
| 2 | 2 | ||
| 3 | Copyright (C) 2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2025-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/res/values-v24/bool.xml b/java/res/values-v24/bool.xml index 0b717a4425d..ebfcd00994c 100644 --- a/java/res/values-v24/bool.xml +++ b/java/res/values-v24/bool.xml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <!-- Boolean resources for GNU Emacs on Android. | 1 | <!-- Boolean resources for GNU Emacs on Android. |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/res/values-v29/style.xml b/java/res/values-v29/style.xml index 0ecfa7fc103..268e79b55dd 100644 --- a/java/res/values-v29/style.xml +++ b/java/res/values-v29/style.xml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <!-- Style resources for GNU Emacs on Android. | 1 | <!-- Style resources for GNU Emacs on Android. |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/res/values-v35/style.xml b/java/res/values-v35/style.xml index 0f7aeea5081..b1030444b62 100644 --- a/java/res/values-v35/style.xml +++ b/java/res/values-v35/style.xml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <!-- Style resources for GNU Emacs on Android. | 1 | <!-- Style resources for GNU Emacs on Android. |
| 2 | 2 | ||
| 3 | Copyright (C) 2024-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2024-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/res/values/bool.xml b/java/res/values/bool.xml index ccf033b39af..dcebb5d81e6 100644 --- a/java/res/values/bool.xml +++ b/java/res/values/bool.xml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <!-- Boolean resources for GNU Emacs on Android. | 1 | <!-- Boolean resources for GNU Emacs on Android. |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml index f01867c6537..810b05d3f68 100644 --- a/java/res/values/strings.xml +++ b/java/res/values/strings.xml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <!-- String resources used by GNU Emacs on Android. | 1 | <!-- String resources used by GNU Emacs on Android. |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/res/values/style.xml b/java/res/values/style.xml index 7ac16202613..3098223b439 100644 --- a/java/res/values/style.xml +++ b/java/res/values/style.xml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <!-- Style resources for GNU Emacs on Android. | 1 | <!-- Style resources for GNU Emacs on Android. |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/java/res/xml/preferences.xml b/java/res/xml/preferences.xml index 04342e43d04..8547e327a32 100644 --- a/java/res/xml/preferences.xml +++ b/java/res/xml/preferences.xml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <!-- Descriptions for the preferences screen for GNU Emacs on Android. | 1 | <!-- Descriptions for the preferences screen for GNU Emacs on Android. |
| 2 | 2 | ||
| 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2023-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||