aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2016-09-03 13:28:25 +0200
committerChristian Schneppe <christian@pix-art.de>2016-09-03 13:28:25 +0200
commit1871c27390290fef4f805e26085adc9495b2f1a6 (patch)
treeeba0862575625cf3754bf331cce47849dc562e66 /src/main
parent6a1b13c047de2224ea913836c32e7f93fb32b66c (diff)
return false if compressed video size = 0 or video does't exist
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
index 75231f037..962c43dcc 100644
--- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
+++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
@@ -590,9 +590,15 @@ public class XmppConnectionService extends Service {
protected void onPostExecute(Boolean compressed) {
super.onPostExecute(compressed);
wakeLock.release();
+ File video = new File(compressedpath);
if (mListener != null) {
- mListener.videocompressed(compressed);
- Log.d(Config.LOGTAG, "Compression successfully!");
+ if (video.exists() && video.length() > 0) {
+ mListener.videocompressed(compressed);
+ Log.d(Config.LOGTAG, "Compression successfully!");
+ } else {
+ mListener.videocompressed(false);
+ Log.d(Config.LOGTAG, "Compression failed!");
+ }
}
}
}