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

Commit 50ae8d3c authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix WifiCallingPreferenceController crash" into main

parents 08319b18 d54d112e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -81,6 +81,12 @@ open class WifiCallingPreferenceController @JvmOverloads constructor(
    }

    override fun onViewCreated(viewLifecycleOwner: LifecycleOwner) {
        if (!SubscriptionManager.isValidSubscriptionId(subId)) {
            // Sub id could invalid, if this page is opened from external action and no sim is
            // active.
            // Ignore this case, since this page will be finished soon.
            return
        }
        wifiCallingRepositoryFactory(subId).wifiCallingReadyFlow()
            .collectLatestWithLifecycle(viewLifecycleOwner) { isReady ->
                preference.isVisible = isReady