File tree 2 files changed +5
-7
lines changed
vector/src/main/java/im/vector/app/features/html
2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change
1
+ Fixing emoji related crashes on android 8.1.1 and below
Original file line number Diff line number Diff line change 16
16
17
17
package im.vector.app.features.html
18
18
19
- import android.os.Build
20
19
import android.text.Spanned
21
20
import android.text.style.MetricAffectingSpan
22
21
import android.text.style.StrikethroughSpan
@@ -41,13 +40,11 @@ class SpanUtils @Inject constructor(
41
40
)
42
41
}
43
42
44
- // Workaround for https://issuetracker.google.com/issues/188454876
43
+ /* *
44
+ * TextFutures do not support StrikethroughSpan, UnderlineSpan or MetricAffectingSpan
45
+ * Workaround for https://issuetracker.google.com/issues/188454876
46
+ */
45
47
private fun canUseTextFuture (spanned : Spanned ): Boolean {
46
- if (Build .VERSION .SDK_INT < Build .VERSION_CODES .P ) {
47
- // On old devices, it works correctly
48
- return true
49
- }
50
-
51
48
return spanned
52
49
.getSpans(0 , spanned.length, Any ::class .java)
53
50
.all { it !is StrikethroughSpan && it !is UnderlineSpan && it !is MetricAffectingSpan }
You can’t perform that action at this time.
0 commit comments