# LegacySurfacePackage

Artifact: [androidx.car.app:app-automotive](https://developer.android.com/jetpack/androidx/releases/car-app) [View Source](https://cs.android.com/search?q=file:androidx/car/app/activity/renderer/surface/LegacySurfacePackage.java+class:androidx.car.app.activity.renderer.surface.LegacySurfacePackage) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)

*** ** * ** ***


```
@CarProtocol
public final class LegacySurfacePackage
```

<br />

*** ** * ** ***

A serializable class containing all the data required to render and interact with a surface from an off-process renderer. This class exists for compatibility with Q devices. In Android R and later, `https://developer.android.com/reference/android/view/SurfaceControlViewHost.SurfacePackage.html` will be used instead.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/car/app/activity/renderer/surface/LegacySurfacePackage#LegacySurfacePackage(androidx.car.app.activity.renderer.surface.SurfaceControlCallback)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/activity/renderer/surface/SurfaceControlCallback callback)` Creates a `https://developer.android.com/reference/androidx/car/app/activity/renderer/surface/LegacySurfacePackage`. |

## Public constructors

### LegacySurfacePackage

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)

```
public LegacySurfacePackage(@NonNull SurfaceControlCallback callback)
```

Creates a `https://developer.android.com/reference/androidx/car/app/activity/renderer/surface/LegacySurfacePackage`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/activity/renderer/surface/SurfaceControlCallback callback` | a `https://developer.android.com/reference/androidx/car/app/activity/renderer/surface/SurfaceControlCallback` to be registered to receive off-process renderer events affecting the `https://developer.android.com/reference/android/view/SurfaceView.html` that content is rendered on. |