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

Commit 284bd018 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk Committed by Android (Google) Code Review
Browse files

Merge "Add AM/FM check for BandDescriptor."

parents 2817fd1a 2880b9a1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -17242,6 +17242,8 @@ package android.hardware.radio {
    method public int getSpacing();
    method public int getType();
    method public int getUpperLimit();
    method public boolean isAmBand();
    method public boolean isFmBand();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.hardware.radio.RadioManager.BandDescriptor> CREATOR;
  }
+19 −0
Original line number Diff line number Diff line
@@ -431,6 +431,25 @@ public class RadioManager {
        public int getType() {
            return mType;
        }

        /**
         * Checks if the band is either AM or AM_HD.
         *
         * @return {@code true}, if band is AM or AM_HD.
         */
        public boolean isAmBand() {
            return mType == BAND_AM || mType == BAND_AM_HD;
        }

        /**
         * Checks if the band is either FM or FM_HD.
         *
         * @return {@code true}, if band is FM or FM_HD.
         */
        public boolean isFmBand() {
            return mType == BAND_FM || mType == BAND_FM_HD;
        }

        /** Lower band limit expressed in units according to band type.
         * Currently all defined band types express channels as frequency in kHz
         * @return the lower band limit.