# SurfaceEntity.SurfaceProtection

Artifact: [androidx.xr.scenecore:scenecore](https://developer.android.com/jetpack/androidx/releases/xr-scenecore) [View Source](https://cs.android.com/search?q=file:androidx/xr/scenecore/SurfaceEntity.kt+class:androidx.xr.scenecore.SurfaceEntity.SurfaceProtection) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

*** ** * ** ***


```
class SurfaceEntity.SurfaceProtection
```

<br />

*** ** * ** ***

Specifies whether the `https://developer.android.com/reference/android/view/Surface.html` which backs this `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/Entity` should be backed by `https://developer.android.com/reference/android/hardware/HardwareBuffer.html`s with the USAGE_PROTECTED_CONTENT flag set. These buffers support hardware paths for decoding protected content.

See [MediaDrm](https://developer.android.com/reference/android/media/MediaDrm) for more details.

## Summary

| ### Public companion properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SurfaceEntity.SurfaceProtection` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SurfaceEntity.SurfaceProtection#NONE()` The Surface content is not protected. |
| `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SurfaceEntity.SurfaceProtection` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SurfaceEntity.SurfaceProtection#PROTECTED()` The Surface content is protected. |

| ### Public functions |
|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/SurfaceEntity.SurfaceProtection#toString()()` |

## Public companion properties

### NONE

```
val NONE: SurfaceEntity.SurfaceProtection
```

The Surface content is not protected. Non-protected content can be decoded into this surface. Protected content can not be decoded into this Surface. Screen captures of the SurfaceEntity will show the Surface content.

### PROTECTED

```
val PROTECTED: SurfaceEntity.SurfaceProtection
```

The Surface content is protected. Non-protected content can be decoded into this surface. Protected content can be decoded into this Surface. Screen captures of the SurfaceEntity will redact the Surface content.

## Public functions

### toString

```
open fun toString(): String
```