File tree Expand file tree Collapse file tree
libs/SalesforceSDK/src/com/salesforce/androidsdk/ui Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ import androidx.compose.ui.graphics.toArgb
9797import androidx.core.content.ContextCompat
9898import androidx.core.content.ContextCompat.getMainExecutor
9999import androidx.core.net.toUri
100+ import androidx.core.view.WindowCompat
100101import androidx.fragment.app.FragmentActivity
101102import com.salesforce.androidsdk.R.color.sf__background
102103import com.salesforce.androidsdk.R.color.sf__background_dark
@@ -917,6 +918,10 @@ open class LoginActivity : FragmentActivity() {
917918
918919 viewModel.dynamicBackgroundColor.value = validateAndExtractBackgroundColor(result)
919920 ? : return @evaluateJavascript
921+
922+ // Ensure Status Bar Icons are readable no matter which OS theme is used.
923+ val useLightIcons = viewModel.dynamicBackgroundTheme.value == DARK
924+ WindowCompat .getInsetsController(window, window.decorView).isAppearanceLightStatusBars = useLightIcons
920925 }.also {
921926 if (! viewModel.authFinished.value) {
922927 viewModel.loading.value = false
You can’t perform that action at this time.
0 commit comments