Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 824fb783 authored by Matt Casey's avatar Matt Casey
Browse files

Catch NotFoundException in getDrawableForDensity

Callers already handle a null result. NotFoundException is an expected
exception that shouldn't cause a crash.

Bug: 361803053
Test: None, just catching exception.
Flag: EXEMPT minor bugfix
Change-Id: I19bb1d6e20ce98eb9af587b10ae82e9b52bc561d
parent fca8ee70
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1195,7 +1195,12 @@ public class ResolverListAdapter extends BaseAdapter {

        @Nullable
        protected Drawable loadIconFromResource(Resources res, int resId) {
            try {
                return res.getDrawableForDensity(resId, mIconDpi);
            } catch (Resources.NotFoundException e) {
                Log.e(TAG, "Resource not found", e);
                return null;
            }
        }

    }