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

Commit 9f7fab35 authored by Colin Cross's avatar Colin Cross Committed by Automerger Merge Worker
Browse files

Merge "Fix kotlin nullable errors in Launcher3" into main am: fc786807

parents 776d87a4 fc786807
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -83,8 +83,8 @@ constructor(
    override fun onFinishInflate() {
        super.onFinishInflate()

        content = findViewById(R.id.content)
        arrow = findViewById(R.id.arrow)
        content = requireViewById(R.id.content)
        arrow = requireViewById(R.id.arrow)
        arrow.background =
            RoundedArrowDrawable(
                arrowWidth,
+13 −13
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ class TaskbarEduTooltipController(val activityContext: TaskbarActivityContext) :
        tooltipStep = TOOLTIP_STEP_FEATURES
        inflateTooltip(R.layout.taskbar_edu_swipe)
        tooltip?.run {
            findViewById<LottieAnimationView>(R.id.swipe_animation).supportLightTheme()
            requireViewById<LottieAnimationView>(R.id.swipe_animation).supportLightTheme()
            show()
        }
    }
@@ -114,10 +114,10 @@ class TaskbarEduTooltipController(val activityContext: TaskbarActivityContext) :
        tooltipStep = TOOLTIP_STEP_NONE
        inflateTooltip(R.layout.taskbar_edu_features)
        tooltip?.run {
            val splitscreenAnim = findViewById<LottieAnimationView>(R.id.splitscreen_animation)
            val suggestionsAnim = findViewById<LottieAnimationView>(R.id.suggestions_animation)
            val settingsAnim = findViewById<LottieAnimationView>(R.id.settings_animation)
            val settingsEdu = findViewById<View>(R.id.settings_edu)
            val splitscreenAnim = requireViewById<LottieAnimationView>(R.id.splitscreen_animation)
            val suggestionsAnim = requireViewById<LottieAnimationView>(R.id.suggestions_animation)
            val settingsAnim = requireViewById<LottieAnimationView>(R.id.settings_animation)
            val settingsEdu = requireViewById<View>(R.id.settings_edu)
            splitscreenAnim.supportLightTheme()
            suggestionsAnim.supportLightTheme()
            settingsAnim.supportLightTheme()
@@ -175,7 +175,7 @@ class TaskbarEduTooltipController(val activityContext: TaskbarActivityContext) :
    private fun createAccessibilityDelegate() =
        object : View.AccessibilityDelegate() {
            override fun performAccessibilityAction(
                host: View?,
                host: View,
                action: Int,
                args: Bundle?
            ): Boolean {
@@ -186,22 +186,22 @@ class TaskbarEduTooltipController(val activityContext: TaskbarActivityContext) :
                return super.performAccessibilityAction(host, action, args)
            }

            override fun onPopulateAccessibilityEvent(host: View?, event: AccessibilityEvent?) {
            override fun onPopulateAccessibilityEvent(host: View, event: AccessibilityEvent) {
                super.onPopulateAccessibilityEvent(host, event)
                if (event?.eventType == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED) {
                    event.text?.add(host?.context?.getText(R.string.taskbar_edu_a11y_title))
                if (event.eventType == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED) {
                    event.text.add(host.context?.getText(R.string.taskbar_edu_a11y_title))
                }
            }

            override fun onInitializeAccessibilityNodeInfo(
                host: View?,
                info: AccessibilityNodeInfo?
                host: View,
                info: AccessibilityNodeInfo
            ) {
                super.onInitializeAccessibilityNodeInfo(host, info)
                info?.addAction(
                info.addAction(
                    AccessibilityNodeInfo.AccessibilityAction(
                        R.id.close,
                        host?.context?.getText(R.string.taskbar_edu_close)
                        host.context?.getText(R.string.taskbar_edu_close)
                    )
                )
            }
+2 −2
Original line number Diff line number Diff line
@@ -192,13 +192,13 @@ class VoiceInteractionWindowController(val context: TaskbarActivityContext) :
        removeOnAttachStateChangeListener(pendingAttachedToWindowListener)
        pendingAttachedToWindowListener =
            object : View.OnAttachStateChangeListener {
                override fun onViewAttachedToWindow(v: View?) {
                override fun onViewAttachedToWindow(v: View) {
                    onAttachedToWindow()
                    removeOnAttachStateChangeListener(this)
                    pendingAttachedToWindowListener = null
                }

                override fun onViewDetachedFromWindow(v: View?) {}
                override fun onViewDetachedFromWindow(v: View) {}
            }
        addOnAttachStateChangeListener(pendingAttachedToWindowListener)
    }
+3 −3
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ abstract class AbstractNavButtonLayoutter(
    protected val endContextualContainer: ViewGroup,
    protected val startContextualContainer: ViewGroup
) : NavButtonLayoutter {
    protected val homeButton: ImageView = navButtonContainer.findViewById(R.id.home)
    protected val recentsButton: ImageView = navButtonContainer.findViewById(R.id.recent_apps)
    protected val backButton: ImageView = navButtonContainer.findViewById(R.id.back)
    protected val homeButton: ImageView = navButtonContainer.requireViewById(R.id.home)
    protected val recentsButton: ImageView = navButtonContainer.requireViewById(R.id.recent_apps)
    protected val backButton: ImageView = navButtonContainer.requireViewById(R.id.back)
}
+4 −3
Original line number Diff line number Diff line
@@ -60,11 +60,12 @@ class NavButtonLayoutFactory {
            isThreeButtonNav: Boolean,
            phoneMode: Boolean
        ): NavButtonLayoutter {
            val navButtonContainer = navButtonsView.findViewById<LinearLayout>(ID_END_NAV_BUTTONS)
            val navButtonContainer =
                navButtonsView.requireViewById<LinearLayout>(ID_END_NAV_BUTTONS)
            val endContextualContainer =
                navButtonsView.findViewById<ViewGroup>(ID_END_CONTEXTUAL_BUTTONS)
                navButtonsView.requireViewById<ViewGroup>(ID_END_CONTEXTUAL_BUTTONS)
            val startContextualContainer =
                navButtonsView.findViewById<ViewGroup>(ID_START_CONTEXTUAL_BUTTONS)
                navButtonsView.requireViewById<ViewGroup>(ID_START_CONTEXTUAL_BUTTONS)
            val isPhoneNavMode = phoneMode && isThreeButtonNav
            return when {
                isPhoneNavMode -> {
Loading