Change Resources.getDrawable nullability
Resources.getDrawable() was annotated @Nullable because there was one very particular path where Bitmap decoding would fail and trigger a null return. As part of the switch to ImageDecoder, that path was changed to now throw an IOException, which will result as a NotFoundException to the caller of getDrawable. This CL annotates that path as @NonNull to reduce pain of dealing with @Nullable method that was very unlikely to be null in practice. Also fixes many other missing nullability annotations, and relabel many @Nullable paths that would never return null in practice as @NonNull. Bug: 69543526 Test: ResourcesTest Change-Id: Ib01eca970c5c9969998ce5b265b120aa7048b41a
Loading
Please register or sign in to comment