/aosp12/packages/apps/Car/libs/car-broadcastradio-support/src/com/android/car/broadcastradio/support/platform/ |
H A D | ProgramSelectorExt.java | 22 import android.hardware.radio.ProgramSelector; 23 import android.hardware.radio.ProgramSelector.Identifier; 104 return new ProgramSelector( in newProgramSelector() 120 case ProgramSelector.IDENTIFIER_TYPE_RDS_PI: in identifierToProgramType() 121 return ProgramSelector.PROGRAM_TYPE_FM; in identifierToProgramType() 130 case ProgramSelector.IDENTIFIER_TYPE_DAB_SCID: in identifierToProgramType() 132 return ProgramSelector.PROGRAM_TYPE_DAB; in identifierToProgramType() 135 return ProgramSelector.PROGRAM_TYPE_DRMO; in identifierToProgramType() 138 return ProgramSelector.PROGRAM_TYPE_SXM; in identifierToProgramType() 144 return ProgramSelector.PROGRAM_TYPE_INVALID; in identifierToProgramType() [all …]
|
/aosp12/frameworks/base/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/ |
H A D | ProgramInfoCacheTest.java | 22 import android.hardware.radio.ProgramSelector; 43 private final ProgramSelector.Identifier mAmFmIdentifier = 44 new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY, 88500); 48 private final ProgramSelector.Identifier mRdsIdentifier = 49 new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_RDS_PI, 15019); 54 new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_DAB_ENSEMBLE, 1337); 59 new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_VENDOR_START, 9001); 169 ProgramSelector.PROGRAM_TYPE_SXM, in testDeltaUpdateChunksModificationsIncluded() 170 new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_SXM_CHANNEL, 12345), in testDeltaUpdateChunksModificationsIncluded() 206 ProgramSelector.PROGRAM_TYPE_SXM, in testDeltaUpdateChunksModificationsExcluded() [all …]
|
H A D | StartProgramListUpdatesFanoutTest.java | 34 import android.hardware.radio.ProgramSelector; 77 private final ProgramSelector.Identifier mAmFmIdentifier = 78 new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY, 88500); 80 ProgramSelector.PROGRAM_TYPE_FM, mAmFmIdentifier, 0); 82 ProgramSelector.PROGRAM_TYPE_FM, mAmFmIdentifier, 1); 84 private final ProgramSelector.Identifier mRdsIdentifier = 85 new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_RDS_PI, 15019); 87 ProgramSelector.PROGRAM_TYPE_FM, mRdsIdentifier, 0); 89 private final ProgramSelector.Identifier mDabEnsembleIdentifier = 90 new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_DAB_ENSEMBLE, 1337); [all …]
|
H A D | TestUtils.java | 19 import android.hardware.radio.ProgramSelector; 27 ProgramSelector.Identifier identifier, int signalQuality) { in makeProgramInfo() 29 return new RadioManager.ProgramInfo(new ProgramSelector(programType, identifier, null, in makeProgramInfo()
|
/aosp12/frameworks/base/services/core/java/com/android/server/broadcastradio/hal2/ |
H A D | Convert.java | 36 import android.hardware.radio.ProgramSelector; 115 @ProgramSelector.IdentifierType int idType) { in identifierTypeToProgramType() 118 case ProgramSelector.IDENTIFIER_TYPE_RDS_PI: in identifierTypeToProgramType() 120 return ProgramSelector.PROGRAM_TYPE_FM; in identifierTypeToProgramType() 128 return ProgramSelector.PROGRAM_TYPE_DAB; in identifierTypeToProgramType() 134 return ProgramSelector.PROGRAM_TYPE_SXM; in identifierTypeToProgramType() 140 return ProgramSelector.PROGRAM_TYPE_INVALID; in identifierTypeToProgramType() 247 @NonNull ProgramSelector.Identifier id) { in programIdentifierToHal() 253 @NonNull ProgramSelector.Identifier id) { in programIdentifierToHal() 266 @NonNull ProgramSelector sel) { in programSelectorToHal() [all …]
|
H A D | ProgramInfoCache.java | 22 import android.hardware.radio.ProgramSelector; 48 private final Map<ProgramSelector.Identifier, RadioManager.ProgramInfo> mProgramInfoMap = 141 for (Map.Entry<ProgramSelector.Identifier, RadioManager.ProgramInfo> entry in filterAndUpdateFromInternal() 143 ProgramSelector.Identifier id = entry.getKey(); in filterAndUpdateFromInternal() 156 for (ProgramSelector.Identifier rem : removed) { in filterAndUpdateFromInternal() 177 Set<ProgramSelector.Identifier> removed = new HashSet<>(); in filterAndApplyChunkInternal() 179 ProgramSelector.Identifier id = info.getSelector().getPrimaryId(); in filterAndApplyChunkInternal() 186 for (ProgramSelector.Identifier id : chunk.getRemoved()) { in filterAndApplyChunkInternal() 200 private boolean passesFilter(ProgramSelector.Identifier id) { in passesFilter() 258 Iterator<ProgramSelector.Identifier> removedIter = null; in buildChunks() [all …]
|
/aosp12/hardware/interfaces/broadcastradio/common/utils2x/include/broadcastradio-utils-2x/ |
H A D | Utils.h | 51 explicit IdentifierIterator(const V2_0::ProgramSelector& sel); 62 explicit IdentifierIterator(const V2_0::ProgramSelector& sel, size_t pos); 64 std::reference_wrapper<const V2_0::ProgramSelector> mSel; 66 const V2_0::ProgramSelector& sel() const { return mSel.get(); } in sel() 92 bool tunesTo(const V2_0::ProgramSelector& pointer, const V2_0::ProgramSelector& channel); 94 bool hasId(const V2_0::ProgramSelector& sel, const V2_0::IdentifierType type); 125 bool isValid(const V2_0::ProgramSelector& sel); 128 V2_0::ProgramSelector make_selector_amfm(uint32_t frequency); 129 V2_0::ProgramSelector make_selector_dab(uint32_t sidExt, uint32_t ensemble); 157 utils::IdentifierIterator begin(const ProgramSelector& sel); [all …]
|
/aosp12/hardware/interfaces/broadcastradio/common/utils1x/ |
H A D | Utils.cpp | 31 using V1_1::ProgramSelector; 46 static bool bothHaveId(const ProgramSelector& a, const ProgramSelector& b, in bothHaveId() 51 static bool anyHaveId(const ProgramSelector& a, const ProgramSelector& b, in anyHaveId() 56 static bool haveEqualIds(const ProgramSelector& a, const ProgramSelector& b, in haveEqualIds() 65 bool tunesTo(const ProgramSelector& a, const ProgramSelector& b) { in tunesTo() 103 ProgramType getType(const ProgramSelector& sel) { in getType() 146 bool hasId(const ProgramSelector& sel, const IdentifierType type) { in hasId() 150 uint64_t getId(const ProgramSelector& sel, const IdentifierType type) { in getId() 166 ProgramSelector make_selector(Band band, uint32_t channel, uint32_t subChannel) { in make_selector() 167 ProgramSelector sel = {}; in make_selector() [all …]
|
/aosp12/hardware/interfaces/broadcastradio/common/utils1x/include/broadcastradio-utils-1x/ |
H A D | Utils.h | 44 bool tunesTo(const V1_1::ProgramSelector& pointer, const V1_1::ProgramSelector& channel); 46 V1_1::ProgramType getType(const V1_1::ProgramSelector& sel); 52 bool hasId(const V1_1::ProgramSelector& sel, const V1_1::IdentifierType type); 59 uint64_t getId(const V1_1::ProgramSelector& sel, const V1_1::IdentifierType type); 66 uint64_t getId(const V1_1::ProgramSelector& sel, const V1_1::IdentifierType type, uint64_t defval); 68 V1_1::ProgramSelector make_selector(V1_0::Band band, uint32_t channel, uint32_t subChannel = 0); 70 bool getLegacyChannel(const V1_1::ProgramSelector& sel, uint32_t* channelOut, 73 bool isDigital(const V1_1::ProgramSelector& sel);
|
/aosp12/hardware/interfaces/broadcastradio/common/utils2x/ |
H A D | Utils.cpp | 34 using V2_0::ProgramSelector; 94 static bool bothHaveId(const ProgramSelector& a, const ProgramSelector& b, in bothHaveId() 99 static bool haveEqualIds(const ProgramSelector& a, const ProgramSelector& b, in haveEqualIds() 108 static int getHdSubchannel(const ProgramSelector& sel) { in getHdSubchannel() 114 bool tunesTo(const ProgramSelector& a, const ProgramSelector& b) { in tunesTo() 283 bool isValid(const ProgramSelector& sel) { in isValid() 296 ProgramSelector make_selector_amfm(uint32_t frequency) { in make_selector_amfm() 297 ProgramSelector sel = {}; in make_selector_amfm() 303 ProgramSelector sel = {}; in make_selector_dab() 421 utils::IdentifierIterator begin(const ProgramSelector& sel) { in begin() [all …]
|
/aosp12/frameworks/base/core/java/android/hardware/radio/ |
H A D | ProgramSelector.java | 62 public final class ProgramSelector implements Parcelable { class 390 return new ProgramSelector( in withSecondaryPreferred() 406 public static @NonNull ProgramSelector createAmFmSelector( in createAmFmSelector() 508 if (!(obj instanceof ProgramSelector)) return false; in equals() 509 ProgramSelector other = (ProgramSelector) obj; in equals() 515 private ProgramSelector(Parcel in) { in ProgramSelector() method in ProgramSelector 539 new Parcelable.Creator<ProgramSelector>() { 540 public ProgramSelector createFromParcel(Parcel in) { 541 return new ProgramSelector(in); 544 public ProgramSelector[] newArray(int size) { [all …]
|
H A D | ProgramList.java | 62 public void onItemChanged(@NonNull ProgramSelector.Identifier id) { } in onItemChanged() 67 public void onItemRemoved(@NonNull ProgramSelector.Identifier id) { } in onItemRemoved() 197 ProgramSelector.Identifier key = value.getSelector().getPrimaryId(); in putLocked() 199 ProgramSelector.Identifier sel = value.getSelector().getPrimaryId(); in putLocked() 203 private void removeLocked(@NonNull ProgramSelector.Identifier key) { in removeLocked() 238 private final @NonNull Set<ProgramSelector.Identifier> mIdentifiers; 254 @NonNull Set<ProgramSelector.Identifier> identifiers, in Filter() 348 public @NonNull Set<ProgramSelector.Identifier> getIdentifiers() { in getIdentifiers() 411 private final @NonNull Set<ProgramSelector.Identifier> mRemoved; 415 @Nullable Set<ProgramSelector.Identifier> removed) { in Chunk() [all …]
|
H A D | RadioManager.java | 228 @ProgramSelector.ProgramType int[] supportedProgramTypes, in ModuleProperties() 1418 @NonNull private final ProgramSelector mSelector; 1428 public ProgramInfo(@NonNull ProgramSelector selector, in ProgramInfo() 1429 @Nullable ProgramSelector.Identifier logicallyTunedTo, in ProgramInfo() 1430 @Nullable ProgramSelector.Identifier physicallyTunedTo, in ProgramInfo() 1454 public @NonNull ProgramSelector getSelector() { in getSelector() 1470 public @Nullable ProgramSelector.Identifier getLogicallyTunedTo() { in getLogicallyTunedTo() 1526 ProgramSelector.IDENTIFIER_TYPE_HD_SUBCHANNEL) + 1; in getSubChannel() 1553 ProgramSelector.Identifier id = mLogicallyTunedTo; in isDigital() 1557 return (type != ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY in isDigital() [all …]
|
H A D | Announcement.java | 81 @NonNull private final ProgramSelector mSelector; 86 public Announcement(@NonNull ProgramSelector selector, @Type int type, in Announcement() 94 mSelector = in.readTypedObject(ProgramSelector.CREATOR); in Announcement() 122 public @NonNull ProgramSelector getSelector() { in getSelector()
|
/aosp12/hardware/interfaces/broadcastradio/common/tests/ |
H A D | IdentifierIterator_test.cpp | 26 using V2_0::ProgramSelector; 30 V2_0::ProgramSelector sel { in TEST() 47 V2_0::ProgramSelector sel{}; in TEST() 57 V2_0::ProgramSelector sel1{}; in TEST() 58 V2_0::ProgramSelector sel2{}; in TEST() 67 V2_0::ProgramSelector sel{{}, {{}, {}}}; in TEST() 89 V2_0::ProgramSelector sel { in TEST() 124 V2_0::ProgramSelector sel{{}, {{}, {}, {}}}; in TEST()
|
/aosp12/packages/apps/Car/Radio/src/com/android/car/radio/storage/ |
H A D | RadioStorage.java | 21 import android.hardware.radio.ProgramSelector; 90 @NonNull ProgramSelector selector) { in isFavorite() 99 public boolean isFavorite(@NonNull ProgramSelector selector) { in isFavorite() 116 private class RemoveFavoriteTask extends AsyncTask<ProgramSelector, Void, Void> { 118 protected Void doInBackground(ProgramSelector... selectors) { in doInBackground() 144 public void removeFavorite(@NonNull ProgramSelector favorite) { in removeFavorite() 153 public void setRecentlySelected(@NonNull ProgramSelector sel) { in setRecentlySelected() 186 public @Nullable ProgramSelector getRecentlySelected(@Nullable ProgramType pt) { in getRecentlySelected()
|
H A D | IdentifierEntity.java | 19 import android.hardware.radio.ProgramSelector; 20 import android.hardware.radio.ProgramSelector.IdentifierType; 38 IdentifierEntity(@NonNull ProgramSelector.Identifier id) { in IdentifierEntity() 43 public boolean sameAs(@Nullable ProgramSelector.Identifier id) { in sameAs()
|
H A D | ProgramSelectorConverter.java | 19 import android.hardware.radio.ProgramSelector; 32 public static ProgramSelector toSelector(@NonNull String uri) { in toSelector() 38 public static String toString(@NonNull ProgramSelector sel) { in toString()
|
H A D | Favorite.java | 19 import android.hardware.radio.ProgramSelector; 38 public final ProgramSelector selector; 43 Favorite(@NonNull IdentifierEntity primaryId, @NonNull ProgramSelector selector, in Favorite()
|
/aosp12/frameworks/base/services/core/jni/BroadcastRadio/ |
H A D | convert.cpp | 49 using V1_1::ProgramSelector; 140 } ProgramSelector; member 553 gjni.ProgramSelector.Identifier.cstor, id.type, id.value)); in ProgramIdentifierFromHal() 560 gjni.ProgramSelector.Identifier.clazz, ProgramIdentifierFromHal); in ProgramSelectorFromHal() 563 return make_javaref(env, env->NewObject(gjni.ProgramSelector.clazz, gjni.ProgramSelector.cstor, in ProgramSelectorFromHal() 571 id.type = env->GetIntField(jId, gjni.ProgramSelector.Identifier.type); in ProgramIdentifierToHal() 572 id.value = env->GetLongField(jId, gjni.ProgramSelector.Identifier.value); in ProgramIdentifierToHal() 576 ProgramSelector ProgramSelectorToHal(JNIEnv *env, jobject jSelector) { in ProgramSelectorToHal() 579 ProgramSelector selector = {}; in ProgramSelectorToHal() 587 env->GetObjectField(jSelector, gjni.ProgramSelector.vendorIds)); in ProgramSelectorToHal() [all …]
|
/aosp12/packages/apps/Car/libs/car-broadcastradio-support/src/com/android/car/broadcastradio/support/ |
H A D | Program.java | 22 import android.hardware.radio.ProgramSelector; 38 private final @NonNull ProgramSelector mSelector; 41 public Program(@NonNull ProgramSelector selector, @NonNull String name) { in Program() 46 public @NonNull ProgramSelector getSelector() { in getSelector() 89 mSelector = Objects.requireNonNull(in.readTypedObject(ProgramSelector.CREATOR)); in Program()
|
/aosp12/packages/apps/Car/Radio/src/com/android/car/radio/bands/ |
H A D | ProgramType.java | 19 import android.hardware.radio.ProgramSelector; 121 public static @Nullable ProgramType fromSelector(@Nullable ProgramSelector sel) { in fromSelector() 125 if (priType == ProgramSelector.IDENTIFIER_TYPE_DAB_SID_EXT) { in fromSelector() 131 if (!ProgramSelectorExt.hasId(sel, ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY)) { in fromSelector() 136 long freq = sel.getFirstId(ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY); in fromSelector() 158 public abstract ProgramSelector parseDigits(int leadingDigits); in parseDigits()
|
/aosp12/packages/apps/Car/Radio/src/com/android/car/radio/platform/ |
H A D | RadioTunerExt.java | 21 import android.hardware.radio.ProgramSelector; 52 @Nullable private ProgramSelector mOperationSelector; // null for seek operations 149 public void tune(@NonNull ProgramSelector selector, @Nullable TuneCallback resultCb) { in tune() 199 private boolean isMatching(@NonNull ProgramSelector currentOperation, in isMatching() 200 @NonNull ProgramSelector event) { in isMatching() 201 ProgramSelector.Identifier pri = currentOperation.getPrimaryId(); in isMatching() 216 private void onTuneFailed(int result, @Nullable ProgramSelector selector) { in onTuneFailed()
|
/aosp12/packages/apps/Car/Radio/src/com/android/car/radio/ |
H A D | BrowseAdapter.java | 19 import android.hardware.radio.ProgramSelector; 65 void onItemClicked(ProgramSelector selector); in onItemClicked() 124 Map<ProgramSelector.Identifier, ProgramInfo> liveMap = programs.stream().collect( in setProgramList() 130 ProgramSelector.Identifier id = entry.program.getSelector().getPrimaryId(); in setProgramList() 168 Map<ProgramSelector.Identifier, Program> favMap = favorites.stream().collect( in onFavoritesChanged() 173 ProgramSelector.Identifier id = entry.program.getSelector().getPrimaryId(); in onFavoritesChanged()
|
H A D | DisplayController.java | 21 import android.hardware.radio.ProgramSelector; 68 private @Nullable ProgramSelector mDisplayedChannel; 208 public void setChannel(@Nullable ProgramSelector sel) { in setChannel() 216 || !ProgramSelectorExt.hasId(sel, ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY)) { in setChannel() 225 .getFirstId(ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY); in setChannel() 226 int toFreq = (int) sel.getFirstId(ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY); in setChannel()
|