Loading api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -2741,6 +2741,7 @@ package android.hardware.radio { method public int describeContents(); method @android.hardware.radio.ProgramSelector.IdentifierType public int getType(); method public long getValue(); method public boolean isCategoryType(); method public void writeToParcel(android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.hardware.radio.ProgramSelector.Identifier> CREATOR; } Loading core/java/android/hardware/radio/ProgramList.java +2 −0 Original line number Diff line number Diff line Loading @@ -352,6 +352,8 @@ public final class ProgramList implements AutoCloseable { /** * Checks, if non-tunable entries that define tree structure on the * program list (i.e. DAB ensembles) should be included. * * @see {@link ProgramSelector.Identifier#isCategory()} */ public boolean areCategoriesIncluded() { return mIncludeCategories; Loading core/java/android/hardware/radio/ProgramSelector.java +13 −0 Original line number Diff line number Diff line Loading @@ -580,6 +580,19 @@ public final class ProgramSelector implements Parcelable { return mType; } /** * Returns whether this Identifier's type is considered a category when filtering * ProgramLists for category entries. * * @see {@link ProgramList.Filter#areCategoriesIncluded()} * @return False if this identifier's type is not tuneable (e.g. DAB ensemble or * vendor-specified type). True otherwise. */ public boolean isCategoryType() { return (mType >= IDENTIFIER_TYPE_VENDOR_START && mType <= IDENTIFIER_TYPE_VENDOR_END) || mType == IDENTIFIER_TYPE_DAB_ENSEMBLE; } /** * Value of an identifier. * Loading core/java/android/hardware/radio/RadioMetadata.java +18 −0 Original line number Diff line number Diff line Loading @@ -257,6 +257,24 @@ public final class RadioMetadata implements Parcelable { private final Bundle mBundle; @Override public boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof RadioMetadata)) return false; Bundle otherBundle = ((RadioMetadata) obj).mBundle; if (!mBundle.keySet().equals(otherBundle.keySet())) { return false; } for (String key : mBundle.keySet()) { // This logic will return a false negative if we ever put Bundles into mBundle. As of // 2019-04-09, we only put ints, Strings, and Parcelables in, so it's fine for now. if (!mBundle.get(key).equals(otherBundle.get(key))) { return false; } } return true; } RadioMetadata() { mBundle = new Bundle(); } Loading core/tests/BroadcastRadioTests/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ android_test { "compatibility-device-util-axt", "androidx.test.rules", "testng", "services.core", ], libs: ["android.test.base"], srcs: ["src/**/*.java"], Loading Loading
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -2741,6 +2741,7 @@ package android.hardware.radio { method public int describeContents(); method @android.hardware.radio.ProgramSelector.IdentifierType public int getType(); method public long getValue(); method public boolean isCategoryType(); method public void writeToParcel(android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.hardware.radio.ProgramSelector.Identifier> CREATOR; } Loading
core/java/android/hardware/radio/ProgramList.java +2 −0 Original line number Diff line number Diff line Loading @@ -352,6 +352,8 @@ public final class ProgramList implements AutoCloseable { /** * Checks, if non-tunable entries that define tree structure on the * program list (i.e. DAB ensembles) should be included. * * @see {@link ProgramSelector.Identifier#isCategory()} */ public boolean areCategoriesIncluded() { return mIncludeCategories; Loading
core/java/android/hardware/radio/ProgramSelector.java +13 −0 Original line number Diff line number Diff line Loading @@ -580,6 +580,19 @@ public final class ProgramSelector implements Parcelable { return mType; } /** * Returns whether this Identifier's type is considered a category when filtering * ProgramLists for category entries. * * @see {@link ProgramList.Filter#areCategoriesIncluded()} * @return False if this identifier's type is not tuneable (e.g. DAB ensemble or * vendor-specified type). True otherwise. */ public boolean isCategoryType() { return (mType >= IDENTIFIER_TYPE_VENDOR_START && mType <= IDENTIFIER_TYPE_VENDOR_END) || mType == IDENTIFIER_TYPE_DAB_ENSEMBLE; } /** * Value of an identifier. * Loading
core/java/android/hardware/radio/RadioMetadata.java +18 −0 Original line number Diff line number Diff line Loading @@ -257,6 +257,24 @@ public final class RadioMetadata implements Parcelable { private final Bundle mBundle; @Override public boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof RadioMetadata)) return false; Bundle otherBundle = ((RadioMetadata) obj).mBundle; if (!mBundle.keySet().equals(otherBundle.keySet())) { return false; } for (String key : mBundle.keySet()) { // This logic will return a false negative if we ever put Bundles into mBundle. As of // 2019-04-09, we only put ints, Strings, and Parcelables in, so it's fine for now. if (!mBundle.get(key).equals(otherBundle.get(key))) { return false; } } return true; } RadioMetadata() { mBundle = new Bundle(); } Loading
core/tests/BroadcastRadioTests/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ android_test { "compatibility-device-util-axt", "androidx.test.rules", "testng", "services.core", ], libs: ["android.test.base"], srcs: ["src/**/*.java"], Loading