summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/system-current.txt4
-rw-r--r--core/java/android/hardware/radio/RadioManager.java38
-rw-r--r--services/core/jni/BroadcastRadio/convert.cpp8
3 files changed, 24 insertions, 26 deletions
diff --git a/api/system-current.txt b/api/system-current.txt
index 5e54177f5a63..f7a576e645f5 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -17386,7 +17386,7 @@ package android.hardware.radio {
method public java.lang.String getProduct();
method public java.lang.String getSerial();
method public java.lang.String getServiceName();
- method public java.lang.String getVendorExension();
+ method public java.lang.String getVendorInfo();
method public java.lang.String getVersion();
method public boolean isBackgroundScanningSupported();
method public boolean isCaptureSupported();
@@ -17403,7 +17403,7 @@ package android.hardware.radio {
method public android.hardware.radio.ProgramSelector getSelector();
method public int getSignalStrength();
method public deprecated int getSubChannel();
- method public java.lang.String getVendorExension();
+ method public java.lang.String getVendorInfo();
method public boolean isDigital();
method public boolean isLive();
method public boolean isMuted();
diff --git a/core/java/android/hardware/radio/RadioManager.java b/core/java/android/hardware/radio/RadioManager.java
index 764e1dcefe83..d5b72aa9ab21 100644
--- a/core/java/android/hardware/radio/RadioManager.java
+++ b/core/java/android/hardware/radio/RadioManager.java
@@ -136,14 +136,14 @@ public class RadioManager {
private final boolean mIsBgScanSupported;
private final Set<Integer> mSupportedProgramTypes;
private final Set<Integer> mSupportedIdentifierTypes;
- private final String mVendorExension;
+ private final String mVendorInfo;
ModuleProperties(int id, String serviceName, int classId, String implementor,
String product, String version, String serial, int numTuners, int numAudioSources,
boolean isCaptureSupported, BandDescriptor[] bands, boolean isBgScanSupported,
@ProgramSelector.ProgramType int[] supportedProgramTypes,
@ProgramSelector.IdentifierType int[] supportedIdentifierTypes,
- String vendorExension) {
+ String vendorInfo) {
mId = id;
mServiceName = TextUtils.isEmpty(serviceName) ? "default" : serviceName;
mClassId = classId;
@@ -158,7 +158,7 @@ public class RadioManager {
mIsBgScanSupported = isBgScanSupported;
mSupportedProgramTypes = arrayToSet(supportedProgramTypes);
mSupportedIdentifierTypes = arrayToSet(supportedIdentifierTypes);
- mVendorExension = vendorExension;
+ mVendorInfo = vendorInfo;
}
private static Set<Integer> arrayToSet(int[] arr) {
@@ -294,8 +294,8 @@ public class RadioManager {
* Client application MUST verify vendor/product name from the
* ModuleProperties class before doing any interpretation of this value.
*/
- public @NonNull String getVendorExension() {
- return mVendorExension == null ? "" : mVendorExension;
+ public @NonNull String getVendorInfo() {
+ return mVendorInfo == null ? "" : mVendorInfo;
}
/** List of descriptors for all bands supported by this module.
@@ -325,7 +325,7 @@ public class RadioManager {
mIsBgScanSupported = in.readInt() == 1;
mSupportedProgramTypes = arrayToSet(in.createIntArray());
mSupportedIdentifierTypes = arrayToSet(in.createIntArray());
- mVendorExension = in.readString();
+ mVendorInfo = in.readString();
}
public static final Parcelable.Creator<ModuleProperties> CREATOR
@@ -355,7 +355,7 @@ public class RadioManager {
dest.writeInt(mIsBgScanSupported ? 1 : 0);
dest.writeIntArray(setToArray(mSupportedProgramTypes));
dest.writeIntArray(setToArray(mSupportedIdentifierTypes));
- dest.writeString(mVendorExension);
+ dest.writeString(mVendorInfo);
}
@Override
@@ -392,7 +392,7 @@ public class RadioManager {
result = prime * result + (mIsCaptureSupported ? 1 : 0);
result = prime * result + Arrays.hashCode(mBands);
result = prime * result + (mIsBgScanSupported ? 1 : 0);
- result = prime * result + ((mVendorExension == null) ? 0 : mVendorExension.hashCode());
+ result = prime * result + ((mVendorInfo == null) ? 0 : mVendorInfo.hashCode());
return result;
}
@@ -438,8 +438,7 @@ public class RadioManager {
return false;
if (mIsBgScanSupported != other.isBackgroundScanningSupported())
return false;
- if (!TextUtils.equals(mVendorExension, other.mVendorExension))
- return false;
+ if (!TextUtils.equals(mVendorInfo, other.mVendorInfo)) return false;
return true;
}
}
@@ -1323,11 +1322,11 @@ public class RadioManager {
private final int mFlags;
private final int mSignalStrength;
private final RadioMetadata mMetadata;
- private final String mVendorExension;
+ private final String mVendorInfo;
ProgramInfo(@NonNull ProgramSelector selector, boolean tuned, boolean stereo,
boolean digital, int signalStrength, RadioMetadata metadata, int flags,
- String vendorExension) {
+ String vendorInfo) {
mSelector = selector;
mTuned = tuned;
mStereo = stereo;
@@ -1335,7 +1334,7 @@ public class RadioManager {
mFlags = flags;
mSignalStrength = signalStrength;
mMetadata = metadata;
- mVendorExension = vendorExension;
+ mVendorInfo = vendorInfo;
}
/**
@@ -1455,8 +1454,8 @@ public class RadioManager {
* Client application MUST verify vendor/product name from the
* ModuleProperties class before doing any interpretation of this value.
*/
- public @NonNull String getVendorExension() {
- return mVendorExension == null ? "" : mVendorExension;
+ public @NonNull String getVendorInfo() {
+ return mVendorInfo == null ? "" : mVendorInfo;
}
private ProgramInfo(Parcel in) {
@@ -1471,7 +1470,7 @@ public class RadioManager {
mMetadata = null;
}
mFlags = in.readInt();
- mVendorExension = in.readString();
+ mVendorInfo = in.readString();
}
public static final Parcelable.Creator<ProgramInfo> CREATOR
@@ -1499,7 +1498,7 @@ public class RadioManager {
mMetadata.writeToParcel(dest, flags);
}
dest.writeInt(mFlags);
- dest.writeString(mVendorExension);
+ dest.writeString(mVendorInfo);
}
@Override
@@ -1527,7 +1526,7 @@ public class RadioManager {
result = prime * result + mFlags;
result = prime * result + mSignalStrength;
result = prime * result + ((mMetadata == null) ? 0 : mMetadata.hashCode());
- result = prime * result + ((mVendorExension == null) ? 0 : mVendorExension.hashCode());
+ result = prime * result + ((mVendorInfo == null) ? 0 : mVendorInfo.hashCode());
return result;
}
@@ -1554,8 +1553,7 @@ public class RadioManager {
return false;
} else if (!mMetadata.equals(other.getMetadata()))
return false;
- if (!TextUtils.equals(mVendorExension, other.mVendorExension))
- return false;
+ if (!TextUtils.equals(mVendorInfo, other.mVendorInfo)) return false;
return true;
}
}
diff --git a/services/core/jni/BroadcastRadio/convert.cpp b/services/core/jni/BroadcastRadio/convert.cpp
index 2bc12e9e8fc1..a2e5643323f9 100644
--- a/services/core/jni/BroadcastRadio/convert.cpp
+++ b/services/core/jni/BroadcastRadio/convert.cpp
@@ -271,7 +271,7 @@ static JavaRef<jobject> ModulePropertiesFromHal(JNIEnv *env, const V1_0::Propert
auto jVersion = make_javastr(env, prop10.version);
auto jSerial = make_javastr(env, prop10.serial);
bool isBgScanSupported = prop11 ? prop11->supportsBackgroundScanning : false;
- auto jVendorExtension = prop11 ? make_javastr(env, prop11->vendorExension) : nullptr;
+ auto jVendorInfo = prop11 ? make_javastr(env, prop11->vendorInfo) : nullptr;
// ITU_1 is the default region just because its index is 0.
auto jBands = ArrayFromHal<V1_0::BandConfig>(env, prop10.bands, gjni.BandDescriptor.clazz,
std::bind(BandDescriptorFromHal, _1, _2, Region::ITU_1));
@@ -284,7 +284,7 @@ static JavaRef<jobject> ModulePropertiesFromHal(JNIEnv *env, const V1_0::Propert
gjni.ModuleProperties.cstor, moduleId, jServiceName.get(), prop10.classId,
jImplementor.get(), jProduct.get(), jVersion.get(), jSerial.get(), prop10.numTuners,
prop10.numAudioSources, prop10.supportsCapture, jBands.get(), isBgScanSupported,
- jSupportedProgramTypes.get(), jSupportedIdentifierTypes.get(), jVendorExtension.get()));
+ jSupportedProgramTypes.get(), jSupportedIdentifierTypes.get(), jVendorInfo.get()));
}
JavaRef<jobject> ModulePropertiesFromHal(JNIEnv *env, const V1_0::Properties &properties,
@@ -512,12 +512,12 @@ static JavaRef<jobject> ProgramInfoFromHal(JNIEnv *env, const V1_0::ProgramInfo
ALOGV("ProgramInfoFromHal()");
auto jMetadata = MetadataFromHal(env, info10.metadata);
- auto jVendorExtension = info11 ? make_javastr(env, info11->vendorExension) : nullptr;
+ auto jVendorInfo = info11 ? make_javastr(env, info11->vendorInfo) : nullptr;
auto jSelector = ProgramSelectorFromHal(env, selector);
return make_javaref(env, env->NewObject(gjni.ProgramInfo.clazz, gjni.ProgramInfo.cstor,
jSelector.get(), info10.tuned, info10.stereo, info10.digital, info10.signalStrength,
- jMetadata.get(), info11 ? info11->flags : 0, jVendorExtension.get()));
+ jMetadata.get(), info11 ? info11->flags : 0, jVendorInfo.get()));
}
JavaRef<jobject> ProgramInfoFromHal(JNIEnv *env, const V1_0::ProgramInfo &info, V1_0::Band band) {