Remove FontFamily.addFont and make FontFamily immutable.
This is 2nd attempt of 41e02e96131c1ec66d013e4615348be013518dc4
The difference is adding clearElementsEithLock to Font class which
is necessary to delete Fonts object outside of minikin. This method
should be removed once http://b/28119474 is fixed.
Here is original commit message of reverted change.
This lays the groundwork for making SparseBitSet serializable.
FontFamily.addFont is only used when the FontFamily is constructed.
Thus, instead of calling FontFamily.addFont multiple time, passes
Font list to the constructor. By this change, FontFamily can be
immutable now.
By making FontFamily immutable, We can create FontFamily with
pre-calculated SparseBitSet.
Bug: 34042446
Bug: 28119474
Bug: 34378805
Test: minikin_tests has passed
Change-Id: Ice433931196f5ae79a1a7ee0c98020f914aeb5f2
9 files changed