From: Po Lu Date: Fri, 9 Aug 2024 02:11:47 +0000 (+0800) Subject: Register for more Intents actions on Android X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=615a1fb7618de3b36c76689269add9147334900b;p=emacs.git Register for more Intents actions on Android * java/AndroidManifest.xml.in : Register for SEND Intents with mailto URIs. * java/org/gnu/emacs/EmacsOpenActivity.java (onCreate): Use Intent constants rather than string literals. (cherry picked from commit 16462b1a62d04a726f99f275b37fd3e6fd512202) --- diff --git a/java/AndroidManifest.xml.in b/java/AndroidManifest.xml.in index f3bab2c1b76..df00e497f8f 100644 --- a/java/AndroidManifest.xml.in +++ b/java/AndroidManifest.xml.in @@ -270,6 +270,7 @@ along with GNU Emacs. If not, see . --> + diff --git a/java/org/gnu/emacs/EmacsOpenActivity.java b/java/org/gnu/emacs/EmacsOpenActivity.java index 28e1e261821..366283168dd 100644 --- a/java/org/gnu/emacs/EmacsOpenActivity.java +++ b/java/org/gnu/emacs/EmacsOpenActivity.java @@ -422,11 +422,11 @@ public final class EmacsOpenActivity extends Activity /* Now see if the action specified is supported by Emacs. */ - if (action.equals ("android.intent.action.VIEW") - || action.equals ("android.intent.action.EDIT") - || action.equals ("android.intent.action.PICK") - || action.equals ("android.intent.action.SEND") - || action.equals ("android.intent.action.SENDTO")) + if (action.equals (Intent.ACTION_VIEW) + || action.equals (Intent.ACTION_EDIT) + || action.equals (Intent.ACTION_PICK) + || action.equals (Intent.ACTION_SEND) + || action.equals (Intent.ACTION_SENDTO)) { /* Obtain the URI of the action. */ uri = intent.getData ();