mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-21 05:21:37 -07:00
Initialize Android API level earlier
* java/org/gnu/emacs/EmacsNative.java (EmacsNative): * java/org/gnu/emacs/EmacsNoninteractive.java (main): * java/org/gnu/emacs/EmacsService.java (run): * java/org/gnu/emacs/EmacsThread.java (run): * src/android.c (initEmacs, setEmacsParams): Set `android_api_level' within setEmacsParams, not in initEmacs. * src/androidvfs.c: Pacify compiler warnings.
This commit is contained in:
parent
5a8130ab96
commit
9cf166db63
6 changed files with 34 additions and 19 deletions
|
|
@ -66,7 +66,9 @@ public final class EmacsNative
|
|||
classPath must be the classpath of this app_process process, or
|
||||
NULL.
|
||||
|
||||
emacsService must be the EmacsService singleton, or NULL. */
|
||||
emacsService must be the EmacsService singleton, or NULL.
|
||||
|
||||
apiLevel is the version of Android being run. */
|
||||
public static native void setEmacsParams (AssetManager assetManager,
|
||||
String filesDir,
|
||||
String libDir,
|
||||
|
|
@ -75,18 +77,16 @@ public final class EmacsNative
|
|||
float pixelDensityY,
|
||||
float scaledDensity,
|
||||
String classPath,
|
||||
EmacsService emacsService);
|
||||
EmacsService emacsService,
|
||||
int apiLevel);
|
||||
|
||||
/* Initialize Emacs with the argument array ARGV. Each argument
|
||||
must contain a NULL terminated string, or else the behavior is
|
||||
undefined.
|
||||
|
||||
DUMPFILE is the dump file to use, or NULL if Emacs is to load
|
||||
loadup.el itself.
|
||||
|
||||
APILEVEL is the version of Android being used. */
|
||||
public static native void initEmacs (String argv[], String dumpFile,
|
||||
int apiLevel);
|
||||
loadup.el itself. */
|
||||
public static native void initEmacs (String argv[], String dumpFile);
|
||||
|
||||
/* Abort and generate a native core dump. */
|
||||
public static native void emacsAbort ();
|
||||
|
|
|
|||
|
|
@ -190,14 +190,14 @@ public final class EmacsNoninteractive
|
|||
|
||||
EmacsNative.setEmacsParams (assets, filesDir,
|
||||
libDir, cacheDir, 0.0f,
|
||||
0.0f, 0.0f, null, null);
|
||||
0.0f, 0.0f, null, null,
|
||||
Build.VERSION.SDK_INT);
|
||||
|
||||
/* Now find the dump file that Emacs should use, if it has already
|
||||
been dumped. */
|
||||
EmacsApplication.findDumpFile (context);
|
||||
|
||||
/* Start Emacs. */
|
||||
EmacsNative.initEmacs (args, EmacsApplication.dumpFileName,
|
||||
Build.VERSION.SDK_INT);
|
||||
EmacsNative.initEmacs (args, EmacsApplication.dumpFileName);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -291,7 +291,8 @@ public final class EmacsService extends Service
|
|||
cacheDir, (float) pixelDensityX,
|
||||
(float) pixelDensityY,
|
||||
(float) scaledDensity,
|
||||
classPath, EmacsService.this);
|
||||
classPath, EmacsService.this,
|
||||
Build.VERSION.SDK_INT);
|
||||
}
|
||||
}, extraStartupArgument,
|
||||
/* If any file needs to be opened, open it now. */
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ package org.gnu.emacs;
|
|||
import java.lang.Thread;
|
||||
import java.util.Arrays;
|
||||
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
public final class EmacsThread extends Thread
|
||||
|
|
@ -78,7 +77,6 @@ public final class EmacsThread extends Thread
|
|||
|
||||
/* Run the native code now. */
|
||||
Log.d (TAG, "run: " + Arrays.toString (args));
|
||||
EmacsNative.initEmacs (args, EmacsApplication.dumpFileName,
|
||||
Build.VERSION.SDK_INT);
|
||||
EmacsNative.initEmacs (args, EmacsApplication.dumpFileName);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue