This repository has been archived by the owner on Nov 8, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Interval tree for SpannableStringBuilder
This CL greatly improves the speed of SpannableStringBuilder by storing the spans as an interval tree with binary search. Bug: 7404182 Change-Id: I2540b2cfe8aef128337e63829479660ba51e62b5
- Loading branch information
d7c020e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
We currently have a framework bug probably caused by this revision.
Below you will find ly stack trace :
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.tetra4d.pdf3dviewer, PID: 23172
java.lang.ArrayIndexOutOfBoundsException: length=9; index=-1
at android.text.SpannableStringBuilder.getSpanFlags(SpannableStringBuilder.java:808)
at android.view.inputmethod.BaseInputConnection.removeComposingSpans(BaseInputConnection.java:82)
at android.view.inputmethod.BaseInputConnection.finishComposingText(BaseInputConnection.java:272)
at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:362)
at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:78)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
E/GAv4: Successfully bound to service but never got onServiceConnected callback
I/Process: Sending signal. PID: 23172 SIG: 9
Application terminated.
I can reproduce the problem evrytime I create Spannable objects.
Is there a workaround overide the default class? How is it possible to broke the framework and obtaining this kind of bug?
Thanks for your answer
Thibault Tournier
Tetra4D engineering team