From: Po Lu Date: Fri, 14 Jul 2023 12:30:30 +0000 (+0800) Subject: Make --with-shared-user-id work X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=11c8a2fa87df2b6cc505e670a972552750eab71f;p=emacs.git Make --with-shared-user-id work * configure.ac (ANDROID_SHARED_USER_NAME): New variable. Substitute it. * java/AndroidManifest.xml.in: Set `sharedUserLabel' if a shared user ID is enabled. * java/res/values/strings.xml (shared_user_name): New string resource. --- diff --git a/configure.ac b/configure.ac index 86abf54911e..5e5c6a88323 100644 --- a/configure.ac +++ b/configure.ac @@ -844,6 +844,7 @@ ANDROID_JAR= ANDROID_ABI= WARN_JAVAFLAGS= ANDROID_SHARED_USER_ID= +ANDROID_SHARED_USER_NAME= # This is a list of Makefiles that have alternative versions for # Android. @@ -2656,7 +2657,12 @@ for Android, but all API calls need to be stubbed out]) emacs_val=`AS_ECHO(["$with_shared_user_id"]) \ | sed -e 's/"/\\"/'` emacs_val="\"$emacs_val\"" - ANDROID_SHARED_USER_ID="android:sharedUserId=$emacs_val"])],[ + ANDROID_SHARED_USER_ID="android:sharedUserId=$emacs_val" + # `android:sharedUserName' is required for sharedUserID to work + # on recent Android releases. It does not otherwise affect the + # behavior of any code. + emacs_val="\"@string/shared_user_name\"" + ANDROID_SHARED_USER_NAME="android:sharedUserLabel=$emacs_val"])],[ # Emacs will be built as a shared library, and a wrapper around it # will also be built for the benefit of applications. This # requires Emacs be built as a position independent executable. @@ -2698,6 +2704,7 @@ AC_SUBST([ANDROID_LIBS]) AC_SUBST([ANDROID_LDFLAGS]) AC_SUBST([ANDROID_BUILD_CFLAGS]) AC_SUBST([ANDROID_SHARED_USER_ID]) +AC_SUBST([ANDROID_SHARED_USER_NAME]) if test "${with_pgtk}" = "yes"; then window_system=pgtk diff --git a/java/AndroidManifest.xml.in b/java/AndroidManifest.xml.in index e79fb4e46e7..3aae2032fff 100644 --- a/java/AndroidManifest.xml.in +++ b/java/AndroidManifest.xml.in @@ -75,6 +75,7 @@ along with GNU Emacs. If not, see . --> android:theme="@style/EmacsStyle" android:debuggable="@ANDROID_DEBUGGABLE@" @ANDROID_SHARED_USER_ID@ + @ANDROID_SHARED_USER_NAME@ android:extractNativeLibs="true"> . --> Remove the dumped state created when Emacs was installed. + + + + Emacs shared user +