# SecureFlagPolicy

Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/window/SecureFlagPolicy.android.kt+class:androidx.compose.ui.window.SecureFlagPolicy) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Common/AllAndroid/JVM
- android

  ```
  enum SecureFlagPolicy : Enum<SecureFlagPolicy>
  ```

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [kotlin.Enum](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-enum/index.html)\<[SecureFlagPolicy](https://developer.android.com/reference/kotlin/androidx/compose/ui/window/SecureFlagPolicy)\> ||
|   | ↳ | [androidx.compose.ui.window.SecureFlagPolicy](https://developer.android.com/reference/kotlin/androidx/compose/ui/window/SecureFlagPolicy) |

*** ** * ** ***

Policy on setting `https://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_SECURE` on a window.

## Summary

| ### Enum Values |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/window/SecureFlagPolicy#Inherit` | Inherit `https://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_SECURE` from the parent window and pass it on the window that is using this policy. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/window/SecureFlagPolicy#SecureOff` | No `https://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_SECURE` will be set on the window that is using this policy. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/window/SecureFlagPolicy#SecureOn` | Forces `https://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_SECURE` to be set on the window that is using this policy. |

| ### Public functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/window/SecureFlagPolicy` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/window/SecureFlagPolicy#valueOf(kotlin.String)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Returns the enum constant of this type with the specified name. | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/window/SecureFlagPolicy>` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/window/SecureFlagPolicy#values()()` Returns an array containing the constants of this enum type, in the order they're declared. | android |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.enums/-enum-entries/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/window/SecureFlagPolicy>` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/window/SecureFlagPolicy#entries()` Returns an immutable `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.enums/-enum-entries/index.html` list containing the constants of this enum type, in the order they're declared. | android |

## Enum Values

### Inherit

```
val SecureFlagPolicy.Inherit: SecureFlagPolicy
```

Inherit `https://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_SECURE` from the parent window and pass it on the window that is using this policy.

### SecureOff

```
val SecureFlagPolicy.SecureOff: SecureFlagPolicy
```

No `https://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_SECURE` will be set on the window that is using this policy.

### SecureOn

```
val SecureFlagPolicy.SecureOn: SecureFlagPolicy
```

Forces `https://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_SECURE` to be set on the window that is using this policy.

## Public functions

### valueOf

android Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun valueOf(value: String): SecureFlagPolicy
```

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if this enum type has no constant with the specified name |

### values

android Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun values(): Array<SecureFlagPolicy>
```

Returns an array containing the constants of this enum type, in the order they're declared.

This method may be used to iterate over the constants.

The function returns a new instance of the array on every call. The array could be mutated, so working with it may also require defensive copying. Consider using `entries` property as a more efficient alternative returning an immutable list of enum entries.

## Public properties

### entries

android

```
val entries: EnumEntries<SecureFlagPolicy>
```

Returns an immutable `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.enums/-enum-entries/index.html` list containing the constants of this enum type, in the order they're declared.