mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-23 17:22:16 -05:00
DataSource: consider content URI sources "binary" also
This commit is contained in:
parent
428cf39ba3
commit
ee1918b7c8
@ -24,6 +24,8 @@ public class DataSource {
|
|||||||
|
|
||||||
public void setUri(Uri uri) {
|
public void setUri(Uri uri) {
|
||||||
mContentUri = uri;
|
mContentUri = uri;
|
||||||
|
mText = null;
|
||||||
|
mData = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUri(String uri) {
|
public void setUri(String uri) {
|
||||||
@ -37,11 +39,13 @@ public class DataSource {
|
|||||||
public void setText(String text) {
|
public void setText(String text) {
|
||||||
mText = text;
|
mText = text;
|
||||||
mData = null;
|
mData = null;
|
||||||
|
mContentUri = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setData(byte[] data) {
|
public void setData(byte[] data) {
|
||||||
mData = data;
|
mData = data;
|
||||||
mText = null;
|
mText = null;
|
||||||
|
mContentUri = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isText() {
|
public boolean isText() {
|
||||||
@ -49,7 +53,7 @@ public class DataSource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isBinary() {
|
public boolean isBinary() {
|
||||||
return mData != null;
|
return mData != null || mContentUri != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public InputData getInputData(Context context, boolean withSize)
|
public InputData getInputData(Context context, boolean withSize)
|
||||||
|
Loading…
Reference in New Issue
Block a user