Fixed some warnings

pull/125/head
M66B 6 years ago
parent ba96b02f84
commit f8cc649da5

@ -1062,7 +1062,7 @@ public class FragmentCompose extends FragmentEx {
private Context context; private Context context;
private List<EntityIdentity> identities; private List<EntityIdentity> identities;
public IdentityAdapter(@NonNull Context context, List<EntityIdentity> identities) { IdentityAdapter(@NonNull Context context, List<EntityIdentity> identities) {
super(context, 0, identities); super(context, 0, identities);
this.context = context; this.context = context;
this.identities = identities; this.identities = identities;
@ -1079,10 +1079,8 @@ public class FragmentCompose extends FragmentEx {
return getLayout(position, convertView, parent); return getLayout(position, convertView, parent);
} }
public View getLayout(int position, View convertView, ViewGroup parent) { View getLayout(int position, View convertView, ViewGroup parent) {
View view = convertView; View view = LayoutInflater.from(context).inflate(R.layout.spinner_item2, parent, false);
if (view == convertView)
view = LayoutInflater.from(context).inflate(R.layout.spinner_item2, parent, false);
EntityIdentity identity = identities.get(position); EntityIdentity identity = identities.get(position);

@ -596,7 +596,7 @@ public class FragmentMessage extends FragmentEx {
new SimpleTask<Void>() { new SimpleTask<Void>() {
@Override @Override
protected Void onLoad(Context context, Bundle args) throws Throwable { protected Void onLoad(Context context, Bundle args) {
Long id = args.getLong("id"); Long id = args.getLong("id");
DB db = DB.getInstance(context); DB db = DB.getInstance(context);
EntityMessage message = db.message().getMessage(id); EntityMessage message = db.message().getMessage(id);
@ -994,7 +994,7 @@ public class FragmentMessage extends FragmentEx {
.putExtra("reference", message.id)); .putExtra("reference", message.id));
} }
SimpleTask<Spanned> bodyTask = new SimpleTask<Spanned>() { private SimpleTask<Spanned> bodyTask = new SimpleTask<Spanned>() {
@Override @Override
protected Spanned onLoad(final Context context, final Bundle args) throws Throwable { protected Spanned onLoad(final Context context, final Bundle args) throws Throwable {
final long id = args.getLong("id"); final long id = args.getLong("id");
@ -1021,7 +1021,7 @@ public class FragmentMessage extends FragmentEx {
}; };
private static Spanned decodeHtml(final Context context, final long id, String body, final boolean show_images) { private static Spanned decodeHtml(final Context context, final long id, String body, final boolean show_images) {
Spanned result = Html.fromHtml(HtmlHelper.sanitize(context, body, false), new Html.ImageGetter() { return Html.fromHtml(HtmlHelper.sanitize(context, body, false), new Html.ImageGetter() {
@Override @Override
public Drawable getDrawable(String source) { public Drawable getDrawable(String source) {
float scale = context.getResources().getDisplayMetrics().density; float scale = context.getResources().getDisplayMetrics().density;
@ -1111,7 +1111,5 @@ public class FragmentMessage extends FragmentEx {
Log.i(Helper.TAG, "HTML tag=" + tag + " opening=" + opening); Log.i(Helper.TAG, "HTML tag=" + tag + " opening=" + opening);
} }
}); });
return result;
} }
} }

@ -285,7 +285,7 @@ public class MessageHelper {
return getHtml(imessage); return getHtml(imessage);
} }
static String getHtml(Part part) throws MessagingException, IOException { private static String getHtml(Part part) throws MessagingException, IOException {
if (part.isMimeType("text/*")) { if (part.isMimeType("text/*")) {
String s; String s;
try { try {
@ -353,7 +353,7 @@ public class MessageHelper {
return result; return result;
} }
static List<EntityAttachment> getAttachments(BodyPart part) throws private static List<EntityAttachment> getAttachments(BodyPart part) throws
IOException, MessagingException { IOException, MessagingException {
List<EntityAttachment> result = new ArrayList<>(); List<EntityAttachment> result = new ArrayList<>();

Loading…
Cancel
Save