Simple task: spanned by value

This commit is contained in:
M66B
2023-03-27 18:22:44 +02:00
parent 55b97da356
commit 5fb25a708d
2 changed files with 7 additions and 4 deletions

View File

@@ -25,6 +25,7 @@ import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.PowerManager;
import android.text.Spanned;
import android.view.ContextThemeWrapper;
import androidx.annotation.NonNull;
@@ -167,6 +168,12 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
this.name = name;
this.started = new Date().getTime();
for (String key : args.keySet()) {
Object value = args.get(key);
if (value instanceof Spanned)
args.putCharSequence(key, new SpannableStringBuilderEx((Spanned) value));
}
if (owner instanceof TwoStateOwner)
Log.e(new Throwable("SimpleTask/TwoStateOwner"));