aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/services
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2016-10-08 23:25:42 +0200
committerChristian Schneppe <christian@pix-art.de>2016-10-08 23:25:42 +0200
commit1c444b9cef918da3be321b2c9396b1a1707fdbd6 (patch)
tree2552e95b0d8b6e763d518f439107eaafb5271ef7 /src/main/java/de/pixart/messenger/services
parent140db2477016bdd4362ba451b2c92d877ba9e55f (diff)
little bug fixes and improvements to VideoCompressor
Diffstat (limited to 'src/main/java/de/pixart/messenger/services')
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java5
1 files changed, 3 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 f5d730282..9c633e781 100644
--- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
+++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
@@ -155,6 +155,7 @@ public class XmppConnectionService extends Service {
private final List<String> mInProgressAvatarFetches = new ArrayList<>();
private WakeLock wakeLock;
private long mLastActivity = 0;
+ public static VideoCompressor CompressVideo;
public DatabaseBackend databaseBackend;
private ContentObserver contactObserver = new ContentObserver(null) {
@@ -547,7 +548,7 @@ public class XmppConnectionService extends Service {
Log.d(Config.LOGTAG,conversation.getAccount().getJid().toBareJid()+ ": not compressing video. sending as file");
attachFileToConversation(conversation, uri, callback);
} else {
- VideoCompressor CompressVideo = new VideoCompressor(path, compressed_path, new Interface() {
+ CompressVideo = new VideoCompressor(path, compressed_path, new Interface() {
@Override
public void videocompressed(boolean result) {
if (result) {
@@ -592,7 +593,6 @@ public class XmppConnectionService extends Service {
@Override
protected void onPostExecute(Boolean compressed) {
super.onPostExecute(compressed);
- wakeLock.release();
File video = new File(compressedpath);
if (mListener != null) {
if (video.exists() && video.length() > 0) {
@@ -603,6 +603,7 @@ public class XmppConnectionService extends Service {
Log.d(Config.LOGTAG, "Compression failed!");
}
}
+ wakeLock.release();
}
}