diff options
25 files changed, 741 insertions, 101 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index ace192f36f7d..df8723a12ebb 100755 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -5143,6 +5143,11 @@ package android.media.tv.tuner.filter { package android.media.tv.tuner.frontend { + public class AnalogFrontendCapabilities extends android.media.tv.tuner.frontend.FrontendCapabilities { + method public int getSifStandardCapability(); + method public int getSignalTypeCapability(); + } + public class AnalogFrontendSettings extends android.media.tv.tuner.frontend.FrontendSettings { method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public static android.media.tv.tuner.frontend.AnalogFrontendSettings.Builder builder(@NonNull android.content.Context); method public int getSifStandard(); @@ -5180,8 +5185,74 @@ package android.media.tv.tuner.frontend { public static class AnalogFrontendSettings.Builder extends android.media.tv.tuner.frontend.FrontendSettings.Builder<android.media.tv.tuner.frontend.AnalogFrontendSettings.Builder> { method @NonNull public android.media.tv.tuner.frontend.AnalogFrontendSettings build(); - method @NonNull public android.media.tv.tuner.frontend.AnalogFrontendSettings.Builder setASignalType(int); method @NonNull public android.media.tv.tuner.frontend.AnalogFrontendSettings.Builder setSifStandard(int); + method @NonNull public android.media.tv.tuner.frontend.AnalogFrontendSettings.Builder setSignalType(int); + } + + public class Atsc3FrontendCapabilities extends android.media.tv.tuner.frontend.FrontendCapabilities { + method public int getBandwidthCapability(); + method public int getDemodOutputFormatCapability(); + method public int getFecCapability(); + method public int getModulationCapability(); + method public int getPlpCodeRateCapability(); + method public int getTimeInterleaveModeCapability(); + } + + public class Atsc3FrontendSettings extends android.media.tv.tuner.frontend.FrontendSettings { + method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public static android.media.tv.tuner.frontend.Atsc3FrontendSettings.Builder builder(@NonNull android.content.Context); + method public int getBandwidth(); + method public int getDemodOutputFormat(); + method @NonNull public android.media.tv.tuner.frontend.Atsc3PlpSettings[] getPlpSettings(); + method public int getType(); + field public static final int BANDWIDTH_AUTO = 1; // 0x1 + field public static final int BANDWIDTH_BANDWIDTH_6MHZ = 2; // 0x2 + field public static final int BANDWIDTH_BANDWIDTH_7MHZ = 4; // 0x4 + field public static final int BANDWIDTH_BANDWIDTH_8MHZ = 8; // 0x8 + field public static final int BANDWIDTH_UNDEFINED = 0; // 0x0 + field public static final int CODERATE_10_15 = 512; // 0x200 + field public static final int CODERATE_11_15 = 1024; // 0x400 + field public static final int CODERATE_12_15 = 2048; // 0x800 + field public static final int CODERATE_13_15 = 4096; // 0x1000 + field public static final int CODERATE_2_15 = 2; // 0x2 + field public static final int CODERATE_3_15 = 4; // 0x4 + field public static final int CODERATE_4_15 = 8; // 0x8 + field public static final int CODERATE_5_15 = 16; // 0x10 + field public static final int CODERATE_6_15 = 32; // 0x20 + field public static final int CODERATE_7_15 = 64; // 0x40 + field public static final int CODERATE_8_15 = 128; // 0x80 + field public static final int CODERATE_9_15 = 256; // 0x100 + field public static final int CODERATE_AUTO = 1; // 0x1 + field public static final int CODERATE_UNDEFINED = 0; // 0x0 + field public static final int DEMOD_OUTPUT_FORMAT_ATSC3_LINKLAYER_PACKET = 1; // 0x1 + field public static final int DEMOD_OUTPUT_FORMAT_BASEBAND_PACKET = 2; // 0x2 + field public static final int DEMOD_OUTPUT_FORMAT_UNDEFINED = 0; // 0x0 + field public static final int FEC_AUTO = 1; // 0x1 + field public static final int FEC_BCH_LDPC_16K = 2; // 0x2 + field public static final int FEC_BCH_LDPC_64K = 4; // 0x4 + field public static final int FEC_CRC_LDPC_16K = 8; // 0x8 + field public static final int FEC_CRC_LDPC_64K = 16; // 0x10 + field public static final int FEC_LDPC_16K = 32; // 0x20 + field public static final int FEC_LDPC_64K = 64; // 0x40 + field public static final int FEC_UNDEFINED = 0; // 0x0 + field public static final int MODULATION_AUTO = 1; // 0x1 + field public static final int MODULATION_MOD_1024QAM = 32; // 0x20 + field public static final int MODULATION_MOD_16QAM = 4; // 0x4 + field public static final int MODULATION_MOD_256QAM = 16; // 0x10 + field public static final int MODULATION_MOD_4096QAM = 64; // 0x40 + field public static final int MODULATION_MOD_64QAM = 8; // 0x8 + field public static final int MODULATION_MOD_QPSK = 2; // 0x2 + field public static final int MODULATION_UNDEFINED = 0; // 0x0 + field public static final int TIME_INTERLEAVE_MODE_AUTO = 1; // 0x1 + field public static final int TIME_INTERLEAVE_MODE_CTI = 2; // 0x2 + field public static final int TIME_INTERLEAVE_MODE_HTI = 4; // 0x4 + field public static final int TIME_INTERLEAVE_MODE_UNDEFINED = 0; // 0x0 + } + + public static class Atsc3FrontendSettings.Builder extends android.media.tv.tuner.frontend.FrontendSettings.Builder<android.media.tv.tuner.frontend.Atsc3FrontendSettings.Builder> { + method @NonNull public android.media.tv.tuner.frontend.Atsc3FrontendSettings build(); + method @NonNull public android.media.tv.tuner.frontend.Atsc3FrontendSettings.Builder setBandwidth(int); + method @NonNull public android.media.tv.tuner.frontend.Atsc3FrontendSettings.Builder setDemodOutputFormat(byte); + method @NonNull public android.media.tv.tuner.frontend.Atsc3FrontendSettings.Builder setPlpSettings(@NonNull android.media.tv.tuner.frontend.Atsc3PlpSettings[]); } public class Atsc3PlpInfo { @@ -5189,6 +5260,286 @@ package android.media.tv.tuner.frontend { method public int getPlpId(); } + public class Atsc3PlpSettings { + method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public static android.media.tv.tuner.frontend.Atsc3PlpSettings.Builder builder(@NonNull android.content.Context); + method public int getCodeRate(); + method public int getFec(); + method public int getInterleaveMode(); + method public int getModulation(); + method public int getPlpId(); + } + + public static class Atsc3PlpSettings.Builder { + method @NonNull public android.media.tv.tuner.frontend.Atsc3PlpSettings build(); + method @NonNull public android.media.tv.tuner.frontend.Atsc3PlpSettings.Builder setCodeRate(int); + method @NonNull public android.media.tv.tuner.frontend.Atsc3PlpSettings.Builder setFec(int); + method @NonNull public android.media.tv.tuner.frontend.Atsc3PlpSettings.Builder setInterleaveMode(int); + method @NonNull public android.media.tv.tuner.frontend.Atsc3PlpSettings.Builder setModulation(int); + method @NonNull public android.media.tv.tuner.frontend.Atsc3PlpSettings.Builder setPlpId(int); + } + + public class AtscFrontendCapabilities extends android.media.tv.tuner.frontend.FrontendCapabilities { + method public int getModulationCapability(); + } + + public class AtscFrontendSettings extends android.media.tv.tuner.frontend.FrontendSettings { + method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public static android.media.tv.tuner.frontend.AtscFrontendSettings.Builder builder(@NonNull android.content.Context); + method public int getModulation(); + method public int getType(); + field public static final int MODULATION_AUTO = 1; // 0x1 + field public static final int MODULATION_MOD_16VSB = 8; // 0x8 + field public static final int MODULATION_MOD_8VSB = 4; // 0x4 + field public static final int MODULATION_UNDEFINED = 0; // 0x0 + } + + public static class AtscFrontendSettings.Builder extends android.media.tv.tuner.frontend.FrontendSettings.Builder<android.media.tv.tuner.frontend.AtscFrontendSettings.Builder> { + method @NonNull public android.media.tv.tuner.frontend.AtscFrontendSettings build(); + method @NonNull public android.media.tv.tuner.frontend.AtscFrontendSettings.Builder setModulation(int); + } + + public class DvbcFrontendCapabilities extends android.media.tv.tuner.frontend.FrontendCapabilities { + method public int getAnnexCapability(); + method public int getFecCapability(); + method public int getModulationCapability(); + } + + public class DvbcFrontendSettings extends android.media.tv.tuner.frontend.FrontendSettings { + method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public static android.media.tv.tuner.frontend.DvbcFrontendSettings.Builder builder(@NonNull android.content.Context); + method public byte getAnnex(); + method public long getFec(); + method public int getModulation(); + method public int getOuterFec(); + method public int getSpectralInversion(); + method public int getSymbolRate(); + method public int getType(); + field public static final int ANNEX_A = 1; // 0x1 + field public static final int ANNEX_B = 2; // 0x2 + field public static final int ANNEX_C = 4; // 0x4 + field public static final int ANNEX_UNDEFINED = 0; // 0x0 + field public static final int MODULATION_AUTO = 1; // 0x1 + field public static final int MODULATION_MOD_128QAM = 16; // 0x10 + field public static final int MODULATION_MOD_16QAM = 2; // 0x2 + field public static final int MODULATION_MOD_256QAM = 32; // 0x20 + field public static final int MODULATION_MOD_32QAM = 4; // 0x4 + field public static final int MODULATION_MOD_64QAM = 8; // 0x8 + field public static final int MODULATION_UNDEFINED = 0; // 0x0 + field public static final int OUTER_FEC_OUTER_FEC_NONE = 1; // 0x1 + field public static final int OUTER_FEC_OUTER_FEC_RS = 2; // 0x2 + field public static final int OUTER_FEC_UNDEFINED = 0; // 0x0 + field public static final int SPECTRAL_INVERSION_INVERTED = 2; // 0x2 + field public static final int SPECTRAL_INVERSION_NORMAL = 1; // 0x1 + field public static final int SPECTRAL_INVERSION_UNDEFINED = 0; // 0x0 + } + + public static class DvbcFrontendSettings.Builder extends android.media.tv.tuner.frontend.FrontendSettings.Builder<android.media.tv.tuner.frontend.DvbcFrontendSettings.Builder> { + method @NonNull public android.media.tv.tuner.frontend.DvbcFrontendSettings build(); + method @NonNull public android.media.tv.tuner.frontend.DvbcFrontendSettings.Builder setAnnex(byte); + method @NonNull public android.media.tv.tuner.frontend.DvbcFrontendSettings.Builder setFec(long); + method @NonNull public android.media.tv.tuner.frontend.DvbcFrontendSettings.Builder setModulation(int); + method @NonNull public android.media.tv.tuner.frontend.DvbcFrontendSettings.Builder setOuterFec(int); + method @NonNull public android.media.tv.tuner.frontend.DvbcFrontendSettings.Builder setSpectralInversion(int); + method @NonNull public android.media.tv.tuner.frontend.DvbcFrontendSettings.Builder setSymbolRate(int); + } + + public class DvbsCodeRate { + method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public static android.media.tv.tuner.frontend.DvbsCodeRate.Builder builder(@NonNull android.content.Context); + method public int getBitsPer1000Symbol(); + method public long getInnerFec(); + method public boolean isLinear(); + method public boolean isShortFrameEnabled(); + } + + public static class DvbsCodeRate.Builder { + method @NonNull public android.media.tv.tuner.frontend.DvbsCodeRate build(); + method @NonNull public android.media.tv.tuner.frontend.DvbsCodeRate.Builder setBitsPer1000Symbol(int); + method @NonNull public android.media.tv.tuner.frontend.DvbsCodeRate.Builder setInnerFec(long); + method @NonNull public android.media.tv.tuner.frontend.DvbsCodeRate.Builder setLinear(boolean); + method @NonNull public android.media.tv.tuner.frontend.DvbsCodeRate.Builder setShortFrameEnabled(boolean); + } + + public class DvbsFrontendCapabilities extends android.media.tv.tuner.frontend.FrontendCapabilities { + method public long getInnerFecCapability(); + method public int getModulationCapability(); + method public int getStandardCapability(); + } + + public class DvbsFrontendSettings extends android.media.tv.tuner.frontend.FrontendSettings { + method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public static android.media.tv.tuner.frontend.DvbsFrontendSettings.Builder builder(@NonNull android.content.Context); + method @Nullable public android.media.tv.tuner.frontend.DvbsCodeRate getCodeRate(); + method public int getInputStreamId(); + method public int getModulation(); + method public int getPilot(); + method public int getRolloff(); + method public int getStandard(); + method public int getSymbolRate(); + method public int getType(); + method public int getVcmMode(); + field public static final int MODULATION_AUTO = 1; // 0x1 + field public static final int MODULATION_MOD_128APSK = 2048; // 0x800 + field public static final int MODULATION_MOD_16APSK = 256; // 0x100 + field public static final int MODULATION_MOD_16PSK = 16; // 0x10 + field public static final int MODULATION_MOD_16QAM = 8; // 0x8 + field public static final int MODULATION_MOD_256APSK = 4096; // 0x1000 + field public static final int MODULATION_MOD_32APSK = 512; // 0x200 + field public static final int MODULATION_MOD_32PSK = 32; // 0x20 + field public static final int MODULATION_MOD_64APSK = 1024; // 0x400 + field public static final int MODULATION_MOD_8APSK = 128; // 0x80 + field public static final int MODULATION_MOD_8PSK = 4; // 0x4 + field public static final int MODULATION_MOD_ACM = 64; // 0x40 + field public static final int MODULATION_MOD_QPSK = 2; // 0x2 + field public static final int MODULATION_MOD_RESERVED = 8192; // 0x2000 + field public static final int MODULATION_UNDEFINED = 0; // 0x0 + field public static final int PILOT_AUTO = 3; // 0x3 + field public static final int PILOT_OFF = 2; // 0x2 + field public static final int PILOT_ON = 1; // 0x1 + field public static final int PILOT_UNDEFINED = 0; // 0x0 + field public static final int ROLLOFF_0_10 = 5; // 0x5 + field public static final int ROLLOFF_0_15 = 4; // 0x4 + field public static final int ROLLOFF_0_20 = 3; // 0x3 + field public static final int ROLLOFF_0_25 = 2; // 0x2 + field public static final int ROLLOFF_0_35 = 1; // 0x1 + field public static final int ROLLOFF_0_5 = 6; // 0x6 + field public static final int ROLLOFF_UNDEFINED = 0; // 0x0 + field public static final int STANDARD_AUTO = 1; // 0x1 + field public static final int STANDARD_S = 2; // 0x2 + field public static final int STANDARD_S2 = 4; // 0x4 + field public static final int STANDARD_S2X = 8; // 0x8 + field public static final int VCM_MODE_AUTO = 1; // 0x1 + field public static final int VCM_MODE_MANUAL = 2; // 0x2 + field public static final int VCM_MODE_UNDEFINED = 0; // 0x0 + } + + public static class DvbsFrontendSettings.Builder extends android.media.tv.tuner.frontend.FrontendSettings.Builder<android.media.tv.tuner.frontend.DvbsFrontendSettings.Builder> { + method @NonNull public android.media.tv.tuner.frontend.DvbsFrontendSettings build(); + method @NonNull public android.media.tv.tuner.frontend.DvbsFrontendSettings.Builder setCodeRate(@Nullable android.media.tv.tuner.frontend.DvbsCodeRate); + method @NonNull public android.media.tv.tuner.frontend.DvbsFrontendSettings.Builder setInputStreamId(int); + method @NonNull public android.media.tv.tuner.frontend.DvbsFrontendSettings.Builder setModulation(int); + method @NonNull public android.media.tv.tuner.frontend.DvbsFrontendSettings.Builder setPilot(int); + method @NonNull public android.media.tv.tuner.frontend.DvbsFrontendSettings.Builder setRolloff(int); + method @NonNull public android.media.tv.tuner.frontend.DvbsFrontendSettings.Builder setStandard(int); + method @NonNull public android.media.tv.tuner.frontend.DvbsFrontendSettings.Builder setSymbolRate(int); + method @NonNull public android.media.tv.tuner.frontend.DvbsFrontendSettings.Builder setVcmMode(int); + } + + public class DvbtFrontendCapabilities extends android.media.tv.tuner.frontend.FrontendCapabilities { + method public int getBandwidthCapability(); + method public int getCodeRateCapability(); + method public int getConstellationCapability(); + method public int getGuardIntervalCapability(); + method public int getHierarchyCapability(); + method public int getTransmissionModeCapability(); + method public boolean isMisoSupported(); + method public boolean isT2Supported(); + } + + public class DvbtFrontendSettings extends android.media.tv.tuner.frontend.FrontendSettings { + method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public static android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder builder(@NonNull android.content.Context); + method public int getBandwidth(); + method public int getConstellation(); + method public int getGuardInterval(); + method public int getHierarchy(); + method public int getHpCodeRate(); + method public int getLpCodeRate(); + method public int getPlpGroupId(); + method public int getPlpId(); + method public int getPlpMode(); + method public int getStandard(); + method public int getTransmissionMode(); + method public int getType(); + method public boolean isHighPriority(); + method public boolean isMiso(); + field public static final int BANDWIDTH_10MHZ = 64; // 0x40 + field public static final int BANDWIDTH_1_7MHZ = 32; // 0x20 + field public static final int BANDWIDTH_5MHZ = 16; // 0x10 + field public static final int BANDWIDTH_6MHZ = 8; // 0x8 + field public static final int BANDWIDTH_7MHZ = 4; // 0x4 + field public static final int BANDWIDTH_8MHZ = 2; // 0x2 + field public static final int BANDWIDTH_AUTO = 1; // 0x1 + field public static final int BANDWIDTH_UNDEFINED = 0; // 0x0 + field public static final int CODERATE_1_2 = 2; // 0x2 + field public static final int CODERATE_2_3 = 4; // 0x4 + field public static final int CODERATE_3_4 = 8; // 0x8 + field public static final int CODERATE_3_5 = 64; // 0x40 + field public static final int CODERATE_4_5 = 128; // 0x80 + field public static final int CODERATE_5_6 = 16; // 0x10 + field public static final int CODERATE_6_7 = 256; // 0x100 + field public static final int CODERATE_7_8 = 32; // 0x20 + field public static final int CODERATE_8_9 = 512; // 0x200 + field public static final int CODERATE_AUTO = 1; // 0x1 + field public static final int CODERATE_UNDEFINED = 0; // 0x0 + field public static final int CONSTELLATION_AUTO = 1; // 0x1 + field public static final int CONSTELLATION_CONSTELLATION_16QAM = 4; // 0x4 + field public static final int CONSTELLATION_CONSTELLATION_256QAM = 16; // 0x10 + field public static final int CONSTELLATION_CONSTELLATION_64QAM = 8; // 0x8 + field public static final int CONSTELLATION_CONSTELLATION_QPSK = 2; // 0x2 + field public static final int CONSTELLATION_UNDEFINED = 0; // 0x0 + field public static final int GUARD_INTERVAL_AUTO = 1; // 0x1 + field public static final int GUARD_INTERVAL_INTERVAL_19_128 = 64; // 0x40 + field public static final int GUARD_INTERVAL_INTERVAL_19_256 = 128; // 0x80 + field public static final int GUARD_INTERVAL_INTERVAL_1_128 = 32; // 0x20 + field public static final int GUARD_INTERVAL_INTERVAL_1_16 = 4; // 0x4 + field public static final int GUARD_INTERVAL_INTERVAL_1_32 = 2; // 0x2 + field public static final int GUARD_INTERVAL_INTERVAL_1_4 = 16; // 0x10 + field public static final int GUARD_INTERVAL_INTERVAL_1_8 = 8; // 0x8 + field public static final int GUARD_INTERVAL_UNDEFINED = 0; // 0x0 + field public static final int HIERARCHY_1_INDEPTH = 64; // 0x40 + field public static final int HIERARCHY_1_NATIVE = 4; // 0x4 + field public static final int HIERARCHY_2_INDEPTH = 128; // 0x80 + field public static final int HIERARCHY_2_NATIVE = 8; // 0x8 + field public static final int HIERARCHY_4_INDEPTH = 256; // 0x100 + field public static final int HIERARCHY_4_NATIVE = 16; // 0x10 + field public static final int HIERARCHY_AUTO = 1; // 0x1 + field public static final int HIERARCHY_NON_INDEPTH = 32; // 0x20 + field public static final int HIERARCHY_NON_NATIVE = 2; // 0x2 + field public static final int HIERARCHY_UNDEFINED = 0; // 0x0 + field public static final int PLP_MODE_AUTO = 1; // 0x1 + field public static final int PLP_MODE_MANUAL = 2; // 0x2 + field public static final int PLP_MODE_UNDEFINED = 0; // 0x0 + field public static final int STANDARD_AUTO = 1; // 0x1 + field public static final int STANDARD_T = 2; // 0x2 + field public static final int STANDARD_T2 = 4; // 0x4 + field public static final int TRANSMISSION_MODE_16K = 32; // 0x20 + field public static final int TRANSMISSION_MODE_1K = 16; // 0x10 + field public static final int TRANSMISSION_MODE_2K = 2; // 0x2 + field public static final int TRANSMISSION_MODE_32K = 64; // 0x40 + field public static final int TRANSMISSION_MODE_4K = 8; // 0x8 + field public static final int TRANSMISSION_MODE_8K = 4; // 0x4 + field public static final int TRANSMISSION_MODE_AUTO = 1; // 0x1 + field public static final int TRANSMISSION_MODE_UNDEFINED = 0; // 0x0 + } + + public static class DvbtFrontendSettings.Builder extends android.media.tv.tuner.frontend.FrontendSettings.Builder<android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder> { + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings build(); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setBandwidth(int); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setConstellation(int); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setGuardInterval(int); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setHierarchy(int); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setHighPriority(boolean); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setHpCodeRate(int); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setLpCodeRate(int); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setMiso(boolean); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setPlpGroupId(int); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setPlpId(int); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setPlpMode(int); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setStandard(int); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setTransmissionMode(int); + } + + public abstract class FrontendCapabilities { + ctor public FrontendCapabilities(); + } + + public class FrontendInfo { + method public int getAcquireRange(); + method public int getExclusiveGroupId(); + method @NonNull public android.util.Range<java.lang.Integer> getFrequencyRange(); + method @NonNull public android.media.tv.tuner.frontend.FrontendCapabilities getFrontendCapability(); + method public int getId(); + method @NonNull public int[] getStatusCapabilities(); + method @NonNull public android.util.Range<java.lang.Integer> getSymbolRateRange(); + method public int getType(); + } + public abstract class FrontendSettings { method public int getFrequency(); method public abstract int getType(); @@ -5208,6 +5559,200 @@ package android.media.tv.tuner.frontend { method @IntRange(from=1) @NonNull public T setFrequency(int); } + public class FrontendStatus { + method public int getAgc(); + method @NonNull public android.media.tv.tuner.frontend.FrontendStatus.Atsc3PlpInfo[] getAtsc3PlpInfo(); + method public int getBer(); + method public long getFec(); + method public int getFreqOffset(); + method public int getHierarchy(); + method @NonNull public boolean[] getLayerErrors(); + method public int getLberCn(); + method public int getLnbVoltage(); + method public int getMer(); + method public int getModulation(); + method public int getPer(); + method public int getPerBer(); + method public int getPlpId(); + method public int getSignalQuality(); + method public int getSignalStrength(); + method public int getSnr(); + method public int getSpectralInversion(); + method public int getSymbolRate(); + method public int getVberCn(); + method public int getXerCn(); + method public boolean isDemodLocked(); + method public boolean isEwbs(); + method public boolean isLnaOn(); + method public boolean isRfLock(); + field public static final int FRONTEND_STATUS_TYPE_AGC = 14; // 0xe + field public static final int FRONTEND_STATUS_TYPE_ATSC3_PLP_INFO = 24; // 0x18 + field public static final int FRONTEND_STATUS_TYPE_BER = 2; // 0x2 + field public static final int FRONTEND_STATUS_TYPE_DEMOD_LOCK = 0; // 0x0 + field public static final int FRONTEND_STATUS_TYPE_EWBS = 13; // 0xd + field public static final int FRONTEND_STATUS_TYPE_FEC = 8; // 0x8 + field public static final int FRONTEND_STATUS_TYPE_FREQ_OFFSET = 21; // 0x15 + field public static final int FRONTEND_STATUS_TYPE_HIERARCHY = 22; // 0x16 + field public static final int FRONTEND_STATUS_TYPE_LAYER_ERROR = 16; // 0x10 + field public static final int FRONTEND_STATUS_TYPE_LBER_CN = 18; // 0x12 + field public static final int FRONTEND_STATUS_TYPE_LNA = 15; // 0xf + field public static final int FRONTEND_STATUS_TYPE_LNB_VOLTAGE = 11; // 0xb + field public static final int FRONTEND_STATUS_TYPE_MER = 20; // 0x14 + field public static final int FRONTEND_STATUS_TYPE_MODULATION = 9; // 0x9 + field public static final int FRONTEND_STATUS_TYPE_PER = 3; // 0x3 + field public static final int FRONTEND_STATUS_TYPE_PLP_ID = 12; // 0xc + field public static final int FRONTEND_STATUS_TYPE_PRE_BER = 4; // 0x4 + field public static final int FRONTEND_STATUS_TYPE_RF_LOCK = 23; // 0x17 + field public static final int FRONTEND_STATUS_TYPE_SIGNAL_QUALITY = 5; // 0x5 + field public static final int FRONTEND_STATUS_TYPE_SIGNAL_STRENGTH = 6; // 0x6 + field public static final int FRONTEND_STATUS_TYPE_SNR = 1; // 0x1 + field public static final int FRONTEND_STATUS_TYPE_SPECTRAL = 10; // 0xa + field public static final int FRONTEND_STATUS_TYPE_SYMBOL_RATE = 7; // 0x7 + field public static final int FRONTEND_STATUS_TYPE_VBER_CN = 17; // 0x11 + field public static final int FRONTEND_STATUS_TYPE_XER_CN = 19; // 0x13 + } + + public static class FrontendStatus.Atsc3PlpInfo { + method public int getPlpId(); + method public int getUec(); + method public boolean isLock(); + } + + public class Isdbs3FrontendCapabilities extends android.media.tv.tuner.frontend.FrontendCapabilities { + method public int getCodeRateCapability(); + method public int getModulationCapability(); + } + + public class Isdbs3FrontendSettings extends android.media.tv.tuner.frontend.FrontendSettings { + method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public static android.media.tv.tuner.frontend.Isdbs3FrontendSettings.Builder builder(@NonNull android.content.Context); + method public int getCodeRate(); + method public int getModulation(); + method public int getRolloff(); + method public int getStreamId(); + method public int getStreamIdType(); + method public int getSymbolRate(); + method public int getType(); + field public static final int CODERATE_1_2 = 8; // 0x8 + field public static final int CODERATE_1_3 = 2; // 0x2 + field public static final int CODERATE_2_3 = 32; // 0x20 + field public static final int CODERATE_2_5 = 4; // 0x4 + field public static final int CODERATE_3_4 = 64; // 0x40 + field public static final int CODERATE_3_5 = 16; // 0x10 + field public static final int CODERATE_4_5 = 256; // 0x100 + field public static final int CODERATE_5_6 = 512; // 0x200 + field public static final int CODERATE_7_8 = 1024; // 0x400 + field public static final int CODERATE_7_9 = 128; // 0x80 + field public static final int CODERATE_9_10 = 2048; // 0x800 + field public static final int CODERATE_AUTO = 1; // 0x1 + field public static final int CODERATE_UNDEFINED = 0; // 0x0 + field public static final int MODULATION_AUTO = 1; // 0x1 + field public static final int MODULATION_MOD_16APSK = 16; // 0x10 + field public static final int MODULATION_MOD_32APSK = 32; // 0x20 + field public static final int MODULATION_MOD_8PSK = 8; // 0x8 + field public static final int MODULATION_MOD_BPSK = 2; // 0x2 + field public static final int MODULATION_MOD_QPSK = 4; // 0x4 + field public static final int MODULATION_UNDEFINED = 0; // 0x0 + field public static final int ROLLOFF_0_03 = 1; // 0x1 + field public static final int ROLLOFF_UNDEFINED = 0; // 0x0 + } + + public static class Isdbs3FrontendSettings.Builder extends android.media.tv.tuner.frontend.FrontendSettings.Builder<android.media.tv.tuner.frontend.Isdbs3FrontendSettings.Builder> { + method @NonNull public android.media.tv.tuner.frontend.Isdbs3FrontendSettings build(); + method @NonNull public android.media.tv.tuner.frontend.Isdbs3FrontendSettings.Builder setCodeRate(int); + method @NonNull public android.media.tv.tuner.frontend.Isdbs3FrontendSettings.Builder setModulation(int); + method @NonNull public android.media.tv.tuner.frontend.Isdbs3FrontendSettings.Builder setRolloff(int); + method @NonNull public android.media.tv.tuner.frontend.Isdbs3FrontendSettings.Builder setStreamId(int); + method @NonNull public android.media.tv.tuner.frontend.Isdbs3FrontendSettings.Builder setStreamIdType(int); + method @NonNull public android.media.tv.tuner.frontend.Isdbs3FrontendSettings.Builder setSymbolRate(int); + } + + public class IsdbsFrontendCapabilities extends android.media.tv.tuner.frontend.FrontendCapabilities { + method public int getCodeRateCapability(); + method public int getModulationCapability(); + } + + public class IsdbsFrontendSettings extends android.media.tv.tuner.frontend.FrontendSettings { + method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public static android.media.tv.tuner.frontend.IsdbsFrontendSettings.Builder builder(@NonNull android.content.Context); + method public int getCodeRate(); + method public int getModulation(); + method public int getRolloff(); + method public int getStreamId(); + method public int getStreamIdType(); + method public int getSymbolRate(); + method public int getType(); + field public static final int CODERATE_1_2 = 2; // 0x2 + field public static final int CODERATE_2_3 = 4; // 0x4 + field public static final int CODERATE_3_4 = 8; // 0x8 + field public static final int CODERATE_5_6 = 16; // 0x10 + field public static final int CODERATE_7_8 = 32; // 0x20 + field public static final int CODERATE_AUTO = 1; // 0x1 + field public static final int CODERATE_UNDEFINED = 0; // 0x0 + field public static final int MODULATION_AUTO = 1; // 0x1 + field public static final int MODULATION_MOD_BPSK = 2; // 0x2 + field public static final int MODULATION_MOD_QPSK = 4; // 0x4 + field public static final int MODULATION_MOD_TC8PSK = 8; // 0x8 + field public static final int MODULATION_UNDEFINED = 0; // 0x0 + field public static final int ROLLOFF_0_35 = 1; // 0x1 + field public static final int ROLLOFF_UNDEFINED = 0; // 0x0 + field public static final int STREAM_ID_TYPE_ID = 0; // 0x0 + field public static final int STREAM_ID_TYPE_RELATIVE_NUMBER = 1; // 0x1 + } + + public static class IsdbsFrontendSettings.Builder extends android.media.tv.tuner.frontend.FrontendSettings.Builder<android.media.tv.tuner.frontend.IsdbsFrontendSettings.Builder> { + method @NonNull public android.media.tv.tuner.frontend.IsdbsFrontendSettings build(); + method @NonNull public android.media.tv.tuner.frontend.IsdbsFrontendSettings.Builder setCodeRate(int); + method @NonNull public android.media.tv.tuner.frontend.IsdbsFrontendSettings.Builder setModulation(int); + method @NonNull public android.media.tv.tuner.frontend.IsdbsFrontendSettings.Builder setRolloff(int); + method @NonNull public android.media.tv.tuner.frontend.IsdbsFrontendSettings.Builder setStreamId(int); + method @NonNull public android.media.tv.tuner.frontend.IsdbsFrontendSettings.Builder setStreamIdType(int); + method @NonNull public android.media.tv.tuner.frontend.IsdbsFrontendSettings.Builder setSymbolRate(int); + } + + public class IsdbtFrontendCapabilities extends android.media.tv.tuner.frontend.FrontendCapabilities { + method public int getBandwidthCapability(); + method public int getCodeRateCapability(); + method public int getGuardIntervalCapability(); + method public int getModeCapability(); + method public int getModulationCapability(); + } + + public class IsdbtFrontendSettings extends android.media.tv.tuner.frontend.FrontendSettings { + method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public static android.media.tv.tuner.frontend.IsdbtFrontendSettings.Builder builder(@NonNull android.content.Context); + method public int getBandwidth(); + method public int getCodeRate(); + method public int getGuardInterval(); + method public int getMode(); + method public int getModulation(); + method public int getServiceAreaId(); + method public int getType(); + field public static final int BANDWIDTH_6MHZ = 8; // 0x8 + field public static final int BANDWIDTH_7MHZ = 4; // 0x4 + field public static final int BANDWIDTH_8MHZ = 2; // 0x2 + field public static final int BANDWIDTH_AUTO = 1; // 0x1 + field public static final int BANDWIDTH_UNDEFINED = 0; // 0x0 + field public static final int MODE_1 = 2; // 0x2 + field public static final int MODE_2 = 4; // 0x4 + field public static final int MODE_3 = 8; // 0x8 + field public static final int MODE_AUTO = 1; // 0x1 + field public static final int MODE_UNDEFINED = 0; // 0x0 + field public static final int MODULATION_AUTO = 1; // 0x1 + field public static final int MODULATION_MOD_16QAM = 8; // 0x8 + field public static final int MODULATION_MOD_64QAM = 16; // 0x10 + field public static final int MODULATION_MOD_DQPSK = 2; // 0x2 + field public static final int MODULATION_MOD_QPSK = 4; // 0x4 + field public static final int MODULATION_UNDEFINED = 0; // 0x0 + } + + public static class IsdbtFrontendSettings.Builder extends android.media.tv.tuner.frontend.FrontendSettings.Builder<android.media.tv.tuner.frontend.IsdbtFrontendSettings.Builder> { + method @NonNull public android.media.tv.tuner.frontend.IsdbtFrontendSettings build(); + method @NonNull public android.media.tv.tuner.frontend.IsdbtFrontendSettings.Builder setBandwidth(int); + method @NonNull public android.media.tv.tuner.frontend.IsdbtFrontendSettings.Builder setCodeRate(int); + method @NonNull public android.media.tv.tuner.frontend.IsdbtFrontendSettings.Builder setGuardInterval(int); + method @NonNull public android.media.tv.tuner.frontend.IsdbtFrontendSettings.Builder setMode(int); + method @NonNull public android.media.tv.tuner.frontend.IsdbtFrontendSettings.Builder setModulation(int); + method @NonNull public android.media.tv.tuner.frontend.IsdbtFrontendSettings.Builder setServiceAreaId(int); + } + public interface OnTuneEventListener { method public void onTuneEvent(int); field public static final int SIGNAL_LOCKED = 0; // 0x0 diff --git a/media/java/android/media/tv/tuner/TunerConstants.java b/media/java/android/media/tv/tuner/TunerConstants.java index c03061948fe4..ade852502474 100644 --- a/media/java/android/media/tv/tuner/TunerConstants.java +++ b/media/java/android/media/tv/tuner/TunerConstants.java @@ -58,7 +58,7 @@ public final class TunerConstants { /** * Scan type auto. * - * <p> Tuner will send {@link #onLocked} + * <p> Tuner will send {@link android.media.tv.tuner.frontend.ScanCallback#onLocked} */ public static final int SCAN_TYPE_AUTO = Constants.FrontendScanType.SCAN_AUTO; /** diff --git a/media/java/android/media/tv/tuner/frontend/AnalogFrontendCapabilities.java b/media/java/android/media/tv/tuner/frontend/AnalogFrontendCapabilities.java index aa64df56f556..096bc679f7f8 100644 --- a/media/java/android/media/tv/tuner/frontend/AnalogFrontendCapabilities.java +++ b/media/java/android/media/tv/tuner/frontend/AnalogFrontendCapabilities.java @@ -16,11 +16,14 @@ package android.media.tv.tuner.frontend; +import android.annotation.SystemApi; + /** * Capabilities for analog tuners. * * @hide */ +@SystemApi public class AnalogFrontendCapabilities extends FrontendCapabilities { @AnalogFrontendSettings.SignalType private final int mTypeCap; diff --git a/media/java/android/media/tv/tuner/frontend/AnalogFrontendSettings.java b/media/java/android/media/tv/tuner/frontend/AnalogFrontendSettings.java index 61880ab5f553..7b85fa81adb6 100644 --- a/media/java/android/media/tv/tuner/frontend/AnalogFrontendSettings.java +++ b/media/java/android/media/tv/tuner/frontend/AnalogFrontendSettings.java @@ -195,7 +195,7 @@ public class AnalogFrontendSettings extends FrontendSettings { /** * Creates a builder for {@link AnalogFrontendSettings}. * - * @param the context of the caller. + * @param context the context of the caller. */ @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) @NonNull @@ -223,7 +223,7 @@ public class AnalogFrontendSettings extends FrontendSettings { * Sets analog signal type. */ @NonNull - public Builder setASignalType(@SignalType int signalType) { + public Builder setSignalType(@SignalType int signalType) { mSignalType = signalType; return this; } diff --git a/media/java/android/media/tv/tuner/frontend/Atsc3FrontendCapabilities.java b/media/java/android/media/tv/tuner/frontend/Atsc3FrontendCapabilities.java index 1fd1f63c775a..77309127a464 100644 --- a/media/java/android/media/tv/tuner/frontend/Atsc3FrontendCapabilities.java +++ b/media/java/android/media/tv/tuner/frontend/Atsc3FrontendCapabilities.java @@ -16,10 +16,14 @@ package android.media.tv.tuner.frontend; +import android.annotation.SystemApi; + /** * ATSC-3 Capabilities. + * * @hide */ +@SystemApi public class Atsc3FrontendCapabilities extends FrontendCapabilities { private final int mBandwidthCap; private final int mModulationCap; @@ -63,7 +67,7 @@ public class Atsc3FrontendCapabilities extends FrontendCapabilities { * Gets code rate capability. */ @Atsc3FrontendSettings.CodeRate - public int getCodeRateCapability() { + public int getPlpCodeRateCapability() { return mCodeRateCap; } /** diff --git a/media/java/android/media/tv/tuner/frontend/Atsc3FrontendSettings.java b/media/java/android/media/tv/tuner/frontend/Atsc3FrontendSettings.java index 5e1ba722c9fc..85f3f72020d0 100644 --- a/media/java/android/media/tv/tuner/frontend/Atsc3FrontendSettings.java +++ b/media/java/android/media/tv/tuner/frontend/Atsc3FrontendSettings.java @@ -19,6 +19,7 @@ package android.media.tv.tuner.frontend; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.RequiresPermission; +import android.annotation.SystemApi; import android.content.Context; import android.hardware.tv.tuner.V1_0.Constants; import android.media.tv.tuner.TunerUtils; @@ -28,8 +29,10 @@ import java.lang.annotation.RetentionPolicy; /** * Frontend settings for ATSC-3. + * * @hide */ +@SystemApi public class Atsc3FrontendSettings extends FrontendSettings { /** @hide */ @@ -273,9 +276,9 @@ public class Atsc3FrontendSettings extends FrontendSettings { public static final int DEMOD_OUTPUT_FORMAT_BASEBAND_PACKET = Constants.FrontendAtsc3DemodOutputFormat.BASEBAND_PACKET; - public final int mBandwidth; - public final int mDemodOutputFormat; - public final Atsc3PlpSettings[] mPlpSettings; + private final int mBandwidth; + private final int mDemodOutputFormat; + private final Atsc3PlpSettings[] mPlpSettings; private Atsc3FrontendSettings(int frequency, int bandwidth, int demodOutputFormat, Atsc3PlpSettings[] plpSettings) { @@ -302,6 +305,7 @@ public class Atsc3FrontendSettings extends FrontendSettings { /** * Gets PLP Settings. */ + @NonNull public Atsc3PlpSettings[] getPlpSettings() { return mPlpSettings; } @@ -349,7 +353,7 @@ public class Atsc3FrontendSettings extends FrontendSettings { * Sets PLP Settings. */ @NonNull - public Builder setPlpSettings(Atsc3PlpSettings[] plpSettings) { + public Builder setPlpSettings(@NonNull Atsc3PlpSettings[] plpSettings) { mPlpSettings = plpSettings; return this; } diff --git a/media/java/android/media/tv/tuner/frontend/Atsc3PlpSettings.java b/media/java/android/media/tv/tuner/frontend/Atsc3PlpSettings.java index 43a68a088c33..fe61dbc1b86f 100644 --- a/media/java/android/media/tv/tuner/frontend/Atsc3PlpSettings.java +++ b/media/java/android/media/tv/tuner/frontend/Atsc3PlpSettings.java @@ -18,13 +18,16 @@ package android.media.tv.tuner.frontend; import android.annotation.NonNull; import android.annotation.RequiresPermission; +import android.annotation.SystemApi; import android.content.Context; import android.media.tv.tuner.TunerUtils; /** - * PLP settings for ATSC-3. + * Physical Layer Pipe (PLP) settings for ATSC-3. + * * @hide */ +@SystemApi public class Atsc3PlpSettings { private final int mPlpId; private final int mModulation; diff --git a/media/java/android/media/tv/tuner/frontend/AtscFrontendCapabilities.java b/media/java/android/media/tv/tuner/frontend/AtscFrontendCapabilities.java index 0ff516de3603..eb21caa0f6db 100644 --- a/media/java/android/media/tv/tuner/frontend/AtscFrontendCapabilities.java +++ b/media/java/android/media/tv/tuner/frontend/AtscFrontendCapabilities.java @@ -16,10 +16,14 @@ package android.media.tv.tuner.frontend; +import android.annotation.SystemApi; + /** * ATSC Capabilities. + * * @hide */ +@SystemApi public class AtscFrontendCapabilities extends FrontendCapabilities { private final int mModulationCap; diff --git a/media/java/android/media/tv/tuner/frontend/AtscFrontendSettings.java b/media/java/android/media/tv/tuner/frontend/AtscFrontendSettings.java index 32901d8aadec..fc82a1c7a6a0 100644 --- a/media/java/android/media/tv/tuner/frontend/AtscFrontendSettings.java +++ b/media/java/android/media/tv/tuner/frontend/AtscFrontendSettings.java @@ -19,6 +19,7 @@ package android.media.tv.tuner.frontend; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.RequiresPermission; +import android.annotation.SystemApi; import android.content.Context; import android.hardware.tv.tuner.V1_0.Constants; import android.media.tv.tuner.TunerUtils; @@ -28,8 +29,10 @@ import java.lang.annotation.RetentionPolicy; /** * Frontend settings for ATSC. + * * @hide */ +@SystemApi public class AtscFrontendSettings extends FrontendSettings { /** @hide */ diff --git a/media/java/android/media/tv/tuner/frontend/DvbcFrontendCapabilities.java b/media/java/android/media/tv/tuner/frontend/DvbcFrontendCapabilities.java index f3fbdb5f3b18..fcd58ee11971 100644 --- a/media/java/android/media/tv/tuner/frontend/DvbcFrontendCapabilities.java +++ b/media/java/android/media/tv/tuner/frontend/DvbcFrontendCapabilities.java @@ -16,12 +16,15 @@ package android.media.tv.tuner.frontend; +import android.annotation.SystemApi; import android.media.tv.tuner.TunerConstants.FrontendInnerFec; /** * DVBC Capabilities. + * * @hide */ +@SystemApi public class DvbcFrontendCapabilities extends FrontendCapabilities { private final int mModulationCap; private final int mFecCap; diff --git a/media/java/android/media/tv/tuner/frontend/DvbcFrontendSettings.java b/media/java/android/media/tv/tuner/frontend/DvbcFrontendSettings.java index 3d212d3d55c3..1d6df87a83a4 100644 --- a/media/java/android/media/tv/tuner/frontend/DvbcFrontendSettings.java +++ b/media/java/android/media/tv/tuner/frontend/DvbcFrontendSettings.java @@ -19,6 +19,7 @@ package android.media.tv.tuner.frontend; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.RequiresPermission; +import android.annotation.SystemApi; import android.content.Context; import android.hardware.tv.tuner.V1_0.Constants; import android.media.tv.tuner.TunerConstants.FrontendInnerFec; @@ -29,8 +30,10 @@ import java.lang.annotation.RetentionPolicy; /** * Frontend settings for DVBC. + * * @hide */ +@SystemApi public class DvbcFrontendSettings extends FrontendSettings { /** @hide */ diff --git a/media/java/android/media/tv/tuner/frontend/DvbsCodeRate.java b/media/java/android/media/tv/tuner/frontend/DvbsCodeRate.java index 04d33750849c..5328f1952ab4 100644 --- a/media/java/android/media/tv/tuner/frontend/DvbsCodeRate.java +++ b/media/java/android/media/tv/tuner/frontend/DvbsCodeRate.java @@ -18,22 +18,25 @@ package android.media.tv.tuner.frontend; import android.annotation.NonNull; import android.annotation.RequiresPermission; +import android.annotation.SystemApi; import android.content.Context; import android.media.tv.tuner.TunerConstants.FrontendInnerFec; import android.media.tv.tuner.TunerUtils; /** * Code rate for DVBS. + * * @hide */ +@SystemApi public class DvbsCodeRate { - private final long mFec; + private final long mInnerFec; private final boolean mIsLinear; private final boolean mIsShortFrames; private final int mBitsPer1000Symbol; private DvbsCodeRate(long fec, boolean isLinear, boolean isShortFrames, int bitsPer1000Symbol) { - mFec = fec; + mInnerFec = fec; mIsLinear = isLinear; mIsShortFrames = isShortFrames; mBitsPer1000Symbol = bitsPer1000Symbol; @@ -43,8 +46,8 @@ public class DvbsCodeRate { * Gets inner FEC. */ @FrontendInnerFec - public long getFec() { - return mFec; + public long getInnerFec() { + return mInnerFec; } /** * Checks whether it's linear. @@ -93,7 +96,7 @@ public class DvbsCodeRate { * Sets inner FEC. */ @NonNull - public Builder setFec(@FrontendInnerFec long fec) { + public Builder setInnerFec(@FrontendInnerFec long fec) { mFec = fec; return this; } diff --git a/media/java/android/media/tv/tuner/frontend/DvbsFrontendCapabilities.java b/media/java/android/media/tv/tuner/frontend/DvbsFrontendCapabilities.java index bd615d033bc6..e33d1c1851c8 100644 --- a/media/java/android/media/tv/tuner/frontend/DvbsFrontendCapabilities.java +++ b/media/java/android/media/tv/tuner/frontend/DvbsFrontendCapabilities.java @@ -16,12 +16,15 @@ package android.media.tv.tuner.frontend; +import android.annotation.SystemApi; import android.media.tv.tuner.TunerConstants.FrontendInnerFec; /** * DVBS Capabilities. + * * @hide */ +@SystemApi public class DvbsFrontendCapabilities extends FrontendCapabilities { private final int mModulationCap; private final long mInnerFecCap; diff --git a/media/java/android/media/tv/tuner/frontend/DvbsFrontendSettings.java b/media/java/android/media/tv/tuner/frontend/DvbsFrontendSettings.java index 44dbcc01b16e..4a4fed596f21 100644 --- a/media/java/android/media/tv/tuner/frontend/DvbsFrontendSettings.java +++ b/media/java/android/media/tv/tuner/frontend/DvbsFrontendSettings.java @@ -20,6 +20,7 @@ import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresPermission; +import android.annotation.SystemApi; import android.content.Context; import android.hardware.tv.tuner.V1_0.Constants; import android.media.tv.tuner.TunerUtils; @@ -29,8 +30,10 @@ import java.lang.annotation.RetentionPolicy; /** * Frontend settings for DVBS. + * * @hide */ +@SystemApi public class DvbsFrontendSettings extends FrontendSettings { /** @hide */ @IntDef(flag = true, @@ -209,7 +212,7 @@ public class DvbsFrontendSettings extends FrontendSettings { private final int mModulation; - private final DvbsCodeRate mCoderate; + private final DvbsCodeRate mCodeRate; private final int mSymbolRate; private final int mRolloff; private final int mPilot; @@ -217,11 +220,11 @@ public class DvbsFrontendSettings extends FrontendSettings { private final int mStandard; private final int mVcmMode; - private DvbsFrontendSettings(int frequency, int modulation, DvbsCodeRate coderate, + private DvbsFrontendSettings(int frequency, int modulation, DvbsCodeRate codeRate, int symbolRate, int rolloff, int pilot, int inputStreamId, int standard, int vcm) { super(frequency); mModulation = modulation; - mCoderate = coderate; + mCodeRate = codeRate; mSymbolRate = symbolRate; mRolloff = rolloff; mPilot = pilot; @@ -241,8 +244,8 @@ public class DvbsFrontendSettings extends FrontendSettings { * Gets Code rate. */ @Nullable - public DvbsCodeRate getCoderate() { - return mCoderate; + public DvbsCodeRate getCodeRate() { + return mCodeRate; } /** * Gets Symbol Rate in symbols per second. @@ -302,7 +305,7 @@ public class DvbsFrontendSettings extends FrontendSettings { */ public static class Builder extends FrontendSettings.Builder<Builder> { private int mModulation; - private DvbsCodeRate mCoderate; + private DvbsCodeRate mCodeRate; private int mSymbolRate; private int mRolloff; private int mPilot; @@ -325,8 +328,8 @@ public class DvbsFrontendSettings extends FrontendSettings { * Sets Code rate. */ @NonNull - public Builder setCoderate(@Nullable DvbsCodeRate coderate) { - mCoderate = coderate; + public Builder setCodeRate(@Nullable DvbsCodeRate codeRate) { + mCodeRate = codeRate; return this; } /** @@ -383,7 +386,7 @@ public class DvbsFrontendSettings extends FrontendSettings { */ @NonNull public DvbsFrontendSettings build() { - return new DvbsFrontendSettings(mFrequency, mModulation, mCoderate, mSymbolRate, + return new DvbsFrontendSettings(mFrequency, mModulation, mCodeRate, mSymbolRate, mRolloff, mPilot, mInputStreamId, mStandard, mVcmMode); } diff --git a/media/java/android/media/tv/tuner/frontend/DvbtFrontendCapabilities.java b/media/java/android/media/tv/tuner/frontend/DvbtFrontendCapabilities.java index 0d4717903f19..b0fba9a8b28e 100644 --- a/media/java/android/media/tv/tuner/frontend/DvbtFrontendCapabilities.java +++ b/media/java/android/media/tv/tuner/frontend/DvbtFrontendCapabilities.java @@ -16,27 +16,32 @@ package android.media.tv.tuner.frontend; +import android.annotation.SystemApi; +import android.media.tv.tuner.frontend.DvbtFrontendSettings.CodeRate; + /** * DVBT Capabilities. + * * @hide */ +@SystemApi public class DvbtFrontendCapabilities extends FrontendCapabilities { private final int mTransmissionModeCap; private final int mBandwidthCap; private final int mConstellationCap; - private final int mCoderateCap; + private final int mCodeRateCap; private final int mHierarchyCap; private final int mGuardIntervalCap; private final boolean mIsT2Supported; private final boolean mIsMisoSupported; private DvbtFrontendCapabilities(int transmissionModeCap, int bandwidthCap, - int constellationCap, int coderateCap, int hierarchyCap, int guardIntervalCap, + int constellationCap, int codeRateCap, int hierarchyCap, int guardIntervalCap, boolean isT2Supported, boolean isMisoSupported) { mTransmissionModeCap = transmissionModeCap; mBandwidthCap = bandwidthCap; mConstellationCap = constellationCap; - mCoderateCap = coderateCap; + mCodeRateCap = codeRateCap; mHierarchyCap = hierarchyCap; mGuardIntervalCap = guardIntervalCap; mIsT2Supported = isT2Supported; @@ -67,9 +72,9 @@ public class DvbtFrontendCapabilities extends FrontendCapabilities { /** * Gets code rate capability. */ - @DvbtFrontendSettings.Coderate + @CodeRate public int getCodeRateCapability() { - return mCoderateCap; + return mCodeRateCap; } /** * Gets hierarchy capability. diff --git a/media/java/android/media/tv/tuner/frontend/DvbtFrontendSettings.java b/media/java/android/media/tv/tuner/frontend/DvbtFrontendSettings.java index 9a82de0b6db3..1a5a871ec3f1 100644 --- a/media/java/android/media/tv/tuner/frontend/DvbtFrontendSettings.java +++ b/media/java/android/media/tv/tuner/frontend/DvbtFrontendSettings.java @@ -19,6 +19,7 @@ package android.media.tv.tuner.frontend; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.RequiresPermission; +import android.annotation.SystemApi; import android.content.Context; import android.hardware.tv.tuner.V1_0.Constants; import android.media.tv.tuner.TunerUtils; @@ -28,8 +29,10 @@ import java.lang.annotation.RetentionPolicy; /** * Frontend settings for DVBT. + * * @hide */ +@SystemApi public class DvbtFrontendSettings extends FrontendSettings { /** @hide */ @@ -220,7 +223,7 @@ public class DvbtFrontendSettings extends FrontendSettings { value = {CODERATE_UNDEFINED, CODERATE_AUTO, CODERATE_1_2, CODERATE_2_3, CODERATE_3_4, CODERATE_5_6, CODERATE_7_8, CODERATE_3_5, CODERATE_4_5, CODERATE_6_7, CODERATE_8_9}) @Retention(RetentionPolicy.SOURCE) - public @interface Coderate {} + public @interface CodeRate {} /** * Code rate undefined. @@ -371,8 +374,8 @@ public class DvbtFrontendSettings extends FrontendSettings { private final int mBandwidth; private final int mConstellation; private final int mHierarchy; - private final int mHpCoderate; - private final int mLpCoderate; + private final int mHpCodeRate; + private final int mLpCodeRate; private final int mGuardInterval; private final boolean mIsHighPriority; private final int mStandard; @@ -382,7 +385,7 @@ public class DvbtFrontendSettings extends FrontendSettings { private final int mPlpGroupId; private DvbtFrontendSettings(int frequency, int transmissionMode, int bandwidth, - int constellation, int hierarchy, int hpCoderate, int lpCoderate, int guardInterval, + int constellation, int hierarchy, int hpCodeRate, int lpCodeRate, int guardInterval, boolean isHighPriority, int standard, boolean isMiso, int plpMode, int plpId, int plpGroupId) { super(frequency); @@ -390,8 +393,8 @@ public class DvbtFrontendSettings extends FrontendSettings { mBandwidth = bandwidth; mConstellation = constellation; mHierarchy = hierarchy; - mHpCoderate = hpCoderate; - mLpCoderate = lpCoderate; + mHpCodeRate = hpCodeRate; + mLpCodeRate = lpCodeRate; mGuardInterval = guardInterval; mIsHighPriority = isHighPriority; mStandard = standard; @@ -432,16 +435,16 @@ public class DvbtFrontendSettings extends FrontendSettings { /** * Gets Code Rate for High Priority level. */ - @Coderate - public int getHpCoderate() { - return mHpCoderate; + @CodeRate + public int getHpCodeRate() { + return mHpCodeRate; } /** * Gets Code Rate for Low Priority level. */ - @Coderate - public int getLpCoderate() { - return mLpCoderate; + @CodeRate + public int getLpCodeRate() { + return mLpCodeRate; } /** * Gets Guard Interval. @@ -509,8 +512,8 @@ public class DvbtFrontendSettings extends FrontendSettings { private int mBandwidth; private int mConstellation; private int mHierarchy; - private int mHpCoderate; - private int mLpCoderate; + private int mHpCodeRate; + private int mLpCodeRate; private int mGuardInterval; private boolean mIsHighPriority; private int mStandard; @@ -558,16 +561,16 @@ public class DvbtFrontendSettings extends FrontendSettings { * Sets Code Rate for High Priority level. */ @NonNull - public Builder setHpCoderate(@Coderate int hpCoderate) { - mHpCoderate = hpCoderate; + public Builder setHpCodeRate(@CodeRate int hpCodeRate) { + mHpCodeRate = hpCodeRate; return this; } /** * Sets Code Rate for Low Priority level. */ @NonNull - public Builder setLpCoderate(@Coderate int lpCoderate) { - mLpCoderate = lpCoderate; + public Builder setLpCodeRate(@CodeRate int lpCodeRate) { + mLpCodeRate = lpCodeRate; return this; } /** @@ -633,7 +636,7 @@ public class DvbtFrontendSettings extends FrontendSettings { @NonNull public DvbtFrontendSettings build() { return new DvbtFrontendSettings(mFrequency, mTransmissionMode, mBandwidth, - mConstellation, mHierarchy, mHpCoderate, mLpCoderate, mGuardInterval, + mConstellation, mHierarchy, mHpCodeRate, mLpCodeRate, mGuardInterval, mIsHighPriority, mStandard, mIsMiso, mPlpMode, mPlpId, mPlpGroupId); } diff --git a/media/java/android/media/tv/tuner/frontend/FrontendCapabilities.java b/media/java/android/media/tv/tuner/frontend/FrontendCapabilities.java index e4f66b80d008..c03133d26a30 100644 --- a/media/java/android/media/tv/tuner/frontend/FrontendCapabilities.java +++ b/media/java/android/media/tv/tuner/frontend/FrontendCapabilities.java @@ -16,10 +16,13 @@ package android.media.tv.tuner.frontend; +import android.annotation.SystemApi; + /** * Frontend capabilities. * * @hide */ +@SystemApi public abstract class FrontendCapabilities { } diff --git a/media/java/android/media/tv/tuner/frontend/FrontendInfo.java b/media/java/android/media/tv/tuner/frontend/FrontendInfo.java index 360c84a383e0..696d8390fc11 100644 --- a/media/java/android/media/tv/tuner/frontend/FrontendInfo.java +++ b/media/java/android/media/tv/tuner/frontend/FrontendInfo.java @@ -17,6 +17,7 @@ package android.media.tv.tuner.frontend; import android.annotation.NonNull; +import android.annotation.SystemApi; import android.media.tv.tuner.frontend.FrontendSettings.Type; import android.media.tv.tuner.frontend.FrontendStatus.FrontendStatusType; import android.util.Range; @@ -26,6 +27,7 @@ import android.util.Range; * * @hide */ +@SystemApi public class FrontendInfo { private final int mId; private final int mType; @@ -102,12 +104,14 @@ public class FrontendInfo { * @return An array of supported status types. */ @FrontendStatusType + @NonNull public int[] getStatusCapabilities() { return mStatusCaps; } /** * Gets frontend capabilities. */ + @NonNull public FrontendCapabilities getFrontendCapability() { return mFrontendCap; } diff --git a/media/java/android/media/tv/tuner/frontend/FrontendStatus.java b/media/java/android/media/tv/tuner/frontend/FrontendStatus.java index 088adff630a4..09937c631e59 100644 --- a/media/java/android/media/tv/tuner/frontend/FrontendStatus.java +++ b/media/java/android/media/tv/tuner/frontend/FrontendStatus.java @@ -18,6 +18,7 @@ package android.media.tv.tuner.frontend; import android.annotation.IntDef; import android.annotation.NonNull; +import android.annotation.SystemApi; import android.hardware.tv.tuner.V1_0.Constants; import android.media.tv.tuner.Lnb; import android.media.tv.tuner.TunerConstants.FrontendInnerFec; @@ -27,10 +28,11 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** - * Frontend status + * Frontend status. * * @hide */ +@SystemApi public class FrontendStatus { /** @hide */ diff --git a/media/java/android/media/tv/tuner/frontend/Isdbs3FrontendCapabilities.java b/media/java/android/media/tv/tuner/frontend/Isdbs3FrontendCapabilities.java index 61cba1c1e4f3..dae91a0e99d3 100644 --- a/media/java/android/media/tv/tuner/frontend/Isdbs3FrontendCapabilities.java +++ b/media/java/android/media/tv/tuner/frontend/Isdbs3FrontendCapabilities.java @@ -16,17 +16,22 @@ package android.media.tv.tuner.frontend; +import android.annotation.SystemApi; +import android.media.tv.tuner.frontend.Isdbs3FrontendSettings.CodeRate; + /** * ISDBS-3 Capabilities. + * * @hide */ +@SystemApi public class Isdbs3FrontendCapabilities extends FrontendCapabilities { private final int mModulationCap; - private final int mCoderateCap; + private final int mCodeRateCap; - private Isdbs3FrontendCapabilities(int modulationCap, int coderateCap) { + private Isdbs3FrontendCapabilities(int modulationCap, int codeRateCap) { mModulationCap = modulationCap; - mCoderateCap = coderateCap; + mCodeRateCap = codeRateCap; } /** @@ -39,8 +44,8 @@ public class Isdbs3FrontendCapabilities extends FrontendCapabilities { /** * Gets code rate capability. */ - @Isdbs3FrontendSettings.Coderate + @CodeRate public int getCodeRateCapability() { - return mCoderateCap; + return mCodeRateCap; } } diff --git a/media/java/android/media/tv/tuner/frontend/Isdbs3FrontendSettings.java b/media/java/android/media/tv/tuner/frontend/Isdbs3FrontendSettings.java index a83d771af1a2..9b0e53351f59 100644 --- a/media/java/android/media/tv/tuner/frontend/Isdbs3FrontendSettings.java +++ b/media/java/android/media/tv/tuner/frontend/Isdbs3FrontendSettings.java @@ -19,6 +19,7 @@ package android.media.tv.tuner.frontend; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.RequiresPermission; +import android.annotation.SystemApi; import android.content.Context; import android.hardware.tv.tuner.V1_0.Constants; import android.media.tv.tuner.TunerUtils; @@ -28,8 +29,10 @@ import java.lang.annotation.RetentionPolicy; /** * Frontend settings for ISDBS-3. + * * @hide */ +@SystemApi public class Isdbs3FrontendSettings extends FrontendSettings { /** @hide */ @IntDef(flag = true, @@ -76,7 +79,7 @@ public class Isdbs3FrontendSettings extends FrontendSettings { value = {CODERATE_UNDEFINED, CODERATE_AUTO, CODERATE_1_3, CODERATE_2_5, CODERATE_1_2, CODERATE_3_5, CODERATE_2_3, CODERATE_3_4, CODERATE_7_9, CODERATE_4_5, CODERATE_5_6, CODERATE_7_8, CODERATE_9_10}) - public @interface Coderate {} + public @interface CodeRate {} /** * Code rate undefined. @@ -150,17 +153,17 @@ public class Isdbs3FrontendSettings extends FrontendSettings { private final int mStreamId; private final int mStreamIdType; private final int mModulation; - private final int mCoderate; + private final int mCodeRate; private final int mSymbolRate; private final int mRolloff; private Isdbs3FrontendSettings(int frequency, int streamId, int streamIdType, int modulation, - int coderate, int symbolRate, int rolloff) { + int codeRate, int symbolRate, int rolloff) { super(frequency); mStreamId = streamId; mStreamIdType = streamIdType; mModulation = modulation; - mCoderate = coderate; + mCodeRate = codeRate; mSymbolRate = symbolRate; mRolloff = rolloff; } @@ -188,9 +191,9 @@ public class Isdbs3FrontendSettings extends FrontendSettings { /** * Gets Code rate. */ - @Coderate - public int getCoderate() { - return mCoderate; + @CodeRate + public int getCodeRate() { + return mCodeRate; } /** * Gets Symbol Rate in symbols per second. @@ -225,7 +228,7 @@ public class Isdbs3FrontendSettings extends FrontendSettings { private int mStreamId; private int mStreamIdType; private int mModulation; - private int mCoderate; + private int mCodeRate; private int mSymbolRate; private int mRolloff; @@ -260,8 +263,8 @@ public class Isdbs3FrontendSettings extends FrontendSettings { * Sets Code rate. */ @NonNull - public Builder setCoderate(@Coderate int coderate) { - mCoderate = coderate; + public Builder setCodeRate(@CodeRate int codeRate) { + mCodeRate = codeRate; return this; } /** @@ -287,7 +290,7 @@ public class Isdbs3FrontendSettings extends FrontendSettings { @NonNull public Isdbs3FrontendSettings build() { return new Isdbs3FrontendSettings(mFrequency, mStreamId, mStreamIdType, mModulation, - mCoderate, mSymbolRate, mRolloff); + mCodeRate, mSymbolRate, mRolloff); } @Override diff --git a/media/java/android/media/tv/tuner/frontend/IsdbsFrontendCapabilities.java b/media/java/android/media/tv/tuner/frontend/IsdbsFrontendCapabilities.java index 8e5ecc4c3f59..9367747e8978 100644 --- a/media/java/android/media/tv/tuner/frontend/IsdbsFrontendCapabilities.java +++ b/media/java/android/media/tv/tuner/frontend/IsdbsFrontendCapabilities.java @@ -16,17 +16,22 @@ package android.media.tv.tuner.frontend; +import android.annotation.SystemApi; +import android.media.tv.tuner.frontend.IsdbsFrontendSettings.CodeRate; + /** * ISDBS Capabilities. + * * @hide */ +@SystemApi public class IsdbsFrontendCapabilities extends FrontendCapabilities { private final int mModulationCap; - private final int mCoderateCap; + private final int mCodeRateCap; - private IsdbsFrontendCapabilities(int modulationCap, int coderateCap) { + private IsdbsFrontendCapabilities(int modulationCap, int codeRateCap) { mModulationCap = modulationCap; - mCoderateCap = coderateCap; + mCodeRateCap = codeRateCap; } /** @@ -39,8 +44,8 @@ public class IsdbsFrontendCapabilities extends FrontendCapabilities { /** * Gets code rate capability. */ - @IsdbsFrontendSettings.Coderate + @CodeRate public int getCodeRateCapability() { - return mCoderateCap; + return mCodeRateCap; } } diff --git a/media/java/android/media/tv/tuner/frontend/IsdbsFrontendSettings.java b/media/java/android/media/tv/tuner/frontend/IsdbsFrontendSettings.java index bb809bf8d455..97e59facc6d4 100644 --- a/media/java/android/media/tv/tuner/frontend/IsdbsFrontendSettings.java +++ b/media/java/android/media/tv/tuner/frontend/IsdbsFrontendSettings.java @@ -19,6 +19,7 @@ package android.media.tv.tuner.frontend; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.RequiresPermission; +import android.annotation.SystemApi; import android.content.Context; import android.hardware.tv.tuner.V1_0.Constants; import android.media.tv.tuner.TunerUtils; @@ -28,8 +29,10 @@ import java.lang.annotation.RetentionPolicy; /** * Frontend settings for ISDBS. + * * @hide */ +@SystemApi public class IsdbsFrontendSettings extends FrontendSettings { /** @hide */ @Retention(RetentionPolicy.SOURCE) @@ -81,11 +84,10 @@ public class IsdbsFrontendSettings extends FrontendSettings { /** @hide */ @IntDef(flag = true, prefix = "CODERATE_", - value = {CODERATE_UNDEFINED, CODERATE_AUTO, - CODERATE_1_2, CODERATE_2_3, CODERATE_3_4, - CODERATE_5_6, CODERATE_7_8}) + value = {CODERATE_UNDEFINED, CODERATE_AUTO, CODERATE_1_2, CODERATE_2_3, CODERATE_3_4, + CODERATE_5_6, CODERATE_7_8}) @Retention(RetentionPolicy.SOURCE) - public @interface Coderate {} + public @interface CodeRate {} /** * Code rate undefined. @@ -135,17 +137,17 @@ public class IsdbsFrontendSettings extends FrontendSettings { private final int mStreamId; private final int mStreamIdType; private final int mModulation; - private final int mCoderate; + private final int mCodeRate; private final int mSymbolRate; private final int mRolloff; private IsdbsFrontendSettings(int frequency, int streamId, int streamIdType, int modulation, - int coderate, int symbolRate, int rolloff) { + int codeRate, int symbolRate, int rolloff) { super(frequency); mStreamId = streamId; mStreamIdType = streamIdType; mModulation = modulation; - mCoderate = coderate; + mCodeRate = codeRate; mSymbolRate = symbolRate; mRolloff = rolloff; } @@ -173,9 +175,9 @@ public class IsdbsFrontendSettings extends FrontendSettings { /** * Gets Code rate. */ - @Coderate - public int getCoderate() { - return mCoderate; + @CodeRate + public int getCodeRate() { + return mCodeRate; } /** * Gets Symbol Rate in symbols per second. @@ -210,7 +212,7 @@ public class IsdbsFrontendSettings extends FrontendSettings { private int mStreamId; private int mStreamIdType; private int mModulation; - private int mCoderate; + private int mCodeRate; private int mSymbolRate; private int mRolloff; @@ -245,8 +247,8 @@ public class IsdbsFrontendSettings extends FrontendSettings { * Sets Code rate. */ @NonNull - public Builder setCoderate(@Coderate int coderate) { - mCoderate = coderate; + public Builder setCodeRate(@CodeRate int codeRate) { + mCodeRate = codeRate; return this; } /** @@ -272,7 +274,7 @@ public class IsdbsFrontendSettings extends FrontendSettings { @NonNull public IsdbsFrontendSettings build() { return new IsdbsFrontendSettings(mFrequency, mStreamId, mStreamIdType, mModulation, - mCoderate, mSymbolRate, mRolloff); + mCodeRate, mSymbolRate, mRolloff); } @Override diff --git a/media/java/android/media/tv/tuner/frontend/IsdbtFrontendCapabilities.java b/media/java/android/media/tv/tuner/frontend/IsdbtFrontendCapabilities.java index 19f04de6ef39..1956102d2b2d 100644 --- a/media/java/android/media/tv/tuner/frontend/IsdbtFrontendCapabilities.java +++ b/media/java/android/media/tv/tuner/frontend/IsdbtFrontendCapabilities.java @@ -16,23 +16,28 @@ package android.media.tv.tuner.frontend; +import android.annotation.SystemApi; +import android.media.tv.tuner.frontend.DvbtFrontendSettings.CodeRate; + /** * ISDBT Capabilities. + * * @hide */ +@SystemApi public class IsdbtFrontendCapabilities extends FrontendCapabilities { private final int mModeCap; private final int mBandwidthCap; private final int mModulationCap; - private final int mCoderateCap; + private final int mCodeRateCap; private final int mGuardIntervalCap; private IsdbtFrontendCapabilities(int modeCap, int bandwidthCap, int modulationCap, - int coderateCap, int guardIntervalCap) { + int codeRateCap, int guardIntervalCap) { mModeCap = modeCap; mBandwidthCap = bandwidthCap; mModulationCap = modulationCap; - mCoderateCap = coderateCap; + mCodeRateCap = codeRateCap; mGuardIntervalCap = guardIntervalCap; } @@ -60,9 +65,9 @@ public class IsdbtFrontendCapabilities extends FrontendCapabilities { /** * Gets code rate capability. */ - @DvbtFrontendSettings.Coderate + @CodeRate public int getCodeRateCapability() { - return mCoderateCap; + return mCodeRateCap; } /** * Gets guard interval capability. diff --git a/media/java/android/media/tv/tuner/frontend/IsdbtFrontendSettings.java b/media/java/android/media/tv/tuner/frontend/IsdbtFrontendSettings.java index 15101930e440..de3c80dda440 100644 --- a/media/java/android/media/tv/tuner/frontend/IsdbtFrontendSettings.java +++ b/media/java/android/media/tv/tuner/frontend/IsdbtFrontendSettings.java @@ -19,17 +19,21 @@ package android.media.tv.tuner.frontend; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.RequiresPermission; +import android.annotation.SystemApi; import android.content.Context; import android.hardware.tv.tuner.V1_0.Constants; import android.media.tv.tuner.TunerUtils; +import android.media.tv.tuner.frontend.DvbtFrontendSettings.CodeRate; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** * Frontend settings for ISDBT. + * * @hide */ +@SystemApi public class IsdbtFrontendSettings extends FrontendSettings { /** @hide */ @IntDef(flag = true, @@ -125,16 +129,18 @@ public class IsdbtFrontendSettings extends FrontendSettings { private final int mModulation; private final int mBandwidth; - private final int mCoderate; + private final int mMode; + private final int mCodeRate; private final int mGuardInterval; private final int mServiceAreaId; - private IsdbtFrontendSettings(int frequency, int modulation, int bandwidth, int coderate, - int guardInterval, int serviceAreaId) { + private IsdbtFrontendSettings(int frequency, int modulation, int bandwidth, int mode, + int codeRate, int guardInterval, int serviceAreaId) { super(frequency); mModulation = modulation; mBandwidth = bandwidth; - mCoderate = coderate; + mMode = mode; + mCodeRate = codeRate; mGuardInterval = guardInterval; mServiceAreaId = serviceAreaId; } @@ -154,11 +160,18 @@ public class IsdbtFrontendSettings extends FrontendSettings { return mBandwidth; } /** + * Gets ISDBT mode. + */ + @Mode + public int getMode() { + return mMode; + } + /** * Gets Code rate. */ - @DvbtFrontendSettings.Coderate - public int getCoderate() { - return mCoderate; + @CodeRate + public int getCodeRate() { + return mCodeRate; } /** * Gets Guard Interval. @@ -192,7 +205,8 @@ public class IsdbtFrontendSettings extends FrontendSettings { public static class Builder extends FrontendSettings.Builder<Builder> { private int mModulation; private int mBandwidth; - private int mCoderate; + private int mMode; + private int mCodeRate; private int mGuardInterval; private int mServiceAreaId; @@ -216,11 +230,19 @@ public class IsdbtFrontendSettings extends FrontendSettings { return this; } /** + * Sets ISDBT mode. + */ + @NonNull + public Builder setMode(@Mode int mode) { + mMode = mode; + return this; + } + /** * Sets Code rate. */ @NonNull - public Builder setCoderate(@DvbtFrontendSettings.Coderate int coderate) { - mCoderate = coderate; + public Builder setCodeRate(@CodeRate int codeRate) { + mCodeRate = codeRate; return this; } /** @@ -245,8 +267,8 @@ public class IsdbtFrontendSettings extends FrontendSettings { */ @NonNull public IsdbtFrontendSettings build() { - return new IsdbtFrontendSettings( - mFrequency, mModulation, mBandwidth, mCoderate, mGuardInterval, mServiceAreaId); + return new IsdbtFrontendSettings(mFrequency, mModulation, mBandwidth, mMode, mCodeRate, + mGuardInterval, mServiceAreaId); } @Override |