/**@class android.media.tv.TvInputManager
@extends java.lang.Object

 Central system API to the overall TV input framework (TIF) architecture, which arbitrates
 interaction between applications and the selected TV inputs.

 <p>There are three primary parties involved in the TV input framework (TIF) architecture:

 <ul>
 <li>The <strong>TV input manager</strong> as expressed by this class is the central point of the
 system that manages interaction between all other parts. It is expressed as the client-side API
 here which exists in each application context and communicates with a global system service that
 manages the interaction across all processes.
 <li>A <strong>TV input</strong> implemented by {@link android.media.tv.TvInputService} represents an input source
 of TV, which can be a pass-through input such as HDMI, or a tuner input which provides broadcast
 TV programs. The system binds to the TV input per application’s request.
 on implementing TV inputs.
 <li><strong>Applications</strong> talk to the TV input manager to list TV inputs and check their
 status. Once an application find the input to use, it uses {@link android.media.tv.TvView} or
 {@link android.media.tv.TvRecordingClient} for further interaction such as watching and recording broadcast TV
 programs.
 </ul>
*/
var TvInputManager = {

/** A demux device of DVB API for controlling the filters of DVB hardware/software.
 @hide
*/
DVB_DEVICE_DEMUX : "0",
/** A DVR device of DVB API for reading transport streams.
 @hide
*/
DVB_DEVICE_DVR : "1",
/** A frontend device of DVB API for controlling the tuner and DVB demodulator hardware.
 @hide
*/
DVB_DEVICE_FRONTEND : "2",
/** Reason for {@link android.media.tv.TvInputService.Session#notifyVideoUnavailable(int)} and
 {@link android.media.tv.TvView.TvInputCallback#onVideoUnavailable(String, int)}: Video is unavailable due to
 an unspecified error.
*/
VIDEO_UNAVAILABLE_REASON_UNKNOWN : "0",
/** Reason for {@link android.media.tv.TvInputService.Session#notifyVideoUnavailable(int)} and
 {@link android.media.tv.TvView.TvInputCallback#onVideoUnavailable(String, int)}: Video is unavailable because
 the corresponding TV input is in the middle of tuning to a new channel.
*/
VIDEO_UNAVAILABLE_REASON_TUNING : "1",
/** Reason for {@link android.media.tv.TvInputService.Session#notifyVideoUnavailable(int)} and
 {@link android.media.tv.TvView.TvInputCallback#onVideoUnavailable(String, int)}: Video is unavailable due to
 weak TV signal.
*/
VIDEO_UNAVAILABLE_REASON_WEAK_SIGNAL : "2",
/** Reason for {@link android.media.tv.TvInputService.Session#notifyVideoUnavailable(int)} and
 {@link android.media.tv.TvView.TvInputCallback#onVideoUnavailable(String, int)}: Video is unavailable because
 the corresponding TV input has stopped playback temporarily to buffer more data.
*/
VIDEO_UNAVAILABLE_REASON_BUFFERING : "3",
/** Reason for {@link android.media.tv.TvInputService.Session#notifyVideoUnavailable(int)} and
 {@link android.media.tv.TvView.TvInputCallback#onVideoUnavailable(String, int)}: Video is unavailable because
 the current TV program is audio-only.
*/
VIDEO_UNAVAILABLE_REASON_AUDIO_ONLY : "4",
/** Reason for {@link android.media.tv.TvInputService.Session#notifyVideoUnavailable(int)} and
 {@link android.media.tv.TvView.TvInputCallback#onVideoUnavailable(String, int)}: Video is unavailable because
 the source is not physically connected, for example the HDMI cable is not connected.
 @hide
*/
VIDEO_UNAVAILABLE_REASON_NOT_CONNECTED : "5",
/** Status for {@link android.media.tv.TvInputService.Session#notifyTimeShiftStatusChanged(int)} and
 {@link android.media.tv.TvView.TvInputCallback#onTimeShiftStatusChanged(String, int)}: Unknown status. Also
 the status prior to calling {@code notifyTimeShiftStatusChanged}.
*/
TIME_SHIFT_STATUS_UNKNOWN : "0",
/** Status for {@link android.media.tv.TvInputService.Session#notifyTimeShiftStatusChanged(int)} and
 {@link android.media.tv.TvView.TvInputCallback#onTimeShiftStatusChanged(String, int)}: The current TV input
 does not support time shifting.
*/
TIME_SHIFT_STATUS_UNSUPPORTED : "1",
/** Status for {@link android.media.tv.TvInputService.Session#notifyTimeShiftStatusChanged(int)} and
 {@link android.media.tv.TvView.TvInputCallback#onTimeShiftStatusChanged(String, int)}: Time shifting is
 currently unavailable but might work again later.
*/
TIME_SHIFT_STATUS_UNAVAILABLE : "2",
/** Status for {@link android.media.tv.TvInputService.Session#notifyTimeShiftStatusChanged(int)} and
 {@link android.media.tv.TvView.TvInputCallback#onTimeShiftStatusChanged(String, int)}: Time shifting is
 currently available. In this status, the application assumes it can pause/resume playback,
 seek to a specified time position and set playback rate and audio mode.
*/
TIME_SHIFT_STATUS_AVAILABLE : "3",
/** Value returned by {@link android.media.tv.TvInputService.Session#onTimeShiftGetCurrentPosition()} and
 {@link android.media.tv.TvInputService.Session#onTimeShiftGetStartPosition()} when time shifting has not
 yet started.
*/
TIME_SHIFT_INVALID_TIME : "-9223372036854775808",
/** Error for {@link android.media.tv.TvInputService.RecordingSession#notifyError(int)} and
 {@link android.media.tv.TvRecordingClient.RecordingCallback#onError(int)}: The requested operation cannot be
 completed due to a problem that does not fit under any other error codes, or the error code
 for the problem is defined on the higher version than application's
 <code>android:targetSdkVersion</code>.
*/
RECORDING_ERROR_UNKNOWN : "0",
/** Error for {@link android.media.tv.TvInputService.RecordingSession#notifyError(int)} and
 {@link android.media.tv.TvRecordingClient.RecordingCallback#onError(int)}: Recording cannot proceed due to
 insufficient storage space.
*/
RECORDING_ERROR_INSUFFICIENT_SPACE : "1",
/** Error for {@link android.media.tv.TvInputService.RecordingSession#notifyError(int)} and
 {@link android.media.tv.TvRecordingClient.RecordingCallback#onError(int)}: Recording cannot proceed because
 a required recording resource was not able to be allocated.
*/
RECORDING_ERROR_RESOURCE_BUSY : "2",
/** State for {@link #getInputState}(String) and
 {@link android.media.tv.TvInputManager.TvInputCallback#onInputStateChanged(String, int)}: The input source is connected.

 <p>This state indicates that a source device is connected to the input port and is in the
 normal operation mode. It is mostly relevant to hardware inputs such as HDMI input.
 Non-hardware inputs are considered connected all the time.
*/
INPUT_STATE_CONNECTED : "0",
/** State for {@link #getInputState}(String) and
 {@link android.media.tv.TvInputManager.TvInputCallback#onInputStateChanged(String, int)}: The input source is connected but
 in standby mode.

 <p>This state indicates that a source device is connected to the input port but is in standby
 or low power mode. It is mostly relevant to hardware inputs such as HDMI input and Component
 inputs.
*/
INPUT_STATE_CONNECTED_STANDBY : "1",
/** State for {@link #getInputState}(String) and
 {@link android.media.tv.TvInputManager.TvInputCallback#onInputStateChanged(String, int)}: The input source is disconnected.

 <p>This state indicates that a source device is disconnected from the input port. It is
 mostly relevant to hardware inputs such as HDMI input.

*/
INPUT_STATE_DISCONNECTED : "2",
/** Broadcast intent action when the user blocked content ratings change. For use with the
 {@link #isRatingBlocked}.
*/
ACTION_BLOCKED_RATINGS_CHANGED : "android.media.tv.action.BLOCKED_RATINGS_CHANGED",
/** Broadcast intent action when the parental controls enabled state changes. For use with the
 {@link #isParentalControlsEnabled}.
*/
ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED : "android.media.tv.action.PARENTAL_CONTROLS_ENABLED_CHANGED",
/** Broadcast intent action used to query available content rating systems.

 <p>The TV input manager service locates available content rating systems by querying
 broadcast receivers that are registered for this action. An application can offer additional
 content rating systems to the user by declaring a suitable broadcast receiver in its
 manifest.

 <p>Here is an example broadcast receiver declaration that an application might include in its
 AndroidManifest.xml to advertise custom content rating systems. The meta-data specifies a
 resource that contains a description of each content rating system that is provided by the
 application.

 <p><pre class="prettyprint">
 {@literal
 <receiver android:name=".TvInputReceiver">
     <intent-filter>
         <action android:name=
                 "android.media.tv.action.QUERY_CONTENT_RATING_SYSTEMS" />
     </intent-filter>
     <meta-data
             android:name="android.media.tv.metadata.CONTENT_RATING_SYSTEMS"
             android:resource="@xml/tv_content_rating_systems" />
 </receiver>}</pre>

 <p>In the above example, the <code>@xml/tv_content_rating_systems</code> resource refers to an
 XML resource whose root element is <code>&lt;rating-system-definitions&gt;</code> that
 contains zero or more <code>&lt;rating-system-definition&gt;</code> elements. Each <code>
 &lt;rating-system-definition&gt;</code> element specifies the ratings, sub-ratings and rating
 orders of a particular content rating system.

 @see TvContentRating
*/
ACTION_QUERY_CONTENT_RATING_SYSTEMS : "android.media.tv.action.QUERY_CONTENT_RATING_SYSTEMS",
/** Content rating systems metadata associated with {@link #ACTION_QUERY_CONTENT_RATING_SYSTEMS}.

 <p>Specifies the resource ID of an XML resource that describes the content rating systems
 that are provided by the application.
*/
META_DATA_CONTENT_RATING_SYSTEMS : "android.media.tv.metadata.CONTENT_RATING_SYSTEMS",
/** Activity action to set up channel sources i.e.&nbsp;TV inputs of type
 {@link android.media.tv.TvInputInfo#TYPE_TUNER}. When invoked, the system will display an appropriate UI for
 the user to initiate the individual setup flow provided by
 {@link android.R.attr#setupActivity} of each TV input service.
*/
ACTION_SETUP_INPUTS : "android.media.tv.action.SETUP_INPUTS",
/** Activity action to display the recording schedules. When invoked, the system will display an
 appropriate UI to browse the schedules.
*/
ACTION_VIEW_RECORDING_SCHEDULES : "android.media.tv.action.VIEW_RECORDING_SCHEDULES",
/**Returns the complete list of TV inputs on the system.
@return {Object {java.util.List}} List of {@link TvInputInfo} for each TV input that describes its meta information.
*/
getTvInputList : function(  ) {},

/**Returns the {@link android.media.tv.TvInputInfo} for a given TV input.
@param {String} inputId The ID of the TV input.
@return {Object {android.media.tv.TvInputInfo}} the {@link TvInputInfo} for a given TV input. {@code null} if not found.
*/
getTvInputInfo : function(  ) {},

/**Updates the <code>TvInputInfo</code> for an existing TV input. A TV input service
 implementation may call this method to pass the application and system an up-to-date
 <code>TvInputInfo</code> object that describes itself.

 <p>The system automatically creates a <code>TvInputInfo</code> object for each TV input,
 based on the information collected from the <code>AndroidManifest.xml</code>, thus it is not
 necessary to call this method unless such information has changed dynamically.
 Use {@link android.media.tv.TvInputInfo.Builder} to build a new <code>TvInputInfo</code> object.

 <p>Attempting to change information about a TV input that the calling package does not own
 does nothing.
@param {Object {TvInputInfo}} inputInfo The <code>TvInputInfo</code> object that contains new information.
@throws IllegalArgumentException if the argument is {@code null}.
@see TvInputCallback#onTvInputInfoUpdated(TvInputInfo)
*/
updateTvInputInfo : function(  ) {},

/**Returns the state of a given TV input.

 <p>The state is one of the following:
 <ul>
 <li>{@link #INPUT_STATE_CONNECTED}
 <li>{@link #INPUT_STATE_CONNECTED_STANDBY}
 <li>{@link #INPUT_STATE_DISCONNECTED}
 </ul>
@param {String} inputId The ID of the TV input.
@throws IllegalArgumentException if the argument is {@code null}.
*/
getInputState : function(  ) {},

/**Registers a {@link android.media.tv.TvInputManager.TvInputCallback}.
@param {Object {TvInputManager.TvInputCallback}} callback A callback used to monitor status of the TV inputs.
@param {Object {Handler}} handler A {@link Handler} that the status change will be delivered to.
*/
registerCallback : function(  ) {},

/**Unregisters the existing {@link android.media.tv.TvInputManager.TvInputCallback}.
@param {Object {TvInputManager.TvInputCallback}} callback The existing callback to remove.
*/
unregisterCallback : function(  ) {},

/**Returns the user's parental controls enabled state.
@return {Boolean} {@code true} if the user enabled the parental controls, {@code false} otherwise.
*/
isParentalControlsEnabled : function(  ) {},

/**Sets the user's parental controls enabled state.
@param {Boolean} enabled The user's parental controls enabled state. {@code true} if the user enabled
            the parental controls, {@code false} otherwise.
@see #isParentalControlsEnabled
@hide 
*/
setParentalControlsEnabled : function(  ) {},

/**Checks whether a given TV content rating is blocked by the user.
@param {Object {TvContentRating}} rating The TV content rating to check. Can be {@link TvContentRating#UNRATED}.
@return {Boolean} {@code true} if the given TV content rating is blocked, {@code false} otherwise.
*/
isRatingBlocked : function(  ) {},

/**Returns the list of blocked content ratings.
@return {Object {java.util.List}} the list of content ratings blocked by the user.
*/
getBlockedRatings : function(  ) {},

/**Adds a user blocked content rating.
@param {Object {TvContentRating}} rating The content rating to block.
@see #isRatingBlocked
@see #removeBlockedRating
@hide 
*/
addBlockedRating : function(  ) {},

/**Removes a user blocked content rating.
@param {Object {TvContentRating}} rating The content rating to unblock.
@see #isRatingBlocked
@see #addBlockedRating
@hide 
*/
removeBlockedRating : function(  ) {},

/**Returns the list of all TV content rating systems defined.
@hide 
*/
getTvContentRatingSystemList : function(  ) {},

/**Notifies the TV input of the given preview program that the program's browsable state is
 disabled.
@hide 
*/
notifyPreviewProgramBrowsableDisabled : function(  ) {},

/**Notifies the TV input of the given watch next program that the program's browsable state is
 disabled.
@hide 
*/
notifyWatchNextProgramBrowsableDisabled : function(  ) {},

/**Notifies the TV input of the given preview program that the program is added to watch next.
@hide 
*/
notifyPreviewProgramAddedToWatchNext : function(  ) {},

/**Creates a {@link android.media.tv.TvInputManager.Session} for a given TV input.

 <p>The number of sessions that can be created at the same time is limited by the capability
 of the given TV input.
@param {String} inputId The ID of the TV input.
@param {Object {TvInputManager.SessionCallback}} callback A callback used to receive the created session.
@param {Object {Handler}} handler A {@link Handler} that the session creation will be delivered to.
@hide 
*/
createSession : function(  ) {},

/**Creates a recording {@link android.media.tv.TvInputManager.Session} for a given TV input.

 <p>The number of sessions that can be created at the same time is limited by the capability
 of the given TV input.
@param {String} inputId The ID of the TV input.
@param {Object {TvInputManager.SessionCallback}} callback A callback used to receive the created session.
@param {Object {Handler}} handler A {@link Handler} that the session creation will be delivered to.
@hide 
*/
createRecordingSession : function(  ) {},

/**Returns the TvStreamConfig list of the given TV input.

 If you are using {@link android.media.tv.TvInputManager.Hardware} object from {@link #acquireTvInputHardware}, you should get the list of available streams
 from {@link android.media.tv.TvInputManager.HardwareCallback#onStreamConfigChanged} method, not from
 here. This method is designed to be used with {@link #captureFrame} in
 capture scenarios specifically and not suitable for any other use.
@param {String} inputId The ID of the TV input.
@return {Object {java.util.List}} List of {@link TvStreamConfig} which is available for capturing
   of the given TV input.
@hide 
*/
getAvailableTvStreamConfigList : function(  ) {},

/**Take a snapshot of the given TV input into the provided Surface.
@param {String} inputId The ID of the TV input.
@param {Object {Surface}} surface the {@link Surface} to which the snapshot is captured.
@param {Object {TvStreamConfig}} config the {@link TvStreamConfig} which is used for capturing.
@return {Boolean} true when the {@link Surface} is ready to be captured.
@hide 
*/
captureFrame : function(  ) {},

/**Returns true if there is only a single TV input session.
@hide 
*/
isSingleSessionActive : function(  ) {},

/**Returns a list of TvInputHardwareInfo objects representing available hardware.
@hide 
*/
getHardwareList : function(  ) {},

/**Acquires {@link android.media.tv.TvInputManager.Hardware} object for the given device ID.

 <p>A subsequent call to this method on the same {@code deviceId} will release the currently
 acquired Hardware.
@param {Number} deviceId The device ID to acquire Hardware for.
@param {Object {TvInputManager.HardwareCallback}} callback A callback to receive updates on Hardware.
@param {Object {TvInputInfo}} info The TV input which will use the acquired Hardware.
@return {Object {android.media.tv.TvInputManager.Hardware}} Hardware on success, {@code null} otherwise.
@hide 
@removed 
*/
acquireTvInputHardware : function(  ) {},

/**Acquires {@link android.media.tv.TvInputManager.Hardware} object for the given device ID.

 <p>A subsequent call to this method on the same {@code deviceId} will release the currently
 acquired Hardware.
@param {Number} deviceId The device ID to acquire Hardware for.
@param {Object {TvInputInfo}} callback A callback to receive updates on Hardware.
@param {Object {TvInputManager.HardwareCallback}} info The TV input which will use the acquired Hardware.
@return {Object {android.media.tv.TvInputManager.Hardware}} Hardware on success, {@code null} otherwise.
@hide 
*/
acquireTvInputHardware : function(  ) {},

/**Releases previously acquired hardware object.
@param {Number} deviceId The device ID this Hardware was acquired for
@param {Object {TvInputManager.Hardware}} hardware Hardware to release.
@hide 
*/
releaseTvInputHardware : function(  ) {},

/**Returns the list of currently available DVB devices on the system.
@return {Object {java.util.List}} the list of {@link DvbDeviceInfo} objects representing available DVB devices.
@hide 
*/
getDvbDeviceList : function(  ) {},

/**Returns a {@link ParcelFileDescriptor} of a specified DVB device for a given
 {@link android.media.tv.DvbDeviceInfo}
@param {Object {DvbDeviceInfo}} info A {@link DvbDeviceInfo} to open a DVB device.
@param {Number} device A DVB device. The DVB device can be {@link #DVB_DEVICE_DEMUX},
            {@link #DVB_DEVICE_DVR} or {@link #DVB_DEVICE_FRONTEND}.
@return {Object {android.os.ParcelFileDescriptor}} a {@link ParcelFileDescriptor} of a specified DVB device for a given
         {@link DvbDeviceInfo}, or {@code null} if the given {@link DvbDeviceInfo} was invalid
         or the specified DVB device was busy with a previous request.
@hide 
*/
openDvbDevice : function(  ) {},

/**Requests to make a channel browsable.

 <p>Once called, the system will review the request and make the channel browsable based on
 its policy. The first request from a package is guaranteed to be approved.
@param {Object {Uri}} channelUri The URI for the channel to be browsable.
@hide 
*/
requestChannelBrowsable : function(  ) {},


};