override fun onResume()

in azure-communication-ui/demo-app/src/calling/java/com/azure/android/communication/ui/callingcompositedemoapp/SettingsActivity.kt [102:204]


    override fun onResume() {
        super.onResume()

        languageArrayAdapter =
            ArrayAdapter(applicationContext, R.layout.language_dropdown_item, supportedLanguages)
        autoCompleteTextView.setAdapter(languageArrayAdapter)
        languageArrayAdapter.filter.filter(null)

        setLanguageInAdapter()

        callScreenOrientationArrayAdapter =
            ArrayAdapter(applicationContext, R.layout.screen_orientation_dropdown_item, supportedScreenOrientations)
        callScreenOrientationAutoCompleteTextView.setAdapter(callScreenOrientationArrayAdapter)
        callScreenOrientationArrayAdapter.filter.filter(null)

        setOrientationInCallScreenOrientationAdapter()

        setupScreenOrientationArrayAdapter =
            ArrayAdapter(applicationContext, R.layout.screen_orientation_dropdown_item, supportedScreenOrientations)
        setupScreenOrientationAutoCompleteTextView.setAdapter(setupScreenOrientationArrayAdapter)
        setupScreenOrientationArrayAdapter.filter.filter(null)

        telecomManagerArrayAdapter =
            ArrayAdapter(applicationContext, R.layout.screen_orientation_dropdown_item, telecomManagerIntegrationOptions)
        telecomManagerAutoCompleteTextView.setAdapter(telecomManagerArrayAdapter)
        telecomManagerArrayAdapter.filter.filter(null)

        telecomManagerAutoCompleteAdapter()

        setOrientationInSetupScreenOrientationAdapter()

        updateRTLCheckbox()

        updateAvatarInjectionCheckbox()
        updateDisplayNameInjectionCheckbox()

        updateSkipSetupScreenCheckbox()

        updateDeprecatedLaunchCheckbox()

        updateDisableInternalPushForIncomingCallCheckbox()

        updateAutoStartCaptionsCheckbox()

        updateHideCaptionsUiCheckbox()

        updateMicOnByDefaultCheckbox()

        updateCameraOnByDefaultCheckbox()

        updateEndCallOnDefaultCheckBox()

        updateAudioOnlyDefaultCheckbox()

        updateEnableMultitaskingCheckbox()
        updateEnablePipMultitaskingCheckbox()
        updateSetupScreenCameraEnabledCheckbox()
        updateSetupScreenMicEnabledCheckbox()

        updateRenderedDisplayNameText()
        updateTitle()
        updateSubtitle()

        updateDisplayLeaveCallConfirmationCheckbox()
        updateShowCallDurationCheckbox()

        updateCustomButtonsCheckbox()

        defaultSpokenLanguageEditText.text = sharedPreference.getString(DEFAULT_SPOKEN_LANGUAGE_KEY, DEFAULT_SPOKEN_LANGUAGE)
        sharedPreference.getInt(CALL_INFORMATION_TITLE_UPDATE_PARTICIPANT_COUNT_KEY, CALL_INFORMATION_TITLE_UPDATE_PARTICIPANT_COUNT_VALUE).toString()
            .let {
                if (it.isNotEmpty() && it != "0") {
                    updateTitleRemotePartiicpantCountEditBox.text = it
                }
            }
        sharedPreference.getInt(CALL_INFORMATION_SUBTITLE_UPDATE_PARTICIPANT_COUNT_KEY, CALL_INFORMATION_SUBTITLE_UPDATE_PARTICIPANT_COUNT_VALUE).toString().let {
            if (it.isNotEmpty() && it != "0") {
                updateSubtitleRemotePartiicpantCountEditBox.text = it
            }
        }
        callInformationTitleEditText.text = sharedPreference.getString(CALL_INFORMATION_TITLE_KEY, CALL_INFORMATION_DEFAULT_TITLE)
        callInformationSubtitleEditText.text = sharedPreference.getString(CALL_INFORMATION_SUBTITLE_KEY, CALL_INFORMATION_SUBTITLE_DEFAULT)
        autoCompleteTextView.setOnItemClickListener { _, _, position, _ ->
            val selectedItem: String = supportedLanguages[position]
            setLanguageValueInSharedPref(selectedItem)
            updateRTLCheckbox()
        }

        callScreenOrientationAutoCompleteTextView.setOnItemClickListener { _, _, position, _ ->
            val selectedItem: String = supportedScreenOrientations[position]
            saveCallScreenOrientationInSharedPref(selectedItem)
        }

        setupScreenOrientationAutoCompleteTextView.setOnItemClickListener { _, _, position, _ ->
            val selectedItem: String = supportedScreenOrientations[position]
            saveSetupScreenOrientationInSharedPref(selectedItem)
        }

        telecomManagerAutoCompleteTextView.setOnItemClickListener { _, _, position, _ ->
            val selectedItem: String = telecomManagerIntegrationOptions[position]
            saveTelecomManagerIntegrationOptionInSharedPref(selectedItem)
        }
    }