diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-01-30 19:41:14 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-01-30 19:41:14 +0100 |
commit | 7a67de94628dfe12b8790c333e5c5c19e647caab (patch) | |
tree | 7f7de661835f03a1d655555d962e66349bf640c0 /src/main/java/de/pixart/messenger/http | |
parent | ae72001c454b9a903e34a9521ca4bac316a90535 (diff) |
check if wakelock is held before releasing
Diffstat (limited to 'src/main/java/de/pixart/messenger/http')
-rw-r--r-- | src/main/java/de/pixart/messenger/http/HttpUploadConnection.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/http/HttpUploadConnection.java b/src/main/java/de/pixart/messenger/http/HttpUploadConnection.java index 36c6b293f..e2dd6930c 100644 --- a/src/main/java/de/pixart/messenger/http/HttpUploadConnection.java +++ b/src/main/java/de/pixart/messenger/http/HttpUploadConnection.java @@ -229,7 +229,9 @@ public class HttpUploadConnection implements Transferable { if (connection != null) { connection.disconnect(); } - wakeLock.release(); + if (wakeLock.isHeld()) { + wakeLock.release(); + } } } } |