Merge from savannah/emacs-30

16462b1a62 Register for more Intents actions on Android
This commit is contained in:
Po Lu 2024-08-09 10:12:26 +08:00
commit 3896f5034f
2 changed files with 6 additions and 5 deletions

View file

@ -270,6 +270,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. -->
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.SEND"/>
<action android:name="android.intent.action.SENDTO"/> <action android:name="android.intent.action.SENDTO"/>
<data android:scheme="mailto"/> <data android:scheme="mailto"/>
<category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.DEFAULT"/>

View file

@ -422,11 +422,11 @@ public final class EmacsOpenActivity extends Activity
/* Now see if the action specified is supported by Emacs. */ /* Now see if the action specified is supported by Emacs. */
if (action.equals ("android.intent.action.VIEW") if (action.equals (Intent.ACTION_VIEW)
|| action.equals ("android.intent.action.EDIT") || action.equals (Intent.ACTION_EDIT)
|| action.equals ("android.intent.action.PICK") || action.equals (Intent.ACTION_PICK)
|| action.equals ("android.intent.action.SEND") || action.equals (Intent.ACTION_SEND)
|| action.equals ("android.intent.action.SENDTO")) || action.equals (Intent.ACTION_SENDTO))
{ {
/* Obtain the URI of the action. */ /* Obtain the URI of the action. */
uri = intent.getData (); uri = intent.getData ();