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

Commit e22d4f7e authored by Tracy Zhou's avatar Tracy Zhou
Browse files

Fix non-null check crash

onConfigurationChanged can be triggered before all the buttons are initialized, including Space, in which case, we currently skip that rendering

Bug: 230395757
Test: cold start doesn't crash
Change-Id: If451ddbb6b2055a207372d6470eb0fe0faff0301
parent ae741dec
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ abstract class AbstractNavButtonLayoutter(
        protected val imeSwitcher: ImageView?,
        protected val rotationButton: RotationButton?,
        protected val a11yButton: ImageView?,
        protected val space: Space
        protected val space: Space?
) : NavButtonLayoutter {
    protected val homeButton: ImageView? = navButtonContainer.findViewById(R.id.home)
    protected val recentsButton: ImageView? = navButtonContainer.findViewById(R.id.recent_apps)
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ class KidsNavLayoutter(
        imeSwitcher: ImageView?,
        rotationButton: RotationButton?,
        a11yButton: ImageView?,
        space: Space,
        space: Space?
) :
    AbstractNavButtonLayoutter(
            resources,
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ class NavButtonLayoutFactory {
                imeSwitcher: ImageView?,
                rotationButton: RotationButton?,
                a11yButton: ImageView?,
                space: Space,
                space: Space?,
                resources: Resources,
                isKidsMode: Boolean,
                isInSetup: Boolean,
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ class PhoneGestureLayoutter(
        imeSwitcher: ImageView?,
        rotationButton: RotationButton?,
        a11yButton: ImageView?,
        space: Space,
        space: Space?
) :
        AbstractNavButtonLayoutter(
                resources,
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ open class PhoneLandscapeNavLayoutter(
        imeSwitcher: ImageView?,
        rotationButton: RotationButton?,
        a11yButton: ImageView?,
        space: Space,
        space: Space?
) :
    AbstractNavButtonLayoutter(
            resources,
Loading