aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/AndroidManifest.xml.in2
-rw-r--r--java/INSTALL40
-rw-r--r--java/org/gnu/emacs/EmacsActivity.java6
-rw-r--r--java/org/gnu/emacs/EmacsFillPolygon.java13
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:
39Replacing the paths in the command line above with: 39Replacing 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
51Where the type of CPU can either be `armeabi', `armv7*', `i686', 51Where 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
54After the configuration process completes, you may run: 54After the configuration process completes, you may run:
55 55
@@ -87,13 +87,13 @@ necessary for compiling Emacs.
87 87
88It is imperative that Emacs is compiled using the headers for the 88It is imperative that Emacs is compiled using the headers for the
89exact API level that it is written for. This is currently API level 89exact API level that it is written for. This is currently API level
9034, so the correct android.jar archive is located within a directory 9035, so the correct android.jar archive is located within a directory
91whose name begins with `android-34'. Minor revisions to the headers 91whose name begins with `android-35'. Minor revisions to the headers
92are inconsequential towards the Emacs compilation process; if there is 92are inconsequential towards the Emacs compilation process; if there is
93a directory named `android-34-extN' (where N represents a revision to 93a directory named `android-35-extN' (where N represents a revision to
94the Android SDK), whether you provide `configure' with that 94the Android SDK), whether you provide `configure' with that
95directory's android.jar or the android.jar contained within the 95directory's android.jar or the android.jar contained within the
96directory named `android-34' is of no special importance. 96directory named `android-35' is of no special importance.
97 97
98The ndk directory contains one subdirectory for each version of the 98The ndk directory contains one subdirectory for each version of the
99Android NDK installed. This directory in turn contains the C and C++ 99Android 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
113The build-tools directory holds subdirectories containing the utility 113The build-tools directory holds subdirectories containing the utility
114programs used to convert class files output by the Java compiler to 114programs used to convert class files output by the Java compiler to the
115the DEX format employed by Android. There is one subdirectory for 115DEX format employed by Android. There is one subdirectory for each
116each version of the build tools, but the version you opt for is not of 116version of the build tools, but the version you opt for is not of
117paramount significance: if your version does not work, configure will 117paramount significance: if your version does not work, configure will
118protest, so install a newer one. We anticipate that most recent 118protest, so install a newer one. We anticipate that most recent
119releases will work, such as those from the 33.0.x and 34.0.x series. 119releases will work, such as those from the 33.0.x, 34.0.x, and 35.0.x
120series.
120 121
121 122
122BUILDING WITH OLD NDK VERSIONS 123BUILDING WITH OLD NDK VERSIONS
@@ -190,6 +191,23 @@ toolchain. To work around this problem, add:
190to ANDROID_CFLAGS. 191to ANDROID_CFLAGS.
191 192
192 193
19416 KB PAGE SIZES
195
196New Android devices might be configured with kernels that only support
19716 KB page sizes, rendering them liable not to run Emacs binaries, and
198those of other programs, that are not properly compiled for such an
199environment. Ideally, `configure' will automatically detect toolchain
200and compiler support for this configuration, and diagnose its absence by
201a warning message, but Emacs cannot diagnose the mismatch if the NDK
202toolchain supports 16 KB page sizes while the shared object implementing
203the C++ standard library does not, and Emacs binaries generated by such
204a combination will crash at startup on those devices.
205
206As such, you are advised to build Emacs with the NDK r27 or better, if
207producing binaries to run on aarch64 or x86_64 devices and Android 15 or
208future releases.
209
210
193DEBUG AND RELEASE BUILDS 211DEBUG AND RELEASE BUILDS
194 212
195Android makes a distinction between ``debug'' and ``release'' builds 213Android 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;
26import android.graphics.Rect; 26import android.graphics.Rect;
27import android.graphics.RectF; 27import android.graphics.RectF;
28 28
29import android.os.Build;
30
29public final class EmacsFillPolygon 31public 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),