Commit da492b57 authored by Wei Liu's avatar Wei Liu
Browse files

Fix the NPE of testSingleLine.

The javadoc of TextView.getLayout() says it "returns the Layout that is
currently being used to display the text. This can be null if the text
or width has recently changes."
setSingleLine() should change the width of a TextView in a narrow
layout. So getLayout() can be null and causing NPE in that case.

Bug: 18444422
Change-Id: If61a1fad2d3baa2e1a60049079e311a23cdf2957
parent 8a893be3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment