Fixed color blender

This commit is contained in:
M66B
2019-04-04 14:17:36 +02:00
parent ab7e3d073e
commit a956cb8733
4 changed files with 11 additions and 3 deletions

View File

@@ -9,6 +9,7 @@ import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.provider.ContactsContract;
import android.util.TypedValue;
import java.io.InputStream;
import java.util.Date;
@@ -134,9 +135,10 @@ public class ContactInfo {
if (info.bitmap == null) {
boolean identicons = prefs.getBoolean("identicons", false);
if (identicons) {
String theme = prefs.getString("theme", "light");
TypedValue tv = new TypedValue();
context.getTheme().resolveAttribute(R.attr.themeName, tv, true);
int dp = Helper.dp2pixels(context, 48);
info.bitmap = Identicon.generate(key, dp, 5, "light".equals(theme));
info.bitmap = Identicon.generate(key, dp, 5, !"light".equals(tv.string));
}
}