Avoid calling scrollBy(0,0) on render
Usually scrollBy(0, 0) won't have any effect but when called on the NumberPicker but, in some cases, it seems to cause an endless loop. When called from layoutlib, this will hold the read lock causing all operations trying to acquire the write lock to block forever. Bug: http://b.android.com/182506 Change-Id: Ib25427d3f32d804d1c481d979795eee71fbdbc6d
This commit is contained in:
@@ -1050,11 +1050,7 @@ public class RenderSessionImpl extends RenderAction<SessionParams> {
|
||||
}
|
||||
if (scrollPos != 0) {
|
||||
view.scrollBy(0, scrollPos);
|
||||
} else {
|
||||
view.scrollBy(0, scrollPos);
|
||||
}
|
||||
} else {
|
||||
view.scrollBy(0, scrollPos);
|
||||
}
|
||||
|
||||
if (!(view instanceof ViewGroup)) {
|
||||
|
||||
Reference in New Issue
Block a user