diff options
| author | Po Lu | 2023-07-14 20:30:30 +0800 |
|---|---|---|
| committer | Po Lu | 2023-07-14 20:30:30 +0800 |
| commit | 11c8a2fa87df2b6cc505e670a972552750eab71f (patch) | |
| tree | e2b4fc6fc0dccde7f932596d6e0c1661e8305e29 | |
| parent | cb4ea3e7fb36d942dd9d495462fc591f54707b40 (diff) | |
| download | emacs-11c8a2fa87df2b6cc505e670a972552750eab71f.tar.gz emacs-11c8a2fa87df2b6cc505e670a972552750eab71f.zip | |
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.
| -rw-r--r-- | configure.ac | 9 | ||||
| -rw-r--r-- | java/AndroidManifest.xml.in | 1 | ||||
| -rw-r--r-- | java/res/values/strings.xml | 6 |
3 files changed, 15 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 86abf54911e..5e5c6a88323 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -844,6 +844,7 @@ ANDROID_JAR= | |||
| 844 | ANDROID_ABI= | 844 | ANDROID_ABI= |
| 845 | WARN_JAVAFLAGS= | 845 | WARN_JAVAFLAGS= |
| 846 | ANDROID_SHARED_USER_ID= | 846 | ANDROID_SHARED_USER_ID= |
| 847 | ANDROID_SHARED_USER_NAME= | ||
| 847 | 848 | ||
| 848 | # This is a list of Makefiles that have alternative versions for | 849 | # This is a list of Makefiles that have alternative versions for |
| 849 | # Android. | 850 | # Android. |
| @@ -2656,7 +2657,12 @@ for Android, but all API calls need to be stubbed out]) | |||
| 2656 | emacs_val=`AS_ECHO(["$with_shared_user_id"]) \ | 2657 | emacs_val=`AS_ECHO(["$with_shared_user_id"]) \ |
| 2657 | | sed -e 's/"/\\"/'` | 2658 | | sed -e 's/"/\\"/'` |
| 2658 | emacs_val="\"$emacs_val\"" | 2659 | emacs_val="\"$emacs_val\"" |
| 2659 | ANDROID_SHARED_USER_ID="android:sharedUserId=$emacs_val"])],[ | 2660 | ANDROID_SHARED_USER_ID="android:sharedUserId=$emacs_val" |
| 2661 | # `android:sharedUserName' is required for sharedUserID to work | ||
| 2662 | # on recent Android releases. It does not otherwise affect the | ||
| 2663 | # behavior of any code. | ||
| 2664 | emacs_val="\"@string/shared_user_name\"" | ||
| 2665 | ANDROID_SHARED_USER_NAME="android:sharedUserLabel=$emacs_val"])],[ | ||
| 2660 | # Emacs will be built as a shared library, and a wrapper around it | 2666 | # Emacs will be built as a shared library, and a wrapper around it |
| 2661 | # will also be built for the benefit of applications. This | 2667 | # will also be built for the benefit of applications. This |
| 2662 | # requires Emacs be built as a position independent executable. | 2668 | # requires Emacs be built as a position independent executable. |
| @@ -2698,6 +2704,7 @@ AC_SUBST([ANDROID_LIBS]) | |||
| 2698 | AC_SUBST([ANDROID_LDFLAGS]) | 2704 | AC_SUBST([ANDROID_LDFLAGS]) |
| 2699 | AC_SUBST([ANDROID_BUILD_CFLAGS]) | 2705 | AC_SUBST([ANDROID_BUILD_CFLAGS]) |
| 2700 | AC_SUBST([ANDROID_SHARED_USER_ID]) | 2706 | AC_SUBST([ANDROID_SHARED_USER_ID]) |
| 2707 | AC_SUBST([ANDROID_SHARED_USER_NAME]) | ||
| 2701 | 2708 | ||
| 2702 | if test "${with_pgtk}" = "yes"; then | 2709 | if test "${with_pgtk}" = "yes"; then |
| 2703 | window_system=pgtk | 2710 | 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 <https://www.gnu.org/licenses/>. --> | |||
| 75 | android:theme="@style/EmacsStyle" | 75 | android:theme="@style/EmacsStyle" |
| 76 | android:debuggable="@ANDROID_DEBUGGABLE@" | 76 | android:debuggable="@ANDROID_DEBUGGABLE@" |
| 77 | @ANDROID_SHARED_USER_ID@ | 77 | @ANDROID_SHARED_USER_ID@ |
| 78 | @ANDROID_SHARED_USER_NAME@ | ||
| 78 | android:extractNativeLibs="true"> | 79 | android:extractNativeLibs="true"> |
| 79 | 80 | ||
| 80 | <activity android:name="org.gnu.emacs.EmacsActivity" | 81 | <activity android:name="org.gnu.emacs.EmacsActivity" |
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml index 36a47be6c84..8a11cb007ee 100644 --- a/java/res/values/strings.xml +++ b/java/res/values/strings.xml | |||
| @@ -36,4 +36,10 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. --> | |||
| 36 | <string name="erase_dump_caption"> | 36 | <string name="erase_dump_caption"> |
| 37 | Remove the dumped state created when Emacs was installed. | 37 | Remove the dumped state created when Emacs was installed. |
| 38 | </string> | 38 | </string> |
| 39 | |||
| 40 | <!-- This resource describes the purpose of any `sharedUserId' | ||
| 41 | specified at configure-time. --> | ||
| 42 | <string name="shared_user_name"> | ||
| 43 | Emacs shared user | ||
| 44 | </string> | ||
| 39 | </resources> | 45 | </resources> |