Fix couple of leaks
This commit is contained in:
parent
ca496fd39f
commit
156c4da2b3
|
@ -1295,7 +1295,9 @@ public class FileBackend {
|
||||||
private int calcSampleSize(Uri image, int size) throws FileNotFoundException, SecurityException {
|
private int calcSampleSize(Uri image, int size) throws FileNotFoundException, SecurityException {
|
||||||
BitmapFactory.Options options = new BitmapFactory.Options();
|
BitmapFactory.Options options = new BitmapFactory.Options();
|
||||||
options.inJustDecodeBounds = true;
|
options.inJustDecodeBounds = true;
|
||||||
BitmapFactory.decodeStream(mXmppConnectionService.getContentResolver().openInputStream(image), null, options);
|
InputStream inputStream = mXmppConnectionService.getContentResolver().openInputStream(image);
|
||||||
|
BitmapFactory.decodeStream(inputStream, null, options);
|
||||||
|
close(inputStream);
|
||||||
return calcSampleSize(options, size);
|
return calcSampleSize(options, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1241,6 +1241,7 @@ public class XmppConnectionService extends Service {
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
try {
|
try {
|
||||||
unregisterReceiver(this.mInternalEventReceiver);
|
unregisterReceiver(this.mInternalEventReceiver);
|
||||||
|
unregisterReceiver(this.mInternalScreenEventReceiver);
|
||||||
} catch (final IllegalArgumentException e) {
|
} catch (final IllegalArgumentException e) {
|
||||||
//ignored
|
//ignored
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue