Recycle obtained TypedArrays
Bug: 218835043 Test: make Change-Id: I34f53b8767b34b77a8a8246e9d3863854477feb6
This commit is contained in:
@@ -209,6 +209,7 @@ class DatePickerCalendarDelegate extends DatePicker.AbstractDatePickerDelegate {
|
||||
// Generate a non-activated color using the disabled alpha.
|
||||
final TypedArray ta = mContext.obtainStyledAttributes(ATTRS_DISABLED_ALPHA);
|
||||
final float disabledAlpha = ta.getFloat(0, 0.30f);
|
||||
ta.recycle();
|
||||
defaultColor = multiplyAlphaComponent(activatedColor, disabledAlpha);
|
||||
}
|
||||
|
||||
|
||||
@@ -373,6 +373,7 @@ class TimePickerClockDelegate extends TimePicker.AbstractTimePickerDelegate {
|
||||
// Generate a non-activated color using the disabled alpha.
|
||||
final TypedArray ta = mContext.obtainStyledAttributes(ATTRS_DISABLED_ALPHA);
|
||||
final float disabledAlpha = ta.getFloat(0, 0.30f);
|
||||
ta.recycle();
|
||||
defaultColor = multiplyAlphaComponent(activatedColor, disabledAlpha);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user