Address book list

This commit is contained in:
str4d
2014-05-15 00:36:00 +00:00
parent 618e9f299d
commit 0fdb9c156b
13 changed files with 277 additions and 4 deletions

View File

@@ -91,8 +91,7 @@ public class BoteHelper extends GeneralHelper {
// Address is in address book
String pic = c.getPictureBase64();
if (pic != null) {
byte[] decodedPic = Base64.decode(pic, Base64.DEFAULT);
return BitmapFactory.decodeByteArray(decodedPic, 0, decodedPic.length);
return decodePicture(pic);
}
} else {
// Address is an identity
@@ -100,8 +99,7 @@ public class BoteHelper extends GeneralHelper {
if (i != null) {
String pic = i.getPictureBase64();
if (pic != null) {
byte[] decodedPic = Base64.decode(pic, Base64.DEFAULT);
return BitmapFactory.decodeByteArray(decodedPic, 0, decodedPic.length);
return decodePicture(pic);
}
}
}
@@ -110,4 +108,9 @@ public class BoteHelper extends GeneralHelper {
// Address not found anywhere, or found and has no picture
return null;
}
public static Bitmap decodePicture(String picB64) {
byte[] decodedPic = Base64.decode(picB64, Base64.DEFAULT);
return BitmapFactory.decodeByteArray(decodedPic, 0, decodedPic.length);
}
}