Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/media/tv/TvInputService.HardwareSession#pubctors) \| [Methods](https://developer.android.com/reference/android/media/tv/TvInputService.HardwareSession#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/media/tv/TvInputService.HardwareSession#inhmethods)

# TvInputService.HardwareSession

*** ** * ** ***


`
public
static

abstract
class
TvInputService.HardwareSession
`


`


`

`

extends https://developer.android.com/reference/android/media/tv/TvInputService.Session


`

`


`

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.media.tv.TvInputService.Session](https://developer.android.com/reference/android/media/tv/TvInputService.Session) ||
|   | ↳ | android.media.tv.TvInputService.HardwareSession |

<br />

*** ** * ** ***

Base class for a TV input session which represents an external device connected to a
hardware TV input.

This class is for an input which provides channels for the external set-top box to the
application. Once a TV input returns an implementation of this class on
`https://developer.android.com/reference/android/media/tv/TvInputService#onCreateSession(java.lang.String)`, the framework will create a separate session for
a hardware TV Input (e.g. HDMI 1) and forward the application's surface to the session so
that the user can see the screen of the hardware TV Input when she tunes to a channel from
this TV input. The implementation of this class is expected to change the channel of the
external set-top box via a proprietary protocol when `https://developer.android.com/reference/android/media/tv/TvInputService.Session#onTune(android.net.Uri)` is
requested by the application.

Note that this class is not for inputs for internal hardware like built-in tuner and HDMI
1.
**See also:**

- `https://developer.android.com/reference/android/media/tv/TvInputService#onCreateSession(java.lang.String)`

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/media/tv/TvInputService.HardwareSession#HardwareSession(android.content.Context)(https://developer.android.com/reference/android/content/Context context) ` Creates a new HardwareSession. |

| ### Public methods ||
|---|---|
| ` abstract https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/media/tv/TvInputService.HardwareSession#getHardwareInputId()() ` Returns the hardware TV input ID the external device is connected to. |
| ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.HardwareSession#onHardwareVideoAvailable()() ` Called when the underlying hardware TV input session calls `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoAvailable()`. |
| ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.HardwareSession#onHardwareVideoUnavailable(int)(int reason) ` Called when the underlying hardware TV input session calls `https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)`. |
| ` final boolean` | ` https://developer.android.com/reference/android/media/tv/TvInputService.HardwareSession#onSetSurface(android.view.Surface)(https://developer.android.com/reference/android/view/Surface surface) ` This method will not be called in `https://developer.android.com/reference/android/media/tv/TvInputService.HardwareSession`. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/android/media/tv/TvInputService.Session ` |---|---| | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#layoutSurface(int,%20int,%20int,%20int)(int left, int top, int right, int bottom) ` Assigns a size and position to the surface passed in `https://developer.android.com/reference/android/media/tv/TvInputService.Session#onSetSurface(android.view.Surface)`. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyAdBufferConsumed(android.media.tv.AdBuffer)(https://developer.android.com/reference/android/media/tv/AdBuffer buffer) ` Notifies the advertisement buffer is consumed. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyAdResponse(android.media.tv.AdResponse)(https://developer.android.com/reference/android/media/tv/AdResponse response) ` Notifies response for advertisement. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyAitInfoUpdated(android.media.tv.AitInfo)(https://developer.android.com/reference/android/media/tv/AitInfo aitInfo) ` Informs the app that the AIT (Application Information Table) is updated. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyAudioPresentationChanged(java.util.List<android.media.AudioPresentation>)(https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/media/AudioPresentation> audioPresentations) ` Sends an updated list of all audio presentations available from a Next Generation Audio service. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyAudioPresentationSelected(int,%20int)(int presentationId, int programId) ` Sends the presentation and program IDs of the selected audio presentation. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyAvailableSpeeds(float[])(float[] speeds) ` Informs the app available speeds for time-shifting. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyBroadcastInfoResponse(android.media.tv.BroadcastInfoResponse)(https://developer.android.com/reference/android/media/tv/BroadcastInfoResponse response) ` Notifies response for broadcast info. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyChannelRetuned(android.net.Uri)(https://developer.android.com/reference/android/net/Uri channelUri) ` Informs the application that the current channel is re-tuned for some reason and the session now displays the content from a new channel. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyContentAllowed()() ` Informs the application that the user is allowed to watch the current program content. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyContentBlocked(android.media.tv.TvContentRating)(https://developer.android.com/reference/android/media/tv/TvContentRating rating) ` Informs the application that the current program content is blocked by parent controls. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyCueingMessageAvailability(boolean)(boolean available) ` Informs the application that cueing message is available or unavailable. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifySignalStrength(int)(int strength) ` Notifies signal strength. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyTimeShiftMode(int)(int mode) ` Informs the app that the time shift mode is set or updated. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyTimeShiftStatusChanged(int)(int status) ` Informs the application that the time shift status is changed. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyTrackSelected(int,%20java.lang.String)(int type, https://developer.android.com/reference/java/lang/String trackId) ` Sends the type and ID of a selected track. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyTracksChanged(java.util.List<android.media.tv.TvTrackInfo>)(https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/media/tv/TvTrackInfo> tracks) ` Sends the list of all audio/video/subtitle tracks. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyTuned(android.net.Uri)(https://developer.android.com/reference/android/net/Uri channelUri) ` Informs the application that this session has been tuned to the given channel. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyTvMessage(int,%20android.os.Bundle)(int type, https://developer.android.com/reference/android/os/Bundle data) ` Sends the raw data from the received TV message as well as the type of message received. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoAvailable()() ` Informs the application that the video is now available for watching. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoFreezeUpdated(boolean)(boolean isFrozen) ` Informs the application that the video freeze state has been updated. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)(int reason) ` Informs the application that the video became unavailable for some reason. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onAdBufferReady(android.media.tv.AdBuffer)(https://developer.android.com/reference/android/media/tv/AdBuffer buffer) ` Called when an advertisement buffer is ready for playback. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onAppPrivateCommand(java.lang.String,%20android.os.Bundle)(https://developer.android.com/reference/java/lang/String action, https://developer.android.com/reference/android/os/Bundle data) ` Processes a private command sent from the application to the TV input. | | ` https://developer.android.com/reference/android/view/View` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onCreateOverlayView()() ` Called when the application requests to create an overlay view. | | ` boolean` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onGenericMotionEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event) ` Implement this method to handle generic motion events on the current input session. | | ` boolean` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onKeyDown(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event) ` Default implementation of `https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyDown(int,%20android.view.KeyEvent)`: always returns false (doesn't handle the event). | | ` boolean` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onKeyLongPress(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event) ` Default implementation of `https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyLongPress(int,%20android.view.KeyEvent)`: always returns false (doesn't handle the event). | | ` boolean` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onKeyMultiple(int,%20int,%20android.view.KeyEvent)(int keyCode, int count, https://developer.android.com/reference/android/view/KeyEvent event) ` Default implementation of `https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyMultiple(int,%20int,%20android.view.KeyEvent)`: always returns false (doesn't handle the event). | | ` boolean` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onKeyUp(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event) ` Default implementation of `https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyUp(int,%20android.view.KeyEvent)`: always returns false (doesn't handle the event). | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onOverlayViewSizeChanged(int,%20int)(int width, int height) ` Called when the size of the overlay view is changed by the application. | | ` abstract void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onRelease()() ` Called when the session is released. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onRemoveBroadcastInfo(int)(int requestId) ` Called when broadcast info is removed. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onRequestAd(android.media.tv.AdRequest)(https://developer.android.com/reference/android/media/tv/AdRequest request) ` Called when advertisement request is received. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onRequestBroadcastInfo(android.media.tv.BroadcastInfoRequest)(https://developer.android.com/reference/android/media/tv/BroadcastInfoRequest request) ` Called when broadcast info is requested. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onResumePlayback()() ` Resumes playback of the Audio, Video, and CC streams. | | ` boolean` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onSelectAudioPresentation(int,%20int)(int presentationId, int programId) ` Selects an audio presentation. | | ` boolean` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onSelectTrack(int,%20java.lang.String)(int type, https://developer.android.com/reference/java/lang/String trackId) ` Selects a given track. | | ` abstract void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onSetCaptionEnabled(boolean)(boolean enabled) ` Enables or disables the caption. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onSetInteractiveAppNotificationEnabled(boolean)(boolean enabled) ` Enables or disables interactive app notification. | | ` abstract void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onSetStreamVolume(float)(float volume) ` Sets the relative stream volume of the current TV input session. | | ` abstract boolean` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onSetSurface(android.view.Surface)(https://developer.android.com/reference/android/view/Surface surface) ` Called when the application sets the surface. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onSetTvMessageEnabled(int,%20boolean)(int type, boolean enabled) ` Called when the application enables or disables the detection of the specified message type. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onStopPlayback(int)(int mode) ` Called when the application requests playback of the Audio, Video, and CC streams to be stopped, but the metadata should continue to be filtered. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onSurfaceChanged(int,%20int,%20int)(int format, int width, int height) ` Called after any structural changes (format or size) have been made to the surface passed in `https://developer.android.com/reference/android/media/tv/TvInputService.Session#onSetSurface(android.view.Surface)`. | | ` long` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onTimeShiftGetCurrentPosition()() ` Returns the current position for time shifting, in milliseconds since the epoch. | | ` long` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onTimeShiftGetStartPosition()() ` Returns the start position for time shifting, in milliseconds since the epoch. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onTimeShiftPause()() ` Called when the application requests to pause playback. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onTimeShiftPlay(android.net.Uri)(https://developer.android.com/reference/android/net/Uri recordedProgramUri) ` Called when the application requests to play a given recorded TV program. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onTimeShiftResume()() ` Called when the application requests to resume playback. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onTimeShiftSeekTo(long)(long timeMs) ` Called when the application requests to seek to a specified time position. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onTimeShiftSetMode(int)(int mode) ` Called when the application sets time shift mode. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onTimeShiftSetPlaybackParams(android.media.PlaybackParams)(https://developer.android.com/reference/android/media/PlaybackParams params) ` Called when the application sets playback parameters containing the speed and audio mode. | | ` boolean` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onTouchEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event) ` Implement this method to handle touch screen motion events on the current input session. | | ` boolean` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onTrackballEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event) ` Implement this method to handle trackball events on the current input session. | | ` boolean` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onTune(android.net.Uri,%20android.os.Bundle)(https://developer.android.com/reference/android/net/Uri channelUri, https://developer.android.com/reference/android/os/Bundle params) ` Tunes to a given channel. | | ` abstract boolean` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onTune(android.net.Uri)(https://developer.android.com/reference/android/net/Uri channelUri) ` Tunes to a given channel. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onTvAdSessionData(java.lang.String,%20android.os.Bundle)(https://developer.android.com/reference/java/lang/String type, https://developer.android.com/reference/android/os/Bundle data) ` Called when data from the linked `https://developer.android.com/reference/android/media/tv/ad/TvAdService` is received. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onTvMessage(int,%20android.os.Bundle)(int type, https://developer.android.com/reference/android/os/Bundle data) ` Called when a TV message is received | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#onUnblockContent(android.media.tv.TvContentRating)(https://developer.android.com/reference/android/media/tv/TvContentRating unblockedRating) ` Requests to unblock the content according to the given rating. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#sendTvInputSessionData(java.lang.String,%20android.os.Bundle)(https://developer.android.com/reference/java/lang/String type, https://developer.android.com/reference/android/os/Bundle data) ` Sends data related to this session to corresponding linked `https://developer.android.com/reference/android/media/tv/ad/TvAdService` object via TvAdView. | | ` void` | ` https://developer.android.com/reference/android/media/tv/TvInputService.Session#setOverlayViewEnabled(boolean)(boolean enable) ` Enables or disables the overlay view. | ||
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||
| From interface ` https://developer.android.com/reference/android/view/KeyEvent.Callback ` |---|---| | ` abstract boolean` | ` https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyDown(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event) ` Called when a key down event has occurred. | | ` abstract boolean` | ` https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyLongPress(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event) ` Called when a long press has occurred. | | ` abstract boolean` | ` https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyMultiple(int,%20int,%20android.view.KeyEvent)(int keyCode, int count, https://developer.android.com/reference/android/view/KeyEvent event) ` Called when a user's interaction with an analog control, such as flinging a trackball, generates simulated down/up events for the same key multiple times in quick succession. | | ` abstract boolean` | ` https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyUp(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event) ` Called when a key up event has occurred. | ||

## Public constructors

### HardwareSession

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public HardwareSession (Context context)
```

Creates a new HardwareSession.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: The context of the application <br /> |

## Public methods

### getHardwareInputId

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract String getHardwareInputId ()
```

Returns the hardware TV input ID the external device is connected to.

TV input is expected to provide `https://developer.android.com/reference/android/R.attr#setupActivity` so that
the application can launch it before using this TV input. The setup activity may let
the user select the hardware TV input to which the external device is connected. The ID
of the selected one should be stored in the TV input so that it can be returned here.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### onHardwareVideoAvailable

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onHardwareVideoAvailable ()
```

Called when the underlying hardware TV input session calls
`https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoAvailable()`.

<br />

### onHardwareVideoUnavailable

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onHardwareVideoUnavailable (int reason)
```

Called when the underlying hardware TV input session calls
`https://developer.android.com/reference/android/media/tv/TvInputService.Session#notifyVideoUnavailable(int)`.

<br />

| Parameters ||
|---|---|
| `reason` | `int`: The reason that the hardware TV input stopped the playback: - `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_UNKNOWN` - `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_TUNING` - `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_WEAK_SIGNAL` - `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_BUFFERING` - `https://developer.android.com/reference/android/media/tv/TvInputManager#VIDEO_UNAVAILABLE_REASON_AUDIO_ONLY` <br /> |

### onSetSurface

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean onSetSurface (Surface surface)
```

This method will not be called in `https://developer.android.com/reference/android/media/tv/TvInputService.HardwareSession`. Framework will
forward the application's surface to the hardware TV input.

<br />

| Parameters ||
|---|---|
| `surface` | `Surface`: The surface to be used for video rendering. Can be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if the surface was set successfully, `false` otherwise. <br /> |