diff options
Diffstat (limited to 'java')
| -rw-r--r-- | java/AndroidManifest.xml.in | 2 | ||||
| -rw-r--r-- | java/Makefile.in | 9 | ||||
| -rw-r--r-- | java/org/gnu/emacs/EmacsNative.java | 7 | ||||
| -rw-r--r-- | java/org/gnu/emacs/EmacsNoninteractive.java | 3 | ||||
| -rw-r--r-- | java/org/gnu/emacs/EmacsThread.java | 5 |
5 files changed, 19 insertions, 7 deletions
diff --git a/java/AndroidManifest.xml.in b/java/AndroidManifest.xml.in index c4a9d1f5177..527ce74c474 100644 --- a/java/AndroidManifest.xml.in +++ b/java/AndroidManifest.xml.in | |||
| @@ -53,7 +53,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. --> | |||
| 53 | <uses-permission android:name="android.permission.CAMERA" /> | 53 | <uses-permission android:name="android.permission.CAMERA" /> |
| 54 | 54 | ||
| 55 | <uses-sdk android:minSdkVersion="@ANDROID_MIN_SDK@" | 55 | <uses-sdk android:minSdkVersion="@ANDROID_MIN_SDK@" |
| 56 | android:targetSdkVersion="28"/> | 56 | android:targetSdkVersion="33"/> |
| 57 | 57 | ||
| 58 | <application android:name="org.gnu.emacs.EmacsApplication" | 58 | <application android:name="org.gnu.emacs.EmacsApplication" |
| 59 | android:label="Emacs" | 59 | android:label="Emacs" |
diff --git a/java/Makefile.in b/java/Makefile.in index 755995b93b1..a7bc8ac027a 100644 --- a/java/Makefile.in +++ b/java/Makefile.in | |||
| @@ -33,6 +33,7 @@ AAPT = @AAPT@ | |||
| 33 | D8 = @D8@ | 33 | D8 = @D8@ |
| 34 | ZIPALIGN = @ZIPALIGN@ | 34 | ZIPALIGN = @ZIPALIGN@ |
| 35 | JARSIGNER = @JARSIGNER@ | 35 | JARSIGNER = @JARSIGNER@ |
| 36 | APKSIGNER = @APKSIGNER@ | ||
| 36 | JARSIGNER_FLAGS = | 37 | JARSIGNER_FLAGS = |
| 37 | ANDROID_JAR = @ANDROID_JAR@ | 38 | ANDROID_JAR = @ANDROID_JAR@ |
| 38 | ANDROID_ABI = @ANDROID_ABI@ | 39 | ANDROID_ABI = @ANDROID_ABI@ |
| @@ -52,6 +53,8 @@ JARSIGNER_FLAGS = | |||
| 52 | endif | 53 | endif |
| 53 | 54 | ||
| 54 | SIGN_EMACS = -keystore emacs.keystore -storepass emacs1 $(JARSIGNER_FLAGS) | 55 | SIGN_EMACS = -keystore emacs.keystore -storepass emacs1 $(JARSIGNER_FLAGS) |
| 56 | SIGN_EMACS_V2 = sign --v2-signing-enabled --ks emacs.keystore \ | ||
| 57 | --debuggable-apk-permitted --ks-pass pass:emacs1 | ||
| 55 | 58 | ||
| 56 | JAVA_FILES = $(shell find . -type f -name *.java) | 59 | JAVA_FILES = $(shell find . -type f -name *.java) |
| 57 | CLASS_FILES = $(foreach file,$(JAVA_FILES),$(basename $(file)).class) | 60 | CLASS_FILES = $(foreach file,$(JAVA_FILES),$(basename $(file)).class) |
| @@ -196,10 +199,12 @@ $(APK_NAME): classes.dex emacs.apk-in emacs.keystore | |||
| 196 | $(AAPT) add $@.unaligned classes.dex | 199 | $(AAPT) add $@.unaligned classes.dex |
| 197 | $(JARSIGNER) $(SIGN_EMACS) $@.unaligned "Emacs keystore" | 200 | $(JARSIGNER) $(SIGN_EMACS) $@.unaligned "Emacs keystore" |
| 198 | $(ZIPALIGN) -f 4 $@.unaligned $@ | 201 | $(ZIPALIGN) -f 4 $@.unaligned $@ |
| 199 | rm -f $@.unaligned | 202 | # Signing must happen after alignment! |
| 203 | $(APKSIGNER) $(SIGN_EMACS_V2) $@ | ||
| 204 | rm -f $@.unaligned *.idsig | ||
| 200 | 205 | ||
| 201 | clean: | 206 | clean: |
| 202 | rm -f *.apk emacs.apk-in *.dex *.unaligned *.class | 207 | rm -f *.apk emacs.apk-in *.dex *.unaligned *.class *.idsig |
| 203 | rm -rf install-temp | 208 | rm -rf install-temp |
| 204 | find . -name '*.class' -delete | 209 | find . -name '*.class' -delete |
| 205 | 210 | ||
diff --git a/java/org/gnu/emacs/EmacsNative.java b/java/org/gnu/emacs/EmacsNative.java index a772b965301..7bf8b5f6081 100644 --- a/java/org/gnu/emacs/EmacsNative.java +++ b/java/org/gnu/emacs/EmacsNative.java | |||
| @@ -65,8 +65,11 @@ public class EmacsNative | |||
| 65 | undefined. | 65 | undefined. |
| 66 | 66 | ||
| 67 | DUMPFILE is the dump file to use, or NULL if Emacs is to load | 67 | DUMPFILE is the dump file to use, or NULL if Emacs is to load |
| 68 | loadup.el itself. */ | 68 | loadup.el itself. |
| 69 | public static native void initEmacs (String argv[], String dumpFile); | 69 | |
| 70 | APILEVEL is the version of Android being used. */ | ||
| 71 | public static native void initEmacs (String argv[], String dumpFile, | ||
| 72 | int apiLevel); | ||
| 70 | 73 | ||
| 71 | /* Abort and generate a native core dump. */ | 74 | /* Abort and generate a native core dump. */ |
| 72 | public static native void emacsAbort (); | 75 | public static native void emacsAbort (); |
diff --git a/java/org/gnu/emacs/EmacsNoninteractive.java b/java/org/gnu/emacs/EmacsNoninteractive.java index b4854d8323f..4da82f2f894 100644 --- a/java/org/gnu/emacs/EmacsNoninteractive.java +++ b/java/org/gnu/emacs/EmacsNoninteractive.java | |||
| @@ -177,6 +177,7 @@ public class EmacsNoninteractive | |||
| 177 | EmacsApplication.findDumpFile (context); | 177 | EmacsApplication.findDumpFile (context); |
| 178 | 178 | ||
| 179 | /* Start Emacs. */ | 179 | /* Start Emacs. */ |
| 180 | EmacsNative.initEmacs (args, EmacsApplication.dumpFileName); | 180 | EmacsNative.initEmacs (args, EmacsApplication.dumpFileName, |
| 181 | Build.VERSION.SDK_INT); | ||
| 181 | } | 182 | } |
| 182 | }; | 183 | }; |
diff --git a/java/org/gnu/emacs/EmacsThread.java b/java/org/gnu/emacs/EmacsThread.java index f5e9d54044a..2724d838d41 100644 --- a/java/org/gnu/emacs/EmacsThread.java +++ b/java/org/gnu/emacs/EmacsThread.java | |||
| @@ -21,6 +21,8 @@ package org.gnu.emacs; | |||
| 21 | 21 | ||
| 22 | import java.lang.Thread; | 22 | import java.lang.Thread; |
| 23 | 23 | ||
| 24 | import android.os.Build; | ||
| 25 | |||
| 24 | public class EmacsThread extends Thread | 26 | public class EmacsThread extends Thread |
| 25 | { | 27 | { |
| 26 | /* Whether or not Emacs should be started -Q. */ | 28 | /* Whether or not Emacs should be started -Q. */ |
| @@ -45,6 +47,7 @@ public class EmacsThread extends Thread | |||
| 45 | args = new String[] { "libandroid-emacs.so", "-Q", }; | 47 | args = new String[] { "libandroid-emacs.so", "-Q", }; |
| 46 | 48 | ||
| 47 | /* Run the native code now. */ | 49 | /* Run the native code now. */ |
| 48 | EmacsNative.initEmacs (args, EmacsApplication.dumpFileName); | 50 | EmacsNative.initEmacs (args, EmacsApplication.dumpFileName, |
| 51 | Build.VERSION.SDK_INT); | ||
| 49 | } | 52 | } |
| 50 | }; | 53 | }; |