Check against null text in TextView constructor
It is common for TextView subclasses to override the #setText method, and there is nothing preventing the new implementations from leaving mText and mTransformed unchanged. On the other hand, TextView assumes mText and mTransformed will be non null at all times after the first overridden implementations, these can remain null, causing null pointer exceptions later. Bug: 74411872 Test: atest FrameworksCoreTests:android.widget.TextViewTest Test: atest FrameworksCoreTests:android.widget.TextViewActivityTest Test: atest CtsWidgetTestCases:android.widget.cts.TextViewTest Change-Id: Ifaddb46d156c495a371789c6f32cfd67ffaaaef2
Loading
Please register or sign in to comment