mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-19 09:39:25 -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 accNameStr = s.substring(0, s.length() - 5);
|
||||||
String skinFaceBase64 = MinecraftAccount.load(accNameStr).skinFaceBase64;
|
String skinFaceBase64 = MinecraftAccount.load(accNameStr).skinFaceBase64;
|
||||||
|
if (skinFaceBase64 != null) {
|
||||||
byte[] faceIconBytes = Base64.decode(skinFaceBase64, Base64.DEFAULT);
|
byte[] faceIconBytes = Base64.decode(skinFaceBase64, Base64.DEFAULT);
|
||||||
Bitmap bitmap = BitmapFactory.decodeByteArray(faceIconBytes, 0, faceIconBytes.length);
|
Bitmap bitmap = BitmapFactory.decodeByteArray(faceIconBytes, 0, faceIconBytes.length);
|
||||||
|
|
||||||
accountName.setCompoundDrawablesWithIntrinsicBounds(new BitmapDrawable(getResources(),
|
accountName.setCompoundDrawablesWithIntrinsicBounds(new BitmapDrawable(getResources(),
|
||||||
bitmap),
|
bitmap), null, null, null);
|
||||||
null, null, null);
|
}
|
||||||
accountName.setText(accNameStr);
|
accountName.setText(accNameStr);
|
||||||
|
|
||||||
accountListLayout.addView(child);
|
accountListLayout.addView(child);
|
||||||
|
@ -72,7 +72,7 @@ public class MinecraftAccount
|
|||||||
acc.msaRefreshToken = "0";
|
acc.msaRefreshToken = "0";
|
||||||
}
|
}
|
||||||
if (acc.skinFaceBase64 == null) {
|
if (acc.skinFaceBase64 == null) {
|
||||||
acc.updateSkinFace("MHF_Steve");
|
// acc.updateSkinFace("MHF_Steve");
|
||||||
}
|
}
|
||||||
return acc;
|
return acc;
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user