Signature fixes

This commit is contained in:
M66B
2019-05-13 08:02:56 +02:00
parent e3c14cc143
commit 499b0ed6fd
3 changed files with 18 additions and 4 deletions

View File

@@ -32,6 +32,8 @@ import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle;
import android.os.Parcel;
import android.text.Spannable;
import android.text.Spanned;
import android.text.format.DateUtils;
import android.text.format.Time;
import android.view.Menu;
@@ -325,6 +327,13 @@ public class Helper {
return text.substring(0, maxLen) + "...";
}
static void clearComposingText(Spannable text) {
Object[] spans = text.getSpans(0, text.length(), Object.class);
for (Object span : spans)
if ((text.getSpanFlags(span) & Spanned.SPAN_COMPOSING) != 0)
text.removeSpan(span);
}
static String localizeFolderName(Context context, String name) {
if (name != null && "INBOX".equals(name.toUpperCase()))
return context.getString(R.string.title_folder_inbox);