avoid concurrent button press crash in TimeListEdit - now for real
This commit is contained in:
parent
4c25272969
commit
b509d13073
1 changed files with 5 additions and 6 deletions
|
@ -372,12 +372,11 @@ public class TimeListEdit {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addItem(int index, int timeAsSeconds, double value1, double value2) {
|
private void addItem(int index, int timeAsSeconds, double value1, double value2) {
|
||||||
synchronized (this) {
|
if (itemsCount() >= 24) return;
|
||||||
if (itemsCount() > inflatedUntil) {
|
if (itemsCount() > inflatedUntil) {
|
||||||
layout.removeView(finalAdd);
|
layout.removeView(finalAdd);
|
||||||
inflateRow(++inflatedUntil);
|
inflateRow(++inflatedUntil);
|
||||||
layout.addView(finalAdd);
|
layout.addView(finalAdd);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
// shift data
|
// shift data
|
||||||
|
|
Loading…
Add table
Reference in a new issue