Fix CTS tests for LayerDrawable, ScaleDrawable, InsetDrawable
LayerDrawable's bounds should never change when the state or level changes, but the child bounds may change. The CTS test was checking internal implementation details rather than API compatibility. ScaleDrawable only needs to check child opacity when the level is greater than 0, otherwise the child isn't going to draw and it's always TRANSPARENT. InsetDrawable only needs to update layer bounds when the contained drawable changes, or when the inset changes. Additionally, calling inflate() multiple times on the same drawable has undefined behavior and we shouldn't be testing that. Also updates calls to deprecated Resources.getDrawable(). Bug: 19863229 Bug: 19863468 Bug: 19863765 Change-Id: If37c0ec25969cce765d6d3a9ca0d1f141f3580e6
Loading
Please sign in to comment