Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1034df8c authored by Dongwon Kang's avatar Dongwon Kang Committed by Wonsik Kim
Browse files

TIF: Reorder TvInputInfo types from old to new.

This change is internal cleanup change. The purpose of this change is
to reorder the types so that new types can be added at the end of the
type list later.

Change-Id: I377c98dc397ef75c3473ee5133b2ffb49d278a50
parent 71396450
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -16686,14 +16686,14 @@ package android.media.tv {
    method public java.lang.CharSequence loadLabel(android.content.Context);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final java.lang.String EXTRA_INPUT_ID = "inputId";
    field public static final int TYPE_COMPONENT = 8; // 0x8
    field public static final int TYPE_COMPOSITE = 9; // 0x9
    field public static final int TYPE_DISPLAY_PORT = 4; // 0x4
    field public static final int TYPE_DVI = 6; // 0x6
    field public static final int TYPE_HDMI = 3; // 0x3
    field public static final int TYPE_COMPONENT = 6; // 0x6
    field public static final int TYPE_COMPOSITE = 3; // 0x3
    field public static final int TYPE_DISPLAY_PORT = 10; // 0xa
    field public static final int TYPE_DVI = 8; // 0x8
    field public static final int TYPE_HDMI = 9; // 0x9
    field public static final int TYPE_OTHER_HARDWARE = 1; // 0x1
    field public static final int TYPE_SCART = 5; // 0x5
    field public static final int TYPE_SVIDEO = 10; // 0xa
    field public static final int TYPE_SVIDEO = 4; // 0x4
    field public static final int TYPE_TUNER = 2; // 0x2
    field public static final int TYPE_VGA = 7; // 0x7
    field public static final int TYPE_VIRTUAL = 0; // 0x0
+24 −3
Original line number Diff line number Diff line
@@ -33,9 +33,16 @@ public final class TvInputHardwareInfo implements Parcelable {
    static final String TAG = "TvInputHardwareInfo";

    // Match hardware/libhardware/include/hardware/tv_input.h
    public static final int TV_INPUT_TYPE_HDMI           = 1;
    public static final int TV_INPUT_TYPE_BUILT_IN_TUNER = 2;
    public static final int TV_INPUT_TYPE_PASSTHROUGH    = 3;
    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 Parcelable.Creator<TvInputHardwareInfo> CREATOR =
            new Parcelable.Creator<TvInputHardwareInfo>() {
@@ -89,6 +96,20 @@ public final class TvInputHardwareInfo implements Parcelable {
        return mHdmiPortId;
    }

    @Override
    public String toString() {
        StringBuilder b = new StringBuilder(128);
        b.append("TvInputHardwareInfo {id=").append(mDeviceId);
        b.append(", type=").append(mType);
        b.append(", audio_type=").append(mAudioType);
        b.append(", audio_addr=").append(mAudioAddress);
        if (mType == TV_INPUT_TYPE_HDMI) {
            b.append(", hdmi_port=").append(mHdmiPortId);
        }
        b.append("}");
        return b.toString();
    }

    // Parcelable
    @Override
    public int describeContents() {
+17 −18
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.graphics.drawable.Drawable;
import android.hardware.hdmi.HdmiCecDeviceInfo;
import android.media.tv.TvInputHardwareInfo;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
@@ -54,48 +53,48 @@ public final class TvInputInfo implements Parcelable {
     */
    public static final int TYPE_VIRTUAL = 0;

    // Should be in sync with hardware/libhardware/include/hardware/tv_input.h
    // Should be in sync with TvInputHardwareInfo.

    /**
     * TV input type: a generic hardware TV input type.
     */
    public static final int TYPE_OTHER_HARDWARE = 1;
    public static final int TYPE_OTHER_HARDWARE = TvInputHardwareInfo.TV_INPUT_TYPE_OTHER_HARDWARE;
    /**
     * TV input type: the TV input service is a tuner. (e.g. terrestrial tuner)
     */
    public static final int TYPE_TUNER = 2;
    public static final int TYPE_TUNER = TvInputHardwareInfo.TV_INPUT_TYPE_TUNER;
    /**
     * TV input type: the TV input service is HDMI. (e.g. HDMI 1)
     * TV input type: the TV input service represents a composite port.
     */
    public static final int TYPE_HDMI = 3;
    public static final int TYPE_COMPOSITE = TvInputHardwareInfo.TV_INPUT_TYPE_COMPOSITE;
    /**
     * TV input type: the TV input service represents a display port.
     * TV input type: the TV input service represents a SVIDEO port.
     */
    public static final int TYPE_DISPLAY_PORT = 4;
    public static final int TYPE_SVIDEO = TvInputHardwareInfo.TV_INPUT_TYPE_SVIDEO;
    /**
     * TV input type: the TV input service represents a SCART port.
     */
    public static final int TYPE_SCART = 5;
    public static final int TYPE_SCART = TvInputHardwareInfo.TV_INPUT_TYPE_SCART;
    /**
     * TV input type: the TV input service represents a DVI port.
     * TV input type: the TV input service represents a component port.
     */
    public static final int TYPE_DVI = 6;
    public static final int TYPE_COMPONENT = TvInputHardwareInfo.TV_INPUT_TYPE_COMPONENT;
    /**
     * TV input type: the TV input service represents a VGA port.
     */
    public static final int TYPE_VGA = 7;
    public static final int TYPE_VGA = TvInputHardwareInfo.TV_INPUT_TYPE_VGA;
    /**
     * TV input type: the TV input service represents a component port.
     * TV input type: the TV input service represents a DVI port.
     */
    public static final int TYPE_COMPONENT = 8;
    public static final int TYPE_DVI = TvInputHardwareInfo.TV_INPUT_TYPE_DVI;
    /**
     * TV input type: the TV input service represents a composite port.
     * TV input type: the TV input service is HDMI. (e.g. HDMI 1)
     */
    public static final int TYPE_COMPOSITE = 9;
    public static final int TYPE_HDMI = TvInputHardwareInfo.TV_INPUT_TYPE_HDMI;
    /**
     * TV input type: the TV input service represents a SVIDEO port.
     * TV input type: the TV input service represents a display port.
     */
    public static final int TYPE_SVIDEO = 10;
    public static final int TYPE_DISPLAY_PORT = TvInputHardwareInfo.TV_INPUT_TYPE_DISPLAY_PORT;

    /**
     * The ID of the TV input to provide to the setup activity and settings activity.