diff options
author | Thialfihar <thialfihar@gmail.com> | 2010-12-25 14:12:12 +0000 |
---|---|---|
committer | Thialfihar <thialfihar@gmail.com> | 2010-12-25 14:12:12 +0000 |
commit | ee1918b7c857902d373bf5500f899681e85c1b80 (patch) | |
tree | 47df0a5b130695a76cdbc82045e49e6335e889e3 /src/org/thialfihar/android | |
parent | 428cf39ba39314a193bc70930ca45317c4543404 (diff) | |
download | open-keychain-ee1918b7c857902d373bf5500f899681e85c1b80.tar.gz open-keychain-ee1918b7c857902d373bf5500f899681e85c1b80.tar.bz2 open-keychain-ee1918b7c857902d373bf5500f899681e85c1b80.zip |
DataSource: consider content URI sources "binary" also
Diffstat (limited to 'src/org/thialfihar/android')
-rw-r--r-- | src/org/thialfihar/android/apg/DataSource.java | 6 |
1 files changed, 5 insertions, 1 deletions
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) |