diff options
author | Mihai Popa <popam@google.com> | 2018-03-12 19:30:22 +0000 |
---|---|---|
committer | Mihai Popa <popam@google.com> | 2018-05-14 16:54:00 +0100 |
commit | a875271fccd3ff8a4c865163efcee3fa62b15da3 (patch) | |
tree | 0652dc6799602d43d972c1accf795a4a79ec7d00 /tools/aapt2/java/JavaClassGenerator.cpp | |
parent | 33b6d0ec215bcf12dabb0fa91b95535858758d97 (diff) |
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
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions