mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 23:12:55 +00:00
Added span logging
This commit is contained in:
parent
ff8f3c8dcb
commit
c7b60c3c7b
1 changed files with 14 additions and 0 deletions
|
@ -55,6 +55,7 @@ import android.os.RemoteException;
|
||||||
import android.os.TransactionTooLargeException;
|
import android.os.TransactionTooLargeException;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
import android.util.Printer;
|
||||||
import android.view.Display;
|
import android.view.Display;
|
||||||
import android.view.InflateException;
|
import android.view.InflateException;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
@ -2517,4 +2518,17 @@ public class Log {
|
||||||
static InternetAddress myAddress() throws UnsupportedEncodingException {
|
static InternetAddress myAddress() throws UnsupportedEncodingException {
|
||||||
return new InternetAddress("marcel+fairemail@faircode.eu", "FairCode", StandardCharsets.UTF_8.name());
|
return new InternetAddress("marcel+fairemail@faircode.eu", "FairCode", StandardCharsets.UTF_8.name());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static StringBuilder getSpans(CharSequence text) {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
TextUtils.dumpSpans(text, new Printer() {
|
||||||
|
@Override
|
||||||
|
public void println(String x) {
|
||||||
|
if (sb.length() > 0)
|
||||||
|
sb.append(' ');
|
||||||
|
sb.append(x.replace('\n', '|')).append(']');
|
||||||
|
}
|
||||||
|
}, "[");
|
||||||
|
return sb;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue