From ee1918b7c857902d373bf5500f899681e85c1b80 Mon Sep 17 00:00:00 2001 From: Thialfihar Date: Sat, 25 Dec 2010 14:12:12 +0000 Subject: [PATCH] DataSource: consider content URI sources "binary" also --- src/org/thialfihar/android/apg/DataSource.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/org/thialfihar/android/apg/DataSource.java b/src/org/thialfihar/android/apg/DataSource.java index 4ce5c5f7b..e01da4590 100644 --- a/src/org/thialfihar/android/apg/DataSource.java +++ b/src/org/thialfihar/android/apg/DataSource.java @@ -24,6 +24,8 @@ public class DataSource { public void setUri(Uri uri) { mContentUri = uri; + mText = null; + mData = null; } public void setUri(String uri) { @@ -37,11 +39,13 @@ public class DataSource { public void setText(String text) { mText = text; mData = null; + mContentUri = null; } public void setData(byte[] data) { mData = data; mText = null; + mContentUri = null; } public boolean isText() { @@ -49,7 +53,7 @@ public class DataSource { } public boolean isBinary() { - return mData != null; + return mData != null || mContentUri != null; } public InputData getInputData(Context context, boolean withSize)