Remove emphasised span entirely

This commit is contained in:
Philip Whitehouse 2017-03-17 13:43:58 +00:00
parent 44b42747f4
commit 4eb431b170
3 changed files with 1 additions and 27 deletions

View file

@ -4,8 +4,6 @@ package com.fsck.k9.notification;
import android.content.Context; import android.content.Context;
import android.text.SpannableStringBuilder; import android.text.SpannableStringBuilder;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.style.TextAppearanceSpan;
import timber.log.Timber;
import com.fsck.k9.Account; import com.fsck.k9.Account;
import com.fsck.k9.K9; import com.fsck.k9.K9;
@ -16,14 +14,12 @@ import com.fsck.k9.helper.MessageHelper;
import com.fsck.k9.mail.Address; import com.fsck.k9.mail.Address;
import com.fsck.k9.mail.Flag; import com.fsck.k9.mail.Flag;
import com.fsck.k9.mail.Message; import com.fsck.k9.mail.Message;
import com.fsck.k9.mail.MessagingException;
import com.fsck.k9.mailstore.LocalMessage; import com.fsck.k9.mailstore.LocalMessage;
import com.fsck.k9.message.extractors.PreviewResult.PreviewType; import com.fsck.k9.message.extractors.PreviewResult.PreviewType;
class NotificationContentCreator { class NotificationContentCreator {
private final Context context; private final Context context;
private TextAppearanceSpan emphasizedSpan;
public NotificationContentCreator(Context context) { public NotificationContentCreator(Context context) {
@ -60,9 +56,7 @@ class NotificationContentCreator {
preview.append('\n'); preview.append('\n');
preview.append(snippet); preview.append(snippet);
} }
preview.setSpan(getEmphasizedSpan(), 0, displaySubject.length(), 0);
return preview; return preview;
} }
@ -91,8 +85,6 @@ class NotificationContentCreator {
summary.append(" "); summary.append(" ");
summary.append(subject); summary.append(subject);
summary.setSpan(getEmphasizedSpan(), 0, sender.length(), 0);
return summary; return summary;
} }
@ -133,12 +125,4 @@ class NotificationContentCreator {
private String getMessageSenderForDisplay(String sender) { private String getMessageSenderForDisplay(String sender) {
return (sender != null) ? sender : context.getString(R.string.general_no_sender); return (sender != null) ? sender : context.getString(R.string.general_no_sender);
} }
private TextAppearanceSpan getEmphasizedSpan() {
if (emphasizedSpan == null) {
emphasizedSpan = new TextAppearanceSpan(context,
R.style.TextAppearance_StatusBar_EventContent_Emphasized);
}
return emphasizedSpan;
}
} }

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="TextAppearance.StatusBar.EventContent.Emphasized" parent="@android:style/TextAppearance.StatusBar.EventContent">
<item name="android:textSize">16sp</item>
</style>
</resources>

View file

@ -18,10 +18,6 @@
<item name="android:textColor">@android:color/primary_text_light</item> <item name="android:textColor">@android:color/primary_text_light</item>
</style> </style>
<style name="TextAppearance.StatusBar.EventContent.Emphasized" parent="@android:style/TextAppearance.StatusBar.EventContent">
<item name="android:textSize">16sp</item>
</style>
<style name="UnreadWidgetContainer"> <style name="UnreadWidgetContainer">
<item name="android:paddingTop">0dp</item> <item name="android:paddingTop">0dp</item>
<item name="android:paddingLeft">0dp</item> <item name="android:paddingLeft">0dp</item>