DroidFish: Handle Intent.EXTRA_STREAM of type "file".

This commit is contained in:
Peter Osterlund 2013-07-08 21:20:41 +00:00
parent fdb4d70cbb
commit 9e7572d54c

View File

@ -489,6 +489,20 @@ public class DroidFish extends Activity implements GUIInterface {
try {
Intent intent = getIntent();
Uri data = intent.getData();
if (data == null) {
Bundle b = intent.getExtras();
if (b != null) {
Object strm = b.get(Intent.EXTRA_STREAM);
if (strm instanceof Uri) {
data = (Uri)strm;
if ("file".equals(data.getScheme())) {
filename = data.getEncodedPath();
if (filename != null)
filename = Uri.decode(filename);
}
}
}
}
if (data == null) {
if ((Intent.ACTION_SEND.equals(intent.getAction()) ||
Intent.ACTION_VIEW.equals(intent.getAction())) &&