mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-17 00:29:50 -04:00
Temporary fix NetworkOnMainThreadException
Offline acc currently become no avatar
This commit is contained in:
parent
c9359dc2c5
commit
4d1db81b04
@ -654,12 +654,13 @@ public class PojavLoginActivity extends BaseActivity
|
||||
|
||||
String accNameStr = s.substring(0, s.length() - 5);
|
||||
String skinFaceBase64 = MinecraftAccount.load(accNameStr).skinFaceBase64;
|
||||
byte[] faceIconBytes = Base64.decode(skinFaceBase64, Base64.DEFAULT);
|
||||
Bitmap bitmap = BitmapFactory.decodeByteArray(faceIconBytes, 0, faceIconBytes.length);
|
||||
if (skinFaceBase64 != null) {
|
||||
byte[] faceIconBytes = Base64.decode(skinFaceBase64, Base64.DEFAULT);
|
||||
Bitmap bitmap = BitmapFactory.decodeByteArray(faceIconBytes, 0, faceIconBytes.length);
|
||||
|
||||
accountName.setCompoundDrawablesWithIntrinsicBounds(new BitmapDrawable(getResources(),
|
||||
bitmap),
|
||||
null, null, null);
|
||||
accountName.setCompoundDrawablesWithIntrinsicBounds(new BitmapDrawable(getResources(),
|
||||
bitmap), null, null, null);
|
||||
}
|
||||
accountName.setText(accNameStr);
|
||||
|
||||
accountListLayout.addView(child);
|
||||
|
@ -72,7 +72,7 @@ public class MinecraftAccount
|
||||
acc.msaRefreshToken = "0";
|
||||
}
|
||||
if (acc.skinFaceBase64 == null) {
|
||||
acc.updateSkinFace("MHF_Steve");
|
||||
// acc.updateSkinFace("MHF_Steve");
|
||||
}
|
||||
return acc;
|
||||
} catch(IOException e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user