diff options
Diffstat (limited to 'java')
| -rw-r--r-- | java/AndroidManifest.xml.in | 2 | ||||
| -rw-r--r-- | java/INSTALL | 40 | ||||
| -rw-r--r-- | java/org/gnu/emacs/EmacsActivity.java | 6 | ||||
| -rw-r--r-- | java/org/gnu/emacs/EmacsFillPolygon.java | 13 |
4 files changed, 48 insertions, 13 deletions
diff --git a/java/AndroidManifest.xml.in b/java/AndroidManifest.xml.in index df00e497f8f..5c9714efab8 100644 --- a/java/AndroidManifest.xml.in +++ b/java/AndroidManifest.xml.in | |||
| @@ -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="34"/> | 210 | android:targetSdkVersion="35"/> |
| 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 91916c6586c..fa13a4d107d 100644 --- a/java/INSTALL +++ b/java/INSTALL | |||
| @@ -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 14 (API level 34). | 42 | SDK. They must correspond to Android version 15 (API level 35). |
| 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. |
| @@ -48,8 +48,8 @@ Replacing the paths in the command line above with: | |||
| 48 | such as `aapt', `apksigner', and `d8'. These are used to build | 48 | such as `aapt', `apksigner', and `d8'. These are used to build |
| 49 | the application package. | 49 | the application package. |
| 50 | 50 | ||
| 51 | Where the type of CPU can either be `armeabi', `armv7*', `i686', | 51 | Where the type of CPU can either be `aarch64', `armeabi', `armv7*', |
| 52 | `x86_64', `mips', or `mips64'. | 52 | `i686', `x86_64', `mips', or `mips64'. |
| 53 | 53 | ||
| 54 | After the configuration process completes, you may run: | 54 | After the configuration process completes, you may run: |
| 55 | 55 | ||
| @@ -87,13 +87,13 @@ necessary for compiling Emacs. | |||
| 87 | 87 | ||
| 88 | It is imperative that Emacs is compiled using the headers for the | 88 | It is imperative that Emacs is compiled using the headers for the |
| 89 | exact API level that it is written for. This is currently API level | 89 | exact API level that it is written for. This is currently API level |
| 90 | 34, so the correct android.jar archive is located within a directory | 90 | 35, so the correct android.jar archive is located within a directory |
| 91 | whose name begins with `android-34'. Minor revisions to the headers | 91 | whose name begins with `android-35'. Minor revisions to the headers |
| 92 | are inconsequential towards the Emacs compilation process; if there is | 92 | are inconsequential towards the Emacs compilation process; if there is |
| 93 | a directory named `android-34-extN' (where N represents a revision to | 93 | a directory named `android-35-extN' (where N represents a revision to |
| 94 | the Android SDK), whether you provide `configure' with that | 94 | the Android SDK), whether you provide `configure' with that |
| 95 | directory's android.jar or the android.jar contained within the | 95 | directory's android.jar or the android.jar contained within the |
| 96 | directory named `android-34' is of no special importance. | 96 | directory named `android-35' is of no special importance. |
| 97 | 97 | ||
| 98 | The ndk directory contains one subdirectory for each version of the | 98 | The ndk directory contains one subdirectory for each version of the |
| 99 | Android NDK installed. This directory in turn contains the C and C++ | 99 | Android NDK installed. This directory in turn contains the C and C++ |
| @@ -111,12 +111,13 @@ supplied by the NDK. The C compiler is then positioned within | |||
| 111 | `prebuilt/*/bin' inside that directory. | 111 | `prebuilt/*/bin' inside that directory. |
| 112 | 112 | ||
| 113 | The build-tools directory holds subdirectories containing the utility | 113 | The build-tools directory holds subdirectories containing the utility |
| 114 | programs used to convert class files output by the Java compiler to | 114 | programs used to convert class files output by the Java compiler to the |
| 115 | the DEX format employed by Android. There is one subdirectory for | 115 | DEX format employed by Android. There is one subdirectory for each |
| 116 | each 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 33.0.x and 34.0.x series. | 119 | releases will work, such as those from the 33.0.x, 34.0.x, and 35.0.x |
| 120 | series. | ||
| 120 | 121 | ||
| 121 | 122 | ||
| 122 | BUILDING WITH OLD NDK VERSIONS | 123 | BUILDING WITH OLD NDK VERSIONS |
| @@ -190,6 +191,23 @@ toolchain. To work around this problem, add: | |||
| 190 | to ANDROID_CFLAGS. | 191 | to ANDROID_CFLAGS. |
| 191 | 192 | ||
| 192 | 193 | ||
| 194 | 16 KB PAGE SIZES | ||
| 195 | |||
| 196 | New Android devices might be configured with kernels that only support | ||
| 197 | 16 KB page sizes, rendering them liable not to run Emacs binaries, and | ||
| 198 | those of other programs, that are not properly compiled for such an | ||
| 199 | environment. Ideally, `configure' will automatically detect toolchain | ||
| 200 | and compiler support for this configuration, and diagnose its absence by | ||
| 201 | a warning message, but Emacs cannot diagnose the mismatch if the NDK | ||
| 202 | toolchain supports 16 KB page sizes while the shared object implementing | ||
| 203 | the C++ standard library does not, and Emacs binaries generated by such | ||
| 204 | a combination will crash at startup on those devices. | ||
| 205 | |||
| 206 | As such, you are advised to build Emacs with the NDK r27 or better, if | ||
| 207 | producing binaries to run on aarch64 or x86_64 devices and Android 15 or | ||
| 208 | future releases. | ||
| 209 | |||
| 210 | |||
| 193 | DEBUG AND RELEASE BUILDS | 211 | DEBUG AND RELEASE BUILDS |
| 194 | 212 | ||
| 195 | Android makes a distinction between ``debug'' and ``release'' builds | 213 | Android makes a distinction between ``debug'' and ``release'' builds |
diff --git a/java/org/gnu/emacs/EmacsActivity.java b/java/org/gnu/emacs/EmacsActivity.java index 0c9e8312b90..6e8330e3092 100644 --- a/java/org/gnu/emacs/EmacsActivity.java +++ b/java/org/gnu/emacs/EmacsActivity.java | |||
| @@ -271,6 +271,12 @@ public class EmacsActivity extends Activity | |||
| 271 | /* Set it as the content view. */ | 271 | /* Set it as the content view. */ |
| 272 | setContentView (layout); | 272 | setContentView (layout); |
| 273 | 273 | ||
| 274 | /* Android 15 also realigns activity contents to originate beneath | ||
| 275 | system windows, e.g. the navigation bar, so request the original | ||
| 276 | behavior. */ | ||
| 277 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) | ||
| 278 | layout.setFitsSystemWindows (true); | ||
| 279 | |||
| 274 | /* Maybe start the Emacs service if necessary. */ | 280 | /* Maybe start the Emacs service if necessary. */ |
| 275 | EmacsService.startEmacsService (this); | 281 | EmacsService.startEmacsService (this); |
| 276 | 282 | ||
diff --git a/java/org/gnu/emacs/EmacsFillPolygon.java b/java/org/gnu/emacs/EmacsFillPolygon.java index 6bc8333984a..d99fdd97782 100644 --- a/java/org/gnu/emacs/EmacsFillPolygon.java +++ b/java/org/gnu/emacs/EmacsFillPolygon.java | |||
| @@ -26,8 +26,11 @@ import android.graphics.Point; | |||
| 26 | import android.graphics.Rect; | 26 | import android.graphics.Rect; |
| 27 | import android.graphics.RectF; | 27 | import android.graphics.RectF; |
| 28 | 28 | ||
| 29 | import android.os.Build; | ||
| 30 | |||
| 29 | public final class EmacsFillPolygon | 31 | public final class EmacsFillPolygon |
| 30 | { | 32 | { |
| 33 | @SuppressWarnings ("deprecation") /* computeBounds (IZ) */ | ||
| 31 | public static void | 34 | public static void |
| 32 | perform (EmacsDrawable drawable, EmacsGC gc, Point points[]) | 35 | perform (EmacsDrawable drawable, EmacsGC gc, Point points[]) |
| 33 | { | 36 | { |
| @@ -60,7 +63,15 @@ public final class EmacsFillPolygon | |||
| 60 | 63 | ||
| 61 | /* Compute the damage rectangle. */ | 64 | /* Compute the damage rectangle. */ |
| 62 | rectF = new RectF (0, 0, 0, 0); | 65 | rectF = new RectF (0, 0, 0, 0); |
| 63 | path.computeBounds (rectF, true); | 66 | |
| 67 | /* computeBounds (IZ) is deprecated but the incompetence of | ||
| 68 | Android's release management has caused its replacement to be | ||
| 69 | omitted from published header files. */ | ||
| 70 | |||
| 71 | /* if (Build.VERSION.SDK_INT < Build.VERSION_CODES.VANILLA_ICE_CREAM) */ | ||
| 72 | path.computeBounds (rectF, true); | ||
| 73 | /* else | ||
| 74 | path.computeBounds (rectF); */ | ||
| 64 | 75 | ||
| 65 | rect = new Rect ((int) Math.floor (rectF.left), | 76 | rect = new Rect ((int) Math.floor (rectF.left), |
| 66 | (int) Math.floor (rectF.top), | 77 | (int) Math.floor (rectF.top), |