Fix error overwriting when restoring error

onRestoreInstanceState restores the old error, after layout has been
done. A new error may have been set before this is done, which thus
overwrites the new error.

This patch prevents the new error from being overwritten.

Change-Id: I8e7c91b5da27310fb6698e671d1f7d78ee268061
This commit is contained in:
Alexander Toresson
2013-10-14 14:59:31 +02:00
committed by Johan Redestig
parent 59701b9ba5
commit 545a8bbe70

View File

@@ -3809,7 +3809,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
// Display the error later, after the first layout pass
post(new Runnable() {
public void run() {
setError(error);
if (mEditor == null || !mEditor.mErrorWasChanged) {
setError(error);
}
}
});
}