Fallback to regular XML Drawable if ColorStateList loading fails
Before ag/4829987, if a drawable.xml was misplaced in res/color, but was loaded as a drawable, ResourcesImpl would correctly load it as drawable instead of a color.
Post those changes, the file name is checked, and all res/color files are forcibly loaded as colors. This adds a fallback such that if loading as color fails, an attempt is made to load as a normal drawable.
Bug: 122025886
Test: validated using test application loading layer-list inside res/colors
Change-Id: Ieed9b4d22bc85fdc7390de700fad7b03c9aad511
5 files changed