import android.annotation.IntDef;
import android.annotation.SystemApi;
+import android.hardware.tv.input.V1_0.Constants;
import android.media.AudioManager;
import android.os.Parcel;
import android.os.Parcelable;
static final String TAG = "TvInputHardwareInfo";
// Match hardware/libhardware/include/hardware/tv_input.h
- public static final int TV_INPUT_TYPE_OTHER_HARDWARE = 1;
- public static final int TV_INPUT_TYPE_TUNER = 2;
- public static final int TV_INPUT_TYPE_COMPOSITE = 3;
- public static final int TV_INPUT_TYPE_SVIDEO = 4;
- public static final int TV_INPUT_TYPE_SCART = 5;
- public static final int TV_INPUT_TYPE_COMPONENT = 6;
- public static final int TV_INPUT_TYPE_VGA = 7;
- public static final int TV_INPUT_TYPE_DVI = 8;
- public static final int TV_INPUT_TYPE_HDMI = 9;
- public static final int TV_INPUT_TYPE_DISPLAY_PORT = 10;
+ public static final int TV_INPUT_TYPE_OTHER_HARDWARE = Constants.TV_INPUT_TYPE_OTHER;
+ public static final int TV_INPUT_TYPE_TUNER = Constants.TV_INPUT_TYPE_TUNER;
+ public static final int TV_INPUT_TYPE_COMPOSITE = Constants.TV_INPUT_TYPE_COMPOSITE;
+ public static final int TV_INPUT_TYPE_SVIDEO = Constants.TV_INPUT_TYPE_SVIDEO;
+ public static final int TV_INPUT_TYPE_SCART = Constants.TV_INPUT_TYPE_SCART;
+ public static final int TV_INPUT_TYPE_COMPONENT = Constants.TV_INPUT_TYPE_COMPONENT;
+ public static final int TV_INPUT_TYPE_VGA = Constants.TV_INPUT_TYPE_VGA;
+ public static final int TV_INPUT_TYPE_DVI = Constants.TV_INPUT_TYPE_DVI;
+ public static final int TV_INPUT_TYPE_HDMI = Constants.TV_INPUT_TYPE_HDMI;
+ public static final int TV_INPUT_TYPE_DISPLAY_PORT = Constants.TV_INPUT_TYPE_DISPLAY_PORT;
/** @hide */
@Retention(SOURCE)
/**
* The hardware is unsure about the connection status or does not support cable detection.
*/
- public static final int CABLE_CONNECTION_STATUS_UNKNOWN = 0;
+ public static final int CABLE_CONNECTION_STATUS_UNKNOWN =
+ Constants.CABLE_CONNECTION_STATUS_UNKNOWN;
/**
* Cable is connected to the hardware.
*/
- public static final int CABLE_CONNECTION_STATUS_CONNECTED = 1;
+ public static final int CABLE_CONNECTION_STATUS_CONNECTED =
+ Constants.CABLE_CONNECTION_STATUS_CONNECTED;
/**
* Cable is disconnected to the hardware.
*/
- public static final int CABLE_CONNECTION_STATUS_DISCONNECTED = 2;
+ public static final int CABLE_CONNECTION_STATUS_DISCONNECTED =
+ Constants.CABLE_CONNECTION_STATUS_DISCONNECTED;
public static final Parcelable.Creator<TvInputHardwareInfo> CREATOR =
new Parcelable.Creator<TvInputHardwareInfo>() {
package com.android.server.tv;
+import android.hardware.tv.input.V1_0.Constants;
import android.media.tv.TvInputHardwareInfo;
import android.media.tv.TvStreamConfig;
import android.os.Handler;
public final static int ERROR_STALE_CONFIG = -2;
public final static int ERROR_UNKNOWN = -3;
- public static final int EVENT_DEVICE_AVAILABLE = 1;
- public static final int EVENT_DEVICE_UNAVAILABLE = 2;
- public static final int EVENT_STREAM_CONFIGURATION_CHANGED = 3;
+ public static final int EVENT_DEVICE_AVAILABLE = Constants.EVENT_DEVICE_AVAILABLE;
+ public static final int EVENT_DEVICE_UNAVAILABLE = Constants.EVENT_DEVICE_UNAVAILABLE;
+ public static final int EVENT_STREAM_CONFIGURATION_CHANGED =
+ Constants.EVENT_STREAM_CONFIGURATIONS_CHANGED;
public static final int EVENT_FIRST_FRAME_CAPTURED = 4;
public interface Callback {