修复firebase反馈的空指针问题

This commit is contained in:
2022-10-28 13:50:34 +08:00
parent 07ae094bed
commit b394a8f9b5
7 changed files with 33 additions and 15 deletions

View File

@@ -131,7 +131,7 @@ public class ImgLoader {
}
public static void displayAvatar(Context context, String url, ImageView imageView, int width, int height) {
if (!contextIsExist(context)) {
if (!contextIsExist(context) || imageView == null) {
return;
}

View File

@@ -147,7 +147,7 @@ public class StringUtil {
return sStringBuilder.toString();
}
public static boolean isEmpty(String bgColor) {
return bgColor == null || "".equals(bgColor.trim()) || bgColor.trim().length() == 0;
public static boolean isEmpty(String str) {
return str == null || "".equals(str.trim()) || str.trim().length() == 0;
}
}