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

Commit 7c9b801f authored by Mill Chen's avatar Mill Chen
Browse files

Fix IllustrationPreferenceTest failed

Add null checker to guard against NPE when testing illustration
preference.

Fix: 400939679
Test: atest IllustrationPreferenceTest
Flag: EXEMPT bugfix
Change-Id: I16bb6f531289f490e7384e1f4c82df8970ceea6a
parent 1c413e4d
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -138,8 +138,12 @@ public class IllustrationPreference extends Preference implements GroupSectionDi
        ImageView backgroundViewTablet =
                (ImageView) holder.findViewById(R.id.background_view_tablet);

        if (backgroundView != null) {
            backgroundView.setVisibility(mIsTablet ? View.GONE : View.VISIBLE);
        }
        if (backgroundViewTablet != null) {
            backgroundViewTablet.setVisibility(mIsTablet ? View.VISIBLE : View.GONE);
        }
        if (mIsTablet) {
            backgroundView = backgroundViewTablet;
        }