Merge "Copy multi-image editor fix to QPR" into tm-qpr-dev
This commit is contained in:
@@ -1114,6 +1114,19 @@ public class ChooserActivity extends ResolverActivity implements
|
|||||||
resolveIntent.setFlags(originalIntent.getFlags() & URI_PERMISSION_INTENT_FLAGS);
|
resolveIntent.setFlags(originalIntent.getFlags() & URI_PERMISSION_INTENT_FLAGS);
|
||||||
resolveIntent.setComponent(cn);
|
resolveIntent.setComponent(cn);
|
||||||
resolveIntent.setAction(Intent.ACTION_EDIT);
|
resolveIntent.setAction(Intent.ACTION_EDIT);
|
||||||
|
String originalAction = originalIntent.getAction();
|
||||||
|
if (Intent.ACTION_SEND.equals(originalAction)) {
|
||||||
|
if (resolveIntent.getData() == null) {
|
||||||
|
Uri uri = resolveIntent.getParcelableExtra(Intent.EXTRA_STREAM);
|
||||||
|
if (uri != null) {
|
||||||
|
String mimeType = getContentResolver().getType(uri);
|
||||||
|
resolveIntent.setDataAndType(uri, mimeType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Log.e(TAG, originalAction + " is not supported.");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
final ResolveInfo ri = getPackageManager().resolveActivity(
|
final ResolveInfo ri = getPackageManager().resolveActivity(
|
||||||
resolveIntent, PackageManager.GET_META_DATA);
|
resolveIntent, PackageManager.GET_META_DATA);
|
||||||
if (ri == null || ri.activityInfo == null) {
|
if (ri == null || ri.activityInfo == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user