aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/org/thialfihar/android/apg/DataSource.java6
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)