diff options
| author | Po Lu | 2024-09-04 17:24:34 +0800 |
|---|---|---|
| committer | Po Lu | 2024-09-04 17:24:34 +0800 |
| commit | 2847106f3b6174f25ab43551f96612209fe951c8 (patch) | |
| tree | 48f3795535eb6324b692ab40b673c1b59e344ea1 /java/org/gnu | |
| parent | d277123f4bf855f0d055d283a42166f123fa1fde (diff) | |
| download | emacs-2847106f3b6174f25ab43551f96612209fe951c8.tar.gz emacs-2847106f3b6174f25ab43551f96612209fe951c8.zip | |
Port to Android 35
* configure.ac: Temporary workaround for Gnulib bug. Verify
that the provided android.jar corresponds to Android 35, or any
later version.
* cross/ndk-build/Makefile.in (NDK_BUILD_SO_LDFLAGS): New
variable.
* cross/ndk-build/ndk-resolve.mk
(NDK_LOCAL_A_NAMES_$(LOCAL_MODULE)): Define to
NDK_BUILD_SO_LDFLAGS by default to enable building binaries
with support for 16 kb page sizes.
* java/AndroidManifest.xml.in: Target SDK 35.
* java/INSTALL (16KB PAGE SIZES): New section. Replace
references to Android 34 with 35.
* java/org/gnu/emacs/EmacsActivity.java (onCreate): Restore
pre-SDK 35 inset-relative placement.
* java/org/gnu/emacs/EmacsFillPolygon.java (perform): Suppress
deprecation warnings, and document why.
* m4/ndk-build.m4 (ndk_INIT, ndk_LATE): Check for and enable
toolchain support for 16 KB page sizes, if available.
(ndk_CONFIG_FILES): Export linker options so derived.
* src/conf_post.h [__ANDROID_API__ < 35]: Include system time.h
and redefine timezone_t to rpl_timezone_t, so that the Gnulib
replacement may not conflict with the useless OS type.
Diffstat (limited to 'java/org/gnu')
| -rw-r--r-- | java/org/gnu/emacs/EmacsActivity.java | 6 | ||||
| -rw-r--r-- | java/org/gnu/emacs/EmacsFillPolygon.java | 13 |
2 files changed, 18 insertions, 1 deletions
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), |