Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8896df9d authored by Haoyu Zhang's avatar Haoyu Zhang
Browse files

Set SubtitleView.mAlignment default value to be Alignment.ALIGN_CENTER

SubtitleView.mAlignment is null by default. This can cause undefined
behavior if mAlignment is passed to StaticLayout.Builder.setAlignment().
As the previous behavior of StaticLayout with alignment equals to null is
same as ALIGN_CENTER, this change uses ALIGN_CENTER as default value.

Bug: 119221721
Test: bit CtsWidgetTestCases:android.widget.cts.CheckedTextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.EditTextTest
Test: bit CtsWidgetTestCases:android.widget.cts.SwitchTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewTest
Change-Id: Iefd069db449a7fe3d68f6f3e5ebcfcbf1e588962
parent e6472fe5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment