---
title: "LocalTextFieldContentObserverRegistrationExecutor"
description: "BasicSecureTextField or any other secure TextField that depends on it needs to register a ContentObserver to be able to observe the changes to platform password visibility settings."
type: "property"
lastmod: "2026-05-20T01:13:53.392410Z"
---
## API Reference

> Source set: Android

```kotlin
val LocalTextFieldContentObserverRegistrationExecutor = staticCompositionLocalOf<Executor?> { null }
```

[BasicSecureTextField](/jetpack-compose/androidx.compose.foundation/foundation/composable-functions/BasicSecureTextField) or any other secure TextField that depends on it needs to register a
`ContentObserver` to be able to observe the changes to platform password visibility settings.
Registering this observer on the main thread is usually fine but because it requires an IPC call
to be made, a rare lock contention can happen that hangs the main thread for a short time.

This [androidx.compose.runtime.CompositionLocal](/jetpack-compose/androidx.compose.runtime/runtime/classes/CompositionLocal) provides a way to choose an `Executor` to run
this registration and its corresponding unregistration in, freeing the main thread.

The default value `null` indicates that the main thread will be used.
