mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-30 23:00:09 -05:00
Added support for the Android 1.6 intent android.intent.action.SEND_MULTIPLE in a way that should work on older devices too. Worked fine in the Android 1.5 emulator.
Fixes issue 1210
This commit is contained in:
parent
5d18781156
commit
f911b0e436
@ -191,13 +191,11 @@
|
|||||||
<data android:mimeType="*/*" />
|
<data android:mimeType="*/*" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
<!-- Use once we drop Android 1.5 support
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.SEND_MULTIPLE" />
|
<action android:name="android.intent.action.SEND_MULTIPLE" />
|
||||||
<data android:mimeType="*/*" />
|
<data android:mimeType="*/*" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
-->
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
<data android:scheme="mailto" />
|
<data android:scheme="mailto" />
|
||||||
|
@ -390,7 +390,8 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Intent.ACTION_SEND.equals(action) /*|| Intent.ACTION_SEND_MULTIPLE.equals(action)*/)
|
//TODO: Use constant Intent.ACTION_SEND_MULTIPLE once we drop Android 1.5 support
|
||||||
|
else if (Intent.ACTION_SEND.equals(action) || "android.intent.action.SEND_MULTIPLE".equals(action))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Someone is trying to compose an email with an attachment, probably Pictures.
|
* Someone is trying to compose an email with an attachment, probably Pictures.
|
||||||
@ -409,8 +410,8 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
|||||||
}
|
}
|
||||||
|
|
||||||
String type = intent.getType();
|
String type = intent.getType();
|
||||||
/* Use once we drop Android 1.5 support
|
//TODO: Use constant Intent.ACTION_SEND_MULTIPLE once we drop Android 1.5 support
|
||||||
if (Intent.ACTION_SEND_MULTIPLE.equals(action))
|
if ("android.intent.action.SEND_MULTIPLE".equals(action))
|
||||||
{
|
{
|
||||||
ArrayList<Parcelable> list = intent.getParcelableArrayListExtra(Intent.EXTRA_STREAM);
|
ArrayList<Parcelable> list = intent.getParcelableArrayListExtra(Intent.EXTRA_STREAM);
|
||||||
if (list != null)
|
if (list != null)
|
||||||
@ -429,7 +430,6 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*/
|
|
||||||
{
|
{
|
||||||
Uri stream = (Uri) intent.getParcelableExtra(Intent.EXTRA_STREAM);
|
Uri stream = (Uri) intent.getParcelableExtra(Intent.EXTRA_STREAM);
|
||||||
if (stream != null && type != null)
|
if (stream != null && type != null)
|
||||||
|
Loading…
Reference in New Issue
Block a user