Merge branch 'master' into development
This commit is contained in:
commit
dafcee6a5b
|
@ -385,6 +385,9 @@ public class FileBackend {
|
||||||
BitmapFactory.Options options = new BitmapFactory.Options();
|
BitmapFactory.Options options = new BitmapFactory.Options();
|
||||||
options.inSampleSize = calcSampleSize(image, size);
|
options.inSampleSize = calcSampleSize(image, size);
|
||||||
is = mXmppConnectionService.getContentResolver().openInputStream(image);
|
is = mXmppConnectionService.getContentResolver().openInputStream(image);
|
||||||
|
if (is == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
Bitmap input = BitmapFactory.decodeStream(is, null, options);
|
Bitmap input = BitmapFactory.decodeStream(is, null, options);
|
||||||
if (input == null) {
|
if (input == null) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -411,6 +414,9 @@ public class FileBackend {
|
||||||
BitmapFactory.Options options = new BitmapFactory.Options();
|
BitmapFactory.Options options = new BitmapFactory.Options();
|
||||||
options.inSampleSize = calcSampleSize(image,Math.max(newHeight, newWidth));
|
options.inSampleSize = calcSampleSize(image,Math.max(newHeight, newWidth));
|
||||||
is = mXmppConnectionService.getContentResolver().openInputStream(image);
|
is = mXmppConnectionService.getContentResolver().openInputStream(image);
|
||||||
|
if (is == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
Bitmap source = BitmapFactory.decodeStream(is, null, options);
|
Bitmap source = BitmapFactory.decodeStream(is, null, options);
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -97,7 +97,7 @@ public class PhoneHelper {
|
||||||
if (packageName != null) {
|
if (packageName != null) {
|
||||||
try {
|
try {
|
||||||
return context.getPackageManager().getPackageInfo(packageName, 0).versionName;
|
return context.getPackageManager().getPackageInfo(packageName, 0).versionName;
|
||||||
} catch (final PackageManager.NameNotFoundException e) {
|
} catch (final PackageManager.NameNotFoundException | RuntimeException e) {
|
||||||
return "unknown";
|
return "unknown";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue