/aosp14/frameworks/base/core/tests/BroadcastRadioTests/src/android/hardware/radio/ |
H A D | RadioManagerTest.java | 335 new RadioManager.AmBandDescriptor(REGION, RadioManager.BAND_AM, AM_LOWER_LIMIT, in equals_withAmBandDescriptorsOfDifferentUpperLimits_returnsFalse() 378 new RadioManager.AmBandDescriptor(REGION, RadioManager.BAND_AM, AM_LOWER_LIMIT, in hashCode_withAmBandDescriptorsOfDifferentSpacings_notEquals() 558 RadioManager.FmBandConfig.Builder builder = new RadioManager.FmBandConfig.Builder( in equals_withFmBandConfigsOfDifferentAfs_returnsFalse() 585 RadioManager.AmBandConfig amBandConfigCompared = new RadioManager.AmBandConfig( in equals_withAmBandConfigsOfDifferentTypes_returnsFalse() 595 RadioManager.AmBandConfig.Builder builder = new RadioManager.AmBandConfig.Builder( in equals_withAmBandConfigsOfDifferentStereoValues_returnsFalse() 621 RadioManager.FmBandConfig fmBandConfigCompared = new RadioManager.FmBandConfig( in hashCode_withFmBandConfigsOfDifferentTypes_notEquals() 632 RadioManager.AmBandConfig amBandConfigCompared = new RadioManager.AmBandConfig( in hashCode_withAmBandConfigsOfDifferentStereoSupports_notEquals() 633 new RadioManager.AmBandDescriptor(REGION, RadioManager.BAND_AM, AM_LOWER_LIMIT, in hashCode_withAmBandConfigsOfDifferentStereoSupports_notEquals() 821 RadioManager.ModuleProperties propertiesDab = new RadioManager.ModuleProperties( in equals_withModulePropertiesOfDifferentIds_returnsFalse() 1135 return new RadioManager.FmBandDescriptor(REGION, RadioManager.BAND_FM, FM_LOWER_LIMIT, in createFmBandDescriptor() [all …]
|
H A D | TunerAdapterTest.java | 84 RadioManager radioManager = new RadioManager(mContextMock, mRadioServiceMock); in setUp() 102 return RadioManager.STATUS_OK; in setUp() 151 RadioManager.BandConfig[] bandConfigs = new RadioManager.BandConfig[1]; in getConfiguration_forTunerAdapter() 163 RadioManager.BandConfig[] bandConfigs = new RadioManager.BandConfig[0]; in getConfiguration_withInvalidParameters_fails() 175 RadioManager.BandConfig[] bandConfigs = new RadioManager.BandConfig[1]; in getConfiguration_whenServiceDied_fails() 228 return RadioManager.STATUS_OK; in step_forTunerAdapter_succeeds() 450 RadioManager.ProgramInfo[] programInfoArray = new RadioManager.ProgramInfo[2]; in getProgramInfo_withInvalidInput_fails() 460 RadioManager.ProgramInfo[] programInfoArray = new RadioManager.ProgramInfo[1]; in getProgramInfo_beforeProgramInfoSetForTunerAdapter_fails() 472 RadioManager.ProgramInfo[] programInfoArray = new RadioManager.ProgramInfo[1]; in getProgramInfo_afterTuneForTunerAdapter() 795 return new RadioManager.FmBandConfig(new RadioManager.FmBandDescriptor( in createBandConfig() [all …]
|
H A D | DefaultRadioTunerTest.java | 41 public int setConfiguration(RadioManager.BandConfig config) { 46 public int getConfiguration(RadioManager.BandConfig[] config) { 87 public int getProgramInformation(RadioManager.ProgramInfo[] info) { 104 public List<RadioManager.ProgramInfo> getProgramList(
|
/aosp14/frameworks/base/core/java/android/hardware/radio/ |
H A D | TunerAdapter.java | 44 @RadioManager.Band 54 @RadioManager.Band int band) { in TunerAdapter() 91 return RadioManager.STATUS_OK; in setConfiguration() 108 return RadioManager.STATUS_OK; in getConfiguration() 126 return RadioManager.STATUS_OK; in setMute() 151 return RadioManager.STATUS_OK; in step() 166 return RadioManager.STATUS_OK; in scan() 181 return RadioManager.STATUS_OK; in seek() 202 return RadioManager.STATUS_OK; in tune() 225 return RadioManager.STATUS_OK; in cancel() [all …]
|
H A D | RadioTuner.java | 82 @RadioManager.RadioStatusType 83 public abstract int setConfiguration(RadioManager.BandConfig config); in setConfiguration() 104 @RadioManager.RadioStatusType 129 @RadioManager.RadioStatusType 166 @RadioManager.RadioStatusType 196 @RadioManager.RadioStatusType 224 @RadioManager.RadioStatusType 256 @RadioManager.RadioStatusType 295 @RadioManager.RadioStatusType 331 @RadioManager.RadioStatusType [all …]
|
H A D | TunerCallbackAdapter.java | 48 @Nullable List<RadioManager.ProgramInfo> mLastCompleteList; 54 @Nullable RadioManager.ProgramInfo mCurrentProgramInfo; 110 @Nullable List<RadioManager.ProgramInfo> getLastCompleteList() { in getLastCompleteList() 122 @Nullable RadioManager.ProgramInfo getCurrentProgramInformation() { in getCurrentProgramInformation() 150 case RadioManager.STATUS_PERMISSION_DENIED: in onTuneFailed() 151 case RadioManager.STATUS_DEAD_OBJECT: in onTuneFailed() 154 case RadioManager.STATUS_ERROR: in onTuneFailed() 155 case RadioManager.STATUS_NO_INIT: in onTuneFailed() 156 case RadioManager.STATUS_BAD_VALUE: in onTuneFailed() 157 case RadioManager.STATUS_INVALID_OPERATION: in onTuneFailed() [all …]
|
H A D | RadioManager.aidl | 20 parcelable RadioManager.BandConfig; 23 parcelable RadioManager.BandDescriptor; 26 parcelable RadioManager.ModuleProperties; 29 parcelable RadioManager.ProgramInfo;
|
H A D | ProgramSelector.java | 462 @RadioManager.Band int band, int frequencyKhz) { in createAmFmSelector() 499 @RadioManager.Band int band, int frequencyKhz, int subChannel) { in createAmFmSelector() 500 if (band == RadioManager.BAND_INVALID) { in createAmFmSelector() 503 band = (subChannel <= 0) ? RadioManager.BAND_AM : RadioManager.BAND_AM_HD; in createAmFmSelector() 505 band = (subChannel <= 0) ? RadioManager.BAND_FM : RadioManager.BAND_FM_HD; in createAmFmSelector() 509 boolean isAm = (band == RadioManager.BAND_AM || band == RadioManager.BAND_AM_HD); in createAmFmSelector() 510 boolean isDigital = (band == RadioManager.BAND_AM_HD || band == RadioManager.BAND_FM_HD); in createAmFmSelector() 511 if (!isAm && !isDigital && band != RadioManager.BAND_FM) { in createAmFmSelector()
|
H A D | IRadioService.aidl | 23 import android.hardware.radio.RadioManager; 31 List<RadioManager.ModuleProperties> listModules(); in listModules() 33 ITuner openTuner(int moduleId, in RadioManager.BandConfig bandConfig, boolean withAudio, in openTuner()
|
H A D | ITunerCallback.aidl | 21 import android.hardware.radio.RadioManager; 35 void onConfigurationChanged(in RadioManager.BandConfig config); in onConfigurationChanged() 36 void onCurrentProgramInfoChanged(in RadioManager.ProgramInfo info); in onCurrentProgramInfoChanged()
|
H A D | ProgramList.java | 48 private final Map<ProgramSelector.Identifier, RadioManager.ProgramInfo> mPrograms = 206 Iterator<Map.Entry<ProgramSelector.Identifier, RadioManager.ProgramInfo>> in apply() 209 RadioManager.ProgramInfo removed = programsIterator.next().getValue(); in apply() 244 private void putLocked(RadioManager.ProgramInfo value, in putLocked() 255 RadioManager.ProgramInfo removed = mPrograms.remove(Objects.requireNonNull(key)); in removeLocked() 266 public @NonNull List<RadioManager.ProgramInfo> toList() { in toList() 278 public @Nullable RadioManager.ProgramInfo get(@NonNull ProgramSelector.Identifier id) { in get() 461 private final @NonNull Set<RadioManager.ProgramInfo> mModified; 465 @Nullable Set<RadioManager.ProgramInfo> modified, in Chunk() 476 mModified = Utils.createSet(in, RadioManager.ProgramInfo.CREATOR); in Chunk() [all …]
|
H A D | ITuner.aidl | 22 import android.hardware.radio.RadioManager; 33 void setConfiguration(in RadioManager.BandConfig config); in setConfiguration() 35 RadioManager.BandConfig getConfiguration(); in getConfiguration()
|
/aosp14/frameworks/base/services/core/java/com/android/server/broadcastradio/hal2/ |
H A D | ProgramInfoCache.java | 23 import android.hardware.radio.RadioManager; 66 RadioManager.ProgramInfo... programInfos) { in ProgramInfoCache() 69 for (RadioManager.ProgramInfo programInfo : programInfos) { in ProgramInfoCache() 75 boolean programInfosAreExactly(RadioManager.ProgramInfo... programInfos) { in programInfosAreExactly() 77 for (RadioManager.ProgramInfo programInfo : programInfos) { in programInfosAreExactly() 139 Set<RadioManager.ProgramInfo> modified = new HashSet<>(); in filterAndUpdateFromInternal() 149 RadioManager.ProgramInfo newInfo = entry.getValue(); in filterAndUpdateFromInternal() 176 Set<RadioManager.ProgramInfo> modified = new HashSet<>(); in filterAndApplyChunkInternal() 178 for (RadioManager.ProgramInfo info : chunk.getModified()) { in filterAndApplyChunkInternal() 219 RadioManager.ProgramInfo oldInfo = mProgramInfoMap.get( in shouldIncludeInModified() [all …]
|
H A D | Convert.java | 37 import android.hardware.radio.RadioManager; 193 private static @NonNull RadioManager.BandDescriptor[] 195 if (config == null) return new RadioManager.BandDescriptor[0]; in amfmConfigToBands() 198 List<RadioManager.BandDescriptor> bands = new ArrayList<>(len); in amfmConfigToBands() 201 int region = RadioManager.REGION_ITU_1; in amfmConfigToBands() 210 bands.add(new RadioManager.FmBandDescriptor(region, RadioManager.BAND_FM, in amfmConfigToBands() 217 bands.add(new RadioManager.AmBandDescriptor(region, RadioManager.BAND_AM, in amfmConfigToBands() 235 static @NonNull RadioManager.ModuleProperties 245 return new RadioManager.ModuleProperties( in propertiesFromHal() 250 RadioManager.CLASS_AM_FM, in propertiesFromHal() [all …]
|
/aosp14/frameworks/base/services/core/java/com/android/server/broadcastradio/aidl/ |
H A D | ProgramInfoCache.java | 22 import android.hardware.radio.RadioManager; 80 RadioManager.ProgramInfo... programInfos) { in ProgramInfoCache() 89 List<RadioManager.ProgramInfo> toProgramInfoList() { in toProgramInfoList() 123 RadioManager.ProgramInfo programInfo = in updateFromHalProgramListChunk() 158 Set<RadioManager.ProgramInfo> modified = new ArraySet<>(); in filterAndUpdateFromInternal() 168 RadioManager.ProgramInfo newInfo = entry.getValue(); in filterAndUpdateFromInternal() 197 Set<RadioManager.ProgramInfo> modified = new ArraySet<>(); in filterAndApplyChunkInternal() 199 for (RadioManager.ProgramInfo info : chunk.getModified()) { in filterAndApplyChunkInternal() 236 private boolean shouldIncludeInModified(RadioManager.ProgramInfo newInfo) { in shouldIncludeInModified() 237 RadioManager.ProgramInfo oldInfo = mProgramInfoMap.get( in shouldIncludeInModified() [all …]
|
H A D | ConversionUtils.java | 38 import android.hardware.radio.RadioManager; 233 private static RadioManager.BandDescriptor[] amfmConfigToBands( in amfmConfigToBands() 236 return new RadioManager.BandDescriptor[0]; in amfmConfigToBands() 243 int region = RadioManager.REGION_ITU_1; in amfmConfigToBands() 252 bands.add(new RadioManager.FmBandDescriptor(region, RadioManager.BAND_FM, in amfmConfigToBands() 261 bands.add(new RadioManager.AmBandDescriptor(region, RadioManager.BAND_AM, in amfmConfigToBands() 271 return bands.toArray(RadioManager.BandDescriptor[]::new); in amfmConfigToBands() 295 return new RadioManager.ModuleProperties( in propertiesFromHalProperties() 300 RadioManager.CLASS_AM_FM, in propertiesFromHalProperties() 523 return new RadioManager.ProgramInfo( in programInfoFromHalProgramInfo() [all …]
|
/aosp14/frameworks/base/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/ |
H A D | ProgramInfoCacheTest.java | 23 import android.hardware.radio.RadioManager; 47 private final RadioManager.ProgramInfo mAmFmInfo = TestUtils.makeProgramInfo( 52 private final RadioManager.ProgramInfo mRdsInfo = TestUtils.makeProgramInfo( 86 RadioManager.ProgramInfo updatedRdsInfo = TestUtils.makeProgramInfo( in testUpdateFromHal() 168 RadioManager.ProgramInfo updatedRdsInfo = TestUtils.makeProgramInfo( in testDeltaUpdateChunksModificationsIncluded() 170 RadioManager.ProgramInfo newSxmInfo = TestUtils.makeProgramInfo( in testDeltaUpdateChunksModificationsIncluded() 205 RadioManager.ProgramInfo updatedRdsInfo = TestUtils.makeProgramInfo( in testDeltaUpdateChunksModificationsExcluded() 207 RadioManager.ProgramInfo newSxmInfo = TestUtils.makeProgramInfo( in testDeltaUpdateChunksModificationsExcluded() 253 HashSet<RadioManager.ProgramInfo> expectedSet = new HashSet<>(); in verifyChunkListModified() 254 for (RadioManager.ProgramInfo programInfo : expectedProgramInfos) { in verifyChunkListModified() [all …]
|
H A D | TestUtils.java | 23 import android.hardware.radio.RadioManager; 35 static RadioManager.ModuleProperties makeDefaultModuleProperties() { in makeDefaultModuleProperties() 36 return new RadioManager.ModuleProperties( in makeDefaultModuleProperties() 45 static RadioManager.ProgramInfo makeProgramInfo(ProgramSelector selector, in makeProgramInfo() 48 return new RadioManager.ProgramInfo(selector, in makeProgramInfo() 54 static RadioManager.ProgramInfo makeProgramInfo(ProgramSelector selector, int signalQuality) { in makeProgramInfo() 59 static RadioManager.ProgramInfo makeProgramInfo(int programType, in makeProgramInfo() 77 static ProgramInfo programInfoToHal(RadioManager.ProgramInfo info) { in programInfoToHal()
|
/aosp14/frameworks/base/services/core/java/com/android/server/broadcastradio/hal1/ |
H A D | Tuner.java | 26 import android.hardware.radio.RadioManager; 82 @NonNull RadioManager.BandConfig config); in nativeSetConfiguration() 83 private native RadioManager.BandConfig nativeGetConfiguration(long nativeContext, int region); in nativeGetConfiguration() 93 private native List<RadioManager.ProgramInfo> nativeGetProgramList(long nativeContext, in nativeGetProgramList() 130 public void setConfiguration(RadioManager.BandConfig config) { in setConfiguration() 146 public RadioManager.BandConfig getConfiguration() { in getConfiguration() 275 List<RadioManager.ProgramInfo> getProgramList(Map vendorFilter) { in getProgramList() 279 List<RadioManager.ProgramInfo> list = nativeGetProgramList(mNativeContext, sFilter); in getProgramList() 309 return flag == RadioManager.CONFIG_FORCE_ANALOG; in isConfigFlagSupported() 314 if (flag == RadioManager.CONFIG_FORCE_ANALOG) { in isConfigFlagSet() [all …]
|
H A D | BroadcastRadioService.java | 22 import android.hardware.radio.RadioManager; 49 private native List<RadioManager.ModuleProperties> nativeLoadModules(long nativeContext); in nativeLoadModules() 51 RadioManager.BandConfig config, boolean withAudio, ITunerCallback callback); in nativeOpenTuner() 53 public @NonNull List<RadioManager.ModuleProperties> loadModules() { in loadModules() 59 public ITuner openTuner(int moduleId, RadioManager.BandConfig bandConfig, in openTuner()
|
H A D | TunerCallback.java | 24 import android.hardware.radio.RadioManager; 114 public void onConfigurationChanged(RadioManager.BandConfig config) { in onConfigurationChanged() 120 public void onCurrentProgramInfoChanged(RadioManager.ProgramInfo info) { in onCurrentProgramInfoChanged() 159 List<RadioManager.ProgramInfo> modified; in sendProgramListUpdate() 166 Set<RadioManager.ProgramInfo> modifiedSet = modified.stream().collect(Collectors.toSet()); in sendProgramListUpdate()
|
/aosp14/frameworks/base/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/ |
H A D | AidlTestUtils.java | 26 import android.hardware.radio.RadioManager; 40 static RadioManager.ModuleProperties makeDefaultModuleProperties() { in makeDefaultModuleProperties() 41 return new RadioManager.ModuleProperties( in makeDefaultModuleProperties() 50 static RadioManager.ProgramInfo makeProgramInfo(ProgramSelector selector, in makeProgramInfo() 53 return new RadioManager.ProgramInfo(selector, in makeProgramInfo() 59 static RadioManager.ProgramInfo makeProgramInfo(ProgramSelector selector, int signalQuality) { in makeProgramInfo() 102 static ProgramInfo programInfoToHalProgramInfo(RadioManager.ProgramInfo info) { in programInfoToHalProgramInfo() 125 List<RadioManager.ProgramInfo> modified, List<ProgramSelector.Identifier> removed) { in makeHalChunk() 151 List<RadioManager.ProgramInfo> modified, in makeChunk() 153 ArraySet<RadioManager.ProgramInfo> modifiedSet = new ArraySet<>(); in makeChunk()
|
H A D | ConversionUtilsTest.java | 35 import android.hardware.radio.RadioManager; 123 private static final RadioManager.ModuleProperties MODULE_PROPERTIES = 225 RadioManager.BandDescriptor[] bands = MODULE_PROPERTIES.getBands(); in propertiesFromHalProperties_bandsMatch() 311 RadioManager.ProgramInfo programInfo = in programInfoFromHalProgramInfo_withValidProgramInfo() 335 RadioManager.ProgramInfo programInfo = in programInfoFromHalProgramInfo_withInvalidDabProgramInfo() 351 RadioManager.ProgramInfo dabInfo = in chunkFromHalProgramListChunk_withValidChunk() 409 RadioManager.ProgramInfo dabProgramInfo = AidlTestUtils.makeProgramInfo(TEST_DAB_SELECTOR, in programInfoMeetsSdkVersionRequirement_withLowerVersionId_returnsFalse() 419 RadioManager.ProgramInfo fmProgramInfo = AidlTestUtils.makeProgramInfo(TEST_FM_SELECTOR, in programInfoMeetsSdkVersionRequirement_withRequiredVersionId_returnsTrue() 431 RadioManager.ProgramInfo fmProgramInfo = AidlTestUtils.makeProgramInfo(TEST_FM_SELECTOR, in convertChunkToTargetSdkVersion_withLowerSdkVersion() 459 RadioManager.ProgramInfo fmProgramInfo = AidlTestUtils.makeProgramInfo(TEST_FM_SELECTOR, in convertChunkToTargetSdkVersion_withRequiredSdkVersion() [all …]
|
H A D | ProgramInfoCacheTest.java | 24 import android.hardware.radio.RadioManager; 49 private static final RadioManager.ProgramInfo TEST_FM_INFO = AidlTestUtils.makeProgramInfo( 53 private static final RadioManager.ProgramInfo TEST_FM_INFO_MODIFIED = 61 private static final RadioManager.ProgramInfo TEST_AM_INFO = AidlTestUtils.makeProgramInfo( 69 private static final RadioManager.ProgramInfo TEST_RDS_INFO = AidlTestUtils.makeProgramInfo( 84 private static final RadioManager.ProgramInfo TEST_DAB_INFO = AidlTestUtils.makeProgramInfo( 93 private static final RadioManager.ProgramInfo TEST_VENDOR_INFO = AidlTestUtils.makeProgramInfo( 371 int maxModifiedPerChunk, RadioManager.ProgramInfo... expectedProgramInfos) { in verifyChunkListModified() 378 ArraySet<RadioManager.ProgramInfo> actualSet = new ArraySet<>(); in verifyChunkListModified() 380 Set<RadioManager.ProgramInfo> chunkModified = chunks.get(i).getModified(); in verifyChunkListModified()
|
/aosp14/frameworks/base/services/core/java/com/android/server/broadcastradio/ |
H A D | IRadioServiceHidlImpl.java | 26 import android.hardware.radio.RadioManager; 60 private final List<RadioManager.ModuleProperties> mV1Modules; 66 OptionalInt max = mV1Modules.stream().mapToInt(RadioManager.ModuleProperties::getId).max(); in IRadioServiceHidlImpl() 84 public List<RadioManager.ModuleProperties> listModules() { in listModules() 86 Collection<RadioManager.ModuleProperties> v2Modules = mHal2.listModules(); in listModules() 87 List<RadioManager.ModuleProperties> modules; in listModules() 97 public ITuner openTuner(int moduleId, RadioManager.BandConfig bandConfig, in openTuner()
|