Merge changes from topic "audio-v5"
* changes:
Audio V5: move Stream Metadata to common
Audio HAL V5: Introduce HAL V5, equal to V4 for now
diff --git a/gnss/2.0/Android.bp b/gnss/2.0/Android.bp
index 39fe97d..6a06bf4 100644
--- a/gnss/2.0/Android.bp
+++ b/gnss/2.0/Android.bp
@@ -8,14 +8,17 @@
},
srcs: [
"IGnss.hal",
+ "IGnssCallback.hal",
"IGnssMeasurement.hal",
"IGnssMeasurementCallback.hal",
],
interfaces: [
+ "android.hardware.gnss.measurement_corrections@1.0",
"android.hardware.gnss@1.0",
"android.hardware.gnss@1.1",
"android.hidl.base@1.0",
],
gen_java: true,
+ gen_java_constants: true,
}
diff --git a/gnss/2.0/IGnss.hal b/gnss/2.0/IGnss.hal
index a05f61a..55621e5 100644
--- a/gnss/2.0/IGnss.hal
+++ b/gnss/2.0/IGnss.hal
@@ -16,12 +16,24 @@
package android.hardware.gnss@2.0;
+import android.hardware.gnss.measurement_corrections@1.0::IMeasurementCorrections;
import @1.1::IGnss;
+import IGnssCallback;
import IGnssMeasurement;
/** Represents the standard GNSS (Global Navigation Satellite System) interface. */
interface IGnss extends @1.1::IGnss {
+ /**
+ * Opens the interface and provides the callback routines to the implementation of this
+ * interface.
+ *
+ * @param callback Callback interface for IGnss.
+ *
+ * @return success Returns true on success.
+ */
+ setCallback_2_0(IGnssCallback callback) generates (bool success);
+
/**
* This method returns the IGnssMeasurement interface.
*
@@ -31,4 +43,12 @@
* @return gnssMeasurementIface Handle to the IGnssMeasurement interface.
*/
getExtensionGnssMeasurement_2_0() generates (IGnssMeasurement gnssMeasurementIface);
+
+ /**
+ * This method returns the IMeasurementCorrections interface.
+ *
+ * @return measurementCorrectionsIface Handle to the IMeasurementCorrections interface.
+ */
+ getExtensionMeasurementCorrections()
+ generates (IMeasurementCorrections measurementCorrectionsIface);
};
\ No newline at end of file
diff --git a/gnss/2.0/IGnssCallback.hal b/gnss/2.0/IGnssCallback.hal
new file mode 100644
index 0000000..1cdd2c0
--- /dev/null
+++ b/gnss/2.0/IGnssCallback.hal
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.gnss@2.0;
+
+import @1.0::IGnssCallback;
+import @1.1::IGnssCallback;
+
+/**
+ * The interface is required for the HAL to communicate certain information
+ * like status and location info back to the platform, the platform implements
+ * the interfaces and passes a handle to the HAL.
+ */
+interface IGnssCallback extends @1.1::IGnssCallback {
+
+ /** Flags for the gnssSetCapabilities callback. */
+ @export(name="", value_prefix="GPS_CAPABILITY_")
+ enum Capabilities : @1.0::IGnssCallback.Capabilities {
+ /** GNSS supports line-of-sight satellite identification measurement Corrections */
+ MEASUREMENT_CORRECTIONS_LOS_SATS = 1 << 8,
+ /** GNSS supports per satellite excess-path-length measurement Corrections */
+ MEASUREMENT_CORRECTIONS_EXCESS_PATH_LENGTH = 1 << 10,
+ /** GNSS supports reflecting planes measurement Corrections */
+ MEASUREMENT_CORRECTIONS_REFLECTING_PLANE = 1 << 20
+ };
+
+ /**
+ * Callback to inform framework of the GNSS engine's capabilities.
+ *
+ * @param capabilities Capability parameter is a bit field of the Capabilities enum.
+ */
+ gnssSetCapabilitiesCb_2_0(bitfield<Capabilities> capabilities);
+
+};
\ No newline at end of file
diff --git a/gnss/2.0/default/Android.bp b/gnss/2.0/default/Android.bp
index 3c55578..bec8260 100644
--- a/gnss/2.0/default/Android.bp
+++ b/gnss/2.0/default/Android.bp
@@ -30,6 +30,7 @@
"libutils",
"liblog",
"android.hardware.gnss@2.0",
+ "android.hardware.gnss.measurement_corrections@1.0",
"android.hardware.gnss@1.0",
"android.hardware.gnss@1.1",
],
diff --git a/gnss/2.0/default/Gnss.cpp b/gnss/2.0/default/Gnss.cpp
index 1170f73..e21fb17 100644
--- a/gnss/2.0/default/Gnss.cpp
+++ b/gnss/2.0/default/Gnss.cpp
@@ -25,7 +25,8 @@
namespace V2_0 {
namespace implementation {
-sp<V1_1::IGnssCallback> Gnss::sGnssCallback = nullptr;
+sp<V2_0::IGnssCallback> Gnss::sGnssCallback_2_0 = nullptr;
+sp<V1_1::IGnssCallback> Gnss::sGnssCallback_1_1 = nullptr;
// Methods from V1_0::IGnss follow.
Return<bool> Gnss::setCallback(const sp<V1_0::IGnssCallback>&) {
@@ -128,23 +129,23 @@
return false;
}
- sGnssCallback = callback;
+ sGnssCallback_1_1 = callback;
uint32_t capabilities = 0x0;
- auto ret = sGnssCallback->gnssSetCapabilitesCb(capabilities);
+ auto ret = sGnssCallback_1_1->gnssSetCapabilitesCb(capabilities);
if (!ret.isOk()) {
ALOGE("%s: Unable to invoke callback", __func__);
}
V1_1::IGnssCallback::GnssSystemInfo gnssInfo = {.yearOfHw = 2019};
- ret = sGnssCallback->gnssSetSystemInfoCb(gnssInfo);
+ ret = sGnssCallback_1_1->gnssSetSystemInfoCb(gnssInfo);
if (!ret.isOk()) {
ALOGE("%s: Unable to invoke callback", __func__);
}
auto gnssName = "Google Mock GNSS Implementation v2.0";
- ret = sGnssCallback->gnssNameCb(gnssName);
+ ret = sGnssCallback_1_1->gnssNameCb(gnssName);
if (!ret.isOk()) {
ALOGE("%s: Unable to invoke callback", __func__);
}
@@ -180,6 +181,43 @@
return sp<V2_0::IGnssMeasurement>{};
}
+Return<sp<measurement_corrections::V1_0::IMeasurementCorrections>>
+Gnss::getExtensionMeasurementCorrections() {
+ // TODO implement
+ return sp<measurement_corrections::V1_0::IMeasurementCorrections>{};
+}
+
+Return<bool> Gnss::setCallback_2_0(const sp<V2_0::IGnssCallback>& callback) {
+ ALOGD("Gnss::setCallback_2_0");
+ if (callback == nullptr) {
+ ALOGE("%s: Null callback ignored", __func__);
+ return false;
+ }
+
+ sGnssCallback_2_0 = callback;
+
+ uint32_t capabilities = 0x0;
+ auto ret = sGnssCallback_2_0->gnssSetCapabilitesCb(capabilities);
+ if (!ret.isOk()) {
+ ALOGE("%s: Unable to invoke callback", __func__);
+ }
+
+ V1_1::IGnssCallback::GnssSystemInfo gnssInfo = {.yearOfHw = 2019};
+
+ ret = sGnssCallback_2_0->gnssSetSystemInfoCb(gnssInfo);
+ if (!ret.isOk()) {
+ ALOGE("%s: Unable to invoke callback", __func__);
+ }
+
+ auto gnssName = "Google Mock GNSS Implementation v2.0";
+ ret = sGnssCallback_2_0->gnssNameCb(gnssName);
+ if (!ret.isOk()) {
+ ALOGE("%s: Unable to invoke callback", __func__);
+ }
+
+ return true;
+}
+
} // namespace implementation
} // namespace V2_0
} // namespace gnss
diff --git a/gnss/2.0/default/Gnss.h b/gnss/2.0/default/Gnss.h
index 17e439f..7f14513 100644
--- a/gnss/2.0/default/Gnss.h
+++ b/gnss/2.0/default/Gnss.h
@@ -73,9 +73,13 @@
// Methods from V2_0::IGnss follow.
Return<sp<V2_0::IGnssMeasurement>> getExtensionGnssMeasurement_2_0() override;
+ Return<bool> setCallback_2_0(const sp<V2_0::IGnssCallback>& callback) override;
+ Return<sp<measurement_corrections::V1_0::IMeasurementCorrections>>
+ getExtensionMeasurementCorrections() override;
private:
- static sp<V1_1::IGnssCallback> sGnssCallback;
+ static sp<V2_0::IGnssCallback> sGnssCallback_2_0;
+ static sp<V1_1::IGnssCallback> sGnssCallback_1_1;
};
} // namespace implementation
@@ -84,4 +88,4 @@
} // namespace hardware
} // namespace android
-#endif // ANDROID_HARDWARE_GNSS_V2_0_GNSS_H
+#endif // ANDROID_HARDWARE_GNSS_V2_0_GNSS_H
\ No newline at end of file
diff --git a/gnss/2.0/vts/functional/Android.bp b/gnss/2.0/vts/functional/Android.bp
index 7db142f..894716d 100644
--- a/gnss/2.0/vts/functional/Android.bp
+++ b/gnss/2.0/vts/functional/Android.bp
@@ -23,6 +23,7 @@
"VtsHalGnssV2_0TargetTest.cpp",
],
static_libs: [
+ "android.hardware.gnss.measurement_corrections@1.0",
"android.hardware.gnss@1.0",
"android.hardware.gnss@1.1",
"android.hardware.gnss@2.0",
diff --git a/gnss/measurement_corrections/1.0/Android.bp b/gnss/measurement_corrections/1.0/Android.bp
new file mode 100644
index 0000000..237b008
--- /dev/null
+++ b/gnss/measurement_corrections/1.0/Android.bp
@@ -0,0 +1,25 @@
+// This file is autogenerated by hidl-gen -Landroidbp.
+
+hidl_interface {
+ name: "android.hardware.gnss.measurement_corrections@1.0",
+ root: "android.hardware",
+ vndk: {
+ enabled: true,
+ },
+ srcs: [
+ "types.hal",
+ "IMeasurementCorrections.hal",
+ ],
+ interfaces: [
+ "android.hardware.gnss@1.0",
+ "android.hidl.base@1.0",
+ ],
+ types: [
+ "GnssSingleSatCorrectionFlags",
+ "MeasurementCorrections",
+ "ReflectingPlane",
+ "SingleSatCorrection",
+ ],
+ gen_java: true,
+}
+
diff --git a/gnss/measurement_corrections/1.0/IMeasurementCorrections.hal b/gnss/measurement_corrections/1.0/IMeasurementCorrections.hal
new file mode 100644
index 0000000..934d10f
--- /dev/null
+++ b/gnss/measurement_corrections/1.0/IMeasurementCorrections.hal
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.gnss.measurement_corrections@1.0;
+
+/**
+ * Interface for measurement corrections support.
+ */
+interface IMeasurementCorrections {
+
+ /**
+ * Injects measurement corrections to be used by the HAL to improve the GNSS location output.
+ *
+ * These are NOT to be used to adjust the IGnssMeasurementCallback output values -
+ * those remain raw, uncorrected measurements.
+ *
+ * In general, these are injected when conditions defined by the platform are met, such as when
+ * GNSS Location is being requested at a sufficiently high accuracy, based on the capabilities
+ * of the GNSS chipset as reported in the IGnssCallback.
+ *
+ * @param corrections The computed corrections to be used by the HAL.
+ *
+ * @return success Whether the HAL can accept & use these corrections.
+ */
+ setCorrections(MeasurementCorrections corrections) generates (bool success);
+};
diff --git a/gnss/measurement_corrections/1.0/types.hal b/gnss/measurement_corrections/1.0/types.hal
new file mode 100644
index 0000000..192bec9
--- /dev/null
+++ b/gnss/measurement_corrections/1.0/types.hal
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.gnss.measurement_corrections@1.0;
+
+import android.hardware.gnss@1.0::GnssConstellationType;
+
+/**
+ * A struct with measurement corrections for a single visible satellites
+ *
+ * The bit mask singleSatCorrectionFlags indicates which correction values are valid in the struct
+ */
+struct SingleSatCorrection {
+
+ /** Contains GnssSingleSatCorrectionFlags bits. */
+ bitfield<GnssSingleSatCorrectionFlags> singleSatCorrectionFlags;
+
+ /**
+ * Defines the constellation of the given satellite.
+ */
+ GnssConstellationType constellation;
+
+ /**
+ * Satellite vehicle ID number, as defined in GnssSvInfo::svid
+ */
+ uint16_t svid;
+
+ /**
+ * Carrier frequency of the signal to be corrected, for example it can be the
+ * GPS center frequency for L1 = 1,575,420,000 Hz, varying GLO channels, etc.
+ *
+ * For a receiver with capabilities to track multiple frequencies for the same satellite,
+ * multiple corrections for the same satellite may be provided.
+ */
+ float carrierFrequencyHz;
+
+ /** True if the satellite is in Line-of-Sight condition */
+ bool satIsLos;
+
+ /**
+ * Excess path length to be subtracted from pseudorange before using it in calculating location.
+ *
+ * Note this value is NOT to be used to adjust the GnssMeasurementCallback outputs.
+ */
+ float excessPathLengthMeters;
+
+ /** Error estimate (1-sigma) for the Excess path length estimate */
+ float excessPathLengthUncertaintyMeters;
+
+ /** Defines the reflecting plane location and azimuth information */
+ ReflectingPlane reflectingPlance;
+};
+
+/**
+ * A struct containing a set of measurement corrections for all used GNSS satellites at the location
+ * specified by latitudeDegrees, longitudeDegrees, altitudeMeters and at the time of week specified
+ * toaGpsNanosecondsOfWeek
+ */
+struct MeasurementCorrections {
+ /** Represents latitude in degrees. */
+ double latitudeDegrees;
+
+ /** Represents longitude in degrees. */
+ double longitudeDegrees;
+
+ /**
+ * Represents altitude in meters above the WGS 84 reference ellipsoid.
+ */
+ double altitudeMeters;
+
+ /** Time Of Applicability, GPS time of week */
+ uint64_t toaGpsNanosecondsOfWeek;
+
+ /**
+ * A set of SingleSatCorrection each containing measurement corrections for a satellite in view
+ */
+ vec<SingleSatCorrection> satCorrections;
+};
+
+/**
+ * A struct containing the location and azimuth of the reflecting plane that the satellite signal
+ * has bounced from.
+ *
+ * This field is set only if the signal has bounced only once.
+ */
+struct ReflectingPlane {
+ /** Represents latitude of the reflecting plane in degrees. */
+ double latitudeDegrees;
+
+ /** Represents longitude of the reflecting plane in degrees. */
+ double longitudeDegrees;
+
+ /**
+ * Represents altitude of the reflecting plane in meters above the WGS 84 reference ellipsoid.
+ */
+ double altitudeMeters;
+
+ /** Represents azimuth clockwise from north of the reflecting plane in degrees. */
+ double azimuthDegrees;
+};
+
+/** Bit mask to indicate which values are valid in a SingleSatCorrection object. */
+enum GnssSingleSatCorrectionFlags : uint16_t {
+ /** GnssSingleSatCorrectionFlags has valid satellite-is-line-of-sight field. */
+ HAS_SAT_IS_LOS = 0x0001,
+ /** GnssSingleSatCorrectionFlags has valid Excess Path Length field. */
+ HAS_EXCESS_PATH_LENGTH = 0x0002,
+ /** GnssSingleSatCorrectionFlags has valid Excess Path Length Uncertainty field. */
+ HAS_EXCESS_PATH_LENGTH_UNC = 0x0004,
+ /** GnssSingleSatCorrectionFlags has valid Reflecting Plane field. */
+ HAS_REFLECTING_PLANE = 0x0008
+};
\ No newline at end of file
diff --git a/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp b/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp
index 802d018..d2703cb 100644
--- a/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp
+++ b/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp
@@ -36,6 +36,7 @@
namespace generated_tests {
using ::android::hardware::neuralnetworks::V1_0::implementation::ExecutionCallback;
using ::android::hardware::neuralnetworks::V1_0::implementation::PreparedModelCallback;
+using ::test_helper::bool8;
using ::test_helper::compare;
using ::test_helper::expectMultinomialDistributionWithinTolerance;
using ::test_helper::filter;
@@ -65,7 +66,8 @@
copy_back_<uint8_t>(dst, ra, src);
copy_back_<int16_t>(dst, ra, src);
copy_back_<_Float16>(dst, ra, src);
- static_assert(5 == std::tuple_size<MixedTyped>::value,
+ copy_back_<bool8>(dst, ra, src);
+ static_assert(6 == std::tuple_size<MixedTyped>::value,
"Number of types in MixedTyped changed, but copy_back function wasn't updated");
}
diff --git a/neuralnetworks/1.2/types.hal b/neuralnetworks/1.2/types.hal
index fe9b312..f196792 100644
--- a/neuralnetworks/1.2/types.hal
+++ b/neuralnetworks/1.2/types.hal
@@ -42,16 +42,27 @@
TENSOR_QUANT16_SYMM = 7,
/** A tensor of 16 bit floating point values. */
TENSOR_FLOAT16 = 8,
+ /**
+ * A tensor of 8 bit boolean values.
+ *
+ * Values of this operand type are either true or false. A zero value
+ * represents false; any other value represents true.
+ */
+ TENSOR_BOOL8 = 9,
+ /* ADDING A NEW FUNDAMENTAL TYPE REQUIRES UPDATING THE VALUE OF
+ * OperandTypeRange::OPERAND_FUNDAMENTAL_MAX.
+ */
+ /* ADDING A NEW OEM TYPE REQUIRES UPDATING THE VALUE OF
+ * OperandTypeRange::OPERAND_OEM_MAX.
+ */
};
/**
- * The range of values in the OperandType enum.
- *
- * THE MAX VALUES MUST BE UPDATED WHEN ADDING NEW TYPES to the OperandType enum.
+ * The range of operand values in the OperandType enum.
*/
enum OperandTypeRange : uint32_t {
OPERAND_FUNDAMENTAL_MIN = 0,
- OPERAND_FUNDAMENTAL_MAX = 8,
+ OPERAND_FUNDAMENTAL_MAX = 9,
OPERAND_OEM_MIN = 10000,
OPERAND_OEM_MAX = 10001,
};
@@ -115,16 +126,20 @@
ROTATED_BBOX_TRANSFORM = 87,
ABS = 88,
ROI_POOLING = 89,
+ /* ADDING A NEW FUNDAMENTAL OPERATION REQUIRES UPDATING THE VALUE OF
+ * OperationTypeRange::OPERATION_FUNDAMENTAL_MAX.
+ */
+ /* ADDING A NEW OEM OPERATION REQUIRES UPDATING THE VALUE OF
+ * OperationTypeRange::OPERATION_OEM_MAX.
+ */
};
/**
* The range of values in the OperationType enum.
- *
- * THE MAX VALUES MUST BE UPDATED WHEN ADDING NEW TYPES to the OperationType enum.
*/
enum OperationTypeRange : uint32_t {
OPERATION_FUNDAMENTAL_MIN = 0,
- OPERATION_FUNDAMENTAL_MAX = 87,
+ OPERATION_FUNDAMENTAL_MAX = 89,
OPERATION_OEM_MIN = 10000,
OPERATION_OEM_MAX = 10000,
};
diff --git a/neuralnetworks/1.2/vts/functional/ValidateModel.cpp b/neuralnetworks/1.2/vts/functional/ValidateModel.cpp
index c4f1b5e..294415b 100644
--- a/neuralnetworks/1.2/vts/functional/ValidateModel.cpp
+++ b/neuralnetworks/1.2/vts/functional/ValidateModel.cpp
@@ -301,8 +301,9 @@
for (const Operation& operation : model.operations) {
// Skip mutateOperationOperandTypeTest for the following operations.
// - LSH_PROJECTION's second argument is allowed to have any type.
- // - ARGMIN and ARGMAX's first argument can be any of TENSOR_(FLOAT32|INT32|QUANT8_ASYMM).
- // - CAST's argument can be any of TENSOR_(FLOAT32|INT32|QUANT8_ASYMM).
+ // - ARGMIN and ARGMAX's first argument can be any of
+ // TENSOR_(FLOAT16|FLOAT32|INT32|QUANT8_ASYMM).
+ // - CAST's argument can be any of TENSOR_(FLOAT16|FLOAT32|INT32|QUANT8_ASYMM).
switch (operation.type) {
case OperationType::LSH_PROJECTION: {
if (operand == operation.inputs[1]) {
@@ -312,8 +313,8 @@
case OperationType::CAST:
case OperationType::ARGMAX:
case OperationType::ARGMIN: {
- if (type == OperandType::TENSOR_FLOAT32 || type == OperandType::TENSOR_INT32 ||
- type == OperandType::TENSOR_QUANT8_ASYMM) {
+ if (type == OperandType::TENSOR_FLOAT16 || type == OperandType::TENSOR_FLOAT32 ||
+ type == OperandType::TENSOR_INT32 || type == OperandType::TENSOR_QUANT8_ASYMM) {
return true;
}
} break;
diff --git a/power/stats/1.0/IPowerStats.hal b/power/stats/1.0/IPowerStats.hal
index 75c6a72..74ceb8f 100644
--- a/power/stats/1.0/IPowerStats.hal
+++ b/power/stats/1.0/IPowerStats.hal
@@ -105,9 +105,9 @@
* consumption.
*
* @return powerEntityInfos List of information on each PowerEntity
- * @return status SUCCESS on success or NOT_SUPPORTED if
- * feature is not enabled or FILESYSTEM_ERROR on filesystem nodes
- * access error.
+ * @return status SUCCESS on success, NOT_SUPPORTED if feature is not
+ * enabled, FILESYSTEM_ERROR if there was an error accessing the
+ * filesystem.
*/
getPowerEntityInfo()
generates(vec<PowerEntityInfo> powerEntityInfos, Status status);
@@ -123,12 +123,11 @@
* information for all PowerEntity(s) pass an empty vector.
*
* @return powerEntityStateSpaces PowerEntity state space information for
- * each specified PowerEntity.
- * @return status SUCCESS if powerEntityStateInfos contains state space
- * information for at least one PowerEntity, NOT_SUPPORTED if feature
- * is not enabled, INVALID_INPUT if no requested PowerEntity(s)
- * provide state space information, FILESYSTEM_ERROR if no state space
- * information is returned due to filesystem errors.
+ * each specified PowerEntity that provides state space information.
+ * @return status SUCCESS on success, NOT_SUPPORTED if feature is not
+ * enabled, FILESYSTEM_ERROR if there was an error accessing the
+ * filesystem, INVALID_INPUT if any requested PowerEntity(s) do not
+ * provide state space information and there was not a filesystem error.
*/
getPowerEntityStateInfo(vec<uint32_t> powerEntityIds)
generates(vec<PowerEntityStateSpace> powerEntityStateSpaces,
@@ -148,13 +147,12 @@
* residency data is requested. PowerEntity name to ID mapping may
* be queried from getPowerEntityInfo(). To get state residency
* data for all PowerEntity(s) pass an empty vector.
- * @return stateResidencyResults state residency data for the
- * specified powerEntity(s)
- * @return status SUCCESS if stateResidencyResults contains residency
- * data for at least one PowerEntity, NOT_SUPPORTED if
- * feature is not enabled, INVALID_INPUT if no requested
- * PowerEntity(s) provide state residency data, FILESYSTEM_ERROR
- * if no data is returned due to filesystem errors.
+ * @return stateResidencyResults state residency data for each specified
+ * PowerEntity that provides state residency data.
+ * @return status SUCCESS on success, NOT_SUPPORTED if feature is not
+ * enabled, FILESYSTEM_ERROR if there was an error accessing the
+ * filesystem, INVALID_INPUT if any requested PowerEntity(s) do not
+ * provide state residency data and there was not a filesystem error.
*/
getPowerEntityStateResidencyData(vec<uint32_t> powerEntityIds)
generates(vec<PowerEntityStateResidencyResult> stateResidencyResults,
diff --git a/power/stats/1.0/types.hal b/power/stats/1.0/types.hal
index 986a6bb..644224b 100644
--- a/power/stats/1.0/types.hal
+++ b/power/stats/1.0/types.hal
@@ -69,19 +69,18 @@
* given PowerEntity.
*/
struct PowerEntityInfo {
- /** ID corresponding to the PowerEntity */
+ /** Unique ID corresponding to the PowerEntity */
uint32_t powerEntityId;
- /**
- * Name of the PowerEntity. This is unique and opaque to the
- * Android framework
- */
+ /** Name of the PowerEntity */
string powerEntityName;
/** Type of the PowerEntity */
PowerEntityType type;
};
struct PowerEntityStateInfo {
- /** ID corresponding to the state */
+ /**
+ * ID corresponding to the state. Unique for a given PowerEntityStateSpace
+ */
uint32_t powerEntityStateId;
/** Name of the state */
string powerEntityStateName;
@@ -93,7 +92,7 @@
* PowerEntity provides residency data for.
*/
struct PowerEntityStateSpace {
- /** ID of the corresponding PowerEntity */
+ /** Unique ID of the corresponding PowerEntity */
uint32_t powerEntityId;
/** List of states that the PowerEntity may reside in */
@@ -102,7 +101,7 @@
/** Contains residency data for a single state */
struct PowerEntityStateResidencyData {
- /** ID of the corresponding PowerEntityStateInfo */
+ /** Unique ID of the corresponding PowerEntityStateInfo */
uint32_t powerEntityStateId;
/**
* Total time in milliseconds that the corresponding PowerEntity resided
@@ -122,7 +121,7 @@
};
struct PowerEntityStateResidencyResult {
- /** ID of the corresponding PowerEntity */
+ /** Unique ID of the corresponding PowerEntity */
uint32_t powerEntityId;
/** Residency data for each state the PowerEntity's state space */
vec<PowerEntityStateResidencyData> stateResidencyData;
diff --git a/power/stats/1.0/vts/functional/VtsHalPowerStatsV1_0TargetTest.cpp b/power/stats/1.0/vts/functional/VtsHalPowerStatsV1_0TargetTest.cpp
index 1a1230b..9f007e4 100644
--- a/power/stats/1.0/vts/functional/VtsHalPowerStatsV1_0TargetTest.cpp
+++ b/power/stats/1.0/vts/functional/VtsHalPowerStatsV1_0TargetTest.cpp
@@ -40,6 +40,9 @@
using android::hardware::Void;
using android::hardware::power::stats::V1_0::EnergyData;
using android::hardware::power::stats::V1_0::IPowerStats;
+using android::hardware::power::stats::V1_0::PowerEntityInfo;
+using android::hardware::power::stats::V1_0::PowerEntityStateResidencyResult;
+using android::hardware::power::stats::V1_0::PowerEntityStateSpace;
using android::hardware::power::stats::V1_0::RailInfo;
using android::hardware::power::stats::V1_0::Status;
@@ -68,9 +71,281 @@
virtual void TearDown() override {}
+ void getInfos(hidl_vec<PowerEntityInfo>& infos);
+ void getStateSpaces(hidl_vec<PowerEntityStateSpace>& stateSpaces,
+ const std::vector<uint32_t>& ids);
+ void getResidencyResults(hidl_vec<PowerEntityStateResidencyResult>& results,
+ const std::vector<uint32_t>& ids);
+ void getRandomIds(std::vector<uint32_t>& ids);
+
sp<IPowerStats> service_;
};
+void PowerStatsHidlTest::getInfos(hidl_vec<PowerEntityInfo>& infos) {
+ Status status;
+ Return<void> ret = service_->getPowerEntityInfo([&status, &infos](auto rInfos, auto rStatus) {
+ status = rStatus;
+ infos = rInfos;
+ });
+ ASSERT_TRUE(ret.isOk());
+
+ if (status == Status::SUCCESS) {
+ ASSERT_NE(infos.size(), 0) << "powerEntityInfos must have entries if supported";
+ } else {
+ ASSERT_EQ(status, Status::NOT_SUPPORTED);
+ ASSERT_EQ(infos.size(), 0);
+ LOG(INFO) << "getPowerEntityInfo not supported";
+ }
+}
+
+void PowerStatsHidlTest::getStateSpaces(hidl_vec<PowerEntityStateSpace>& stateSpaces,
+ const std::vector<uint32_t>& ids = {}) {
+ Status status;
+ Return<void> ret = service_->getPowerEntityStateInfo(
+ ids, [&status, &stateSpaces](auto rStateSpaces, auto rStatus) {
+ status = rStatus;
+ stateSpaces = rStateSpaces;
+ });
+ ASSERT_TRUE(ret.isOk());
+
+ if (status == Status::SUCCESS) {
+ ASSERT_NE(stateSpaces.size(), 0) << "powerEntityStateSpaces must have entries if supported";
+ } else {
+ ASSERT_EQ(status, Status::NOT_SUPPORTED);
+ ASSERT_EQ(stateSpaces.size(), 0);
+ LOG(INFO) << "getPowerEntityStateInfo not supported";
+ }
+}
+
+void PowerStatsHidlTest::getResidencyResults(hidl_vec<PowerEntityStateResidencyResult>& results,
+ const std::vector<uint32_t>& ids = {}) {
+ Status status;
+ Return<void> ret = service_->getPowerEntityStateResidencyData(
+ ids, [&status, &results](auto rResults, auto rStatus) {
+ status = rStatus;
+ results = rResults;
+ });
+ ASSERT_TRUE(ret.isOk());
+
+ if (status == Status::SUCCESS) {
+ ASSERT_NE(results.size(), 0);
+ } else {
+ ASSERT_EQ(status, Status::NOT_SUPPORTED);
+ ASSERT_EQ(results.size(), 0);
+ LOG(INFO) << "getPowerEntityStateResidencyData not supported";
+ }
+}
+
+void PowerStatsHidlTest::getRandomIds(std::vector<uint32_t>& ids) {
+ hidl_vec<PowerEntityStateSpace> stateSpaces;
+ getStateSpaces(stateSpaces);
+
+ if (stateSpaces.size() == 0) {
+ return;
+ }
+
+ for (auto stateSpace : stateSpaces) {
+ ids.push_back(stateSpace.powerEntityId);
+ }
+
+ unsigned seed = std::chrono::system_clock::now().time_since_epoch().count();
+ auto gen = std::default_random_engine(seed);
+ std::uniform_int_distribution<uint32_t> dist(1, stateSpaces.size());
+
+ std::shuffle(ids.begin(), ids.end(), gen);
+ ids.resize(dist(gen));
+}
+
+// Each PowerEntity must have a valid name
+TEST_F(PowerStatsHidlTest, ValidatePowerEntityNames) {
+ hidl_vec<PowerEntityInfo> infos;
+ getInfos(infos);
+ for (auto info : infos) {
+ ASSERT_NE(info.powerEntityName, "");
+ }
+}
+
+// Each PowerEntity must have a unique ID
+TEST_F(PowerStatsHidlTest, ValidatePowerEntityIds) {
+ hidl_vec<PowerEntityInfo> infos;
+ getInfos(infos);
+
+ set<uint32_t> ids;
+ for (auto info : infos) {
+ ASSERT_TRUE(ids.insert(info.powerEntityId).second);
+ }
+}
+
+// Each PowerEntityStateSpace must have an associated PowerEntityInfo
+TEST_F(PowerStatsHidlTest, ValidateStateInfoAssociation) {
+ hidl_vec<PowerEntityInfo> infos;
+ getInfos(infos);
+
+ hidl_vec<PowerEntityStateSpace> stateSpaces;
+ getStateSpaces(stateSpaces);
+
+ std::set<uint32_t> ids;
+ for (auto info : infos) {
+ ids.insert(info.powerEntityId);
+ }
+
+ for (auto stateSpace : stateSpaces) {
+ ASSERT_NE(ids.count(stateSpace.powerEntityId), 0);
+ }
+}
+
+// Each state must have a valid name
+TEST_F(PowerStatsHidlTest, ValidateStateNames) {
+ hidl_vec<PowerEntityStateSpace> stateSpaces;
+ getStateSpaces(stateSpaces);
+
+ for (auto stateSpace : stateSpaces) {
+ for (auto state : stateSpace.states) {
+ ASSERT_NE(state.powerEntityStateName, "");
+ }
+ }
+}
+
+// Each state must have an ID that is unique to the PowerEntityStateSpace
+TEST_F(PowerStatsHidlTest, ValidateStateUniqueIds) {
+ hidl_vec<PowerEntityStateSpace> stateSpaces;
+ getStateSpaces(stateSpaces);
+
+ for (auto stateSpace : stateSpaces) {
+ set<uint32_t> stateIds;
+ for (auto state : stateSpace.states) {
+ ASSERT_TRUE(stateIds.insert(state.powerEntityStateId).second);
+ }
+ }
+}
+
+// getPowerEntityStateInfo must support passing in requested IDs
+// Results must contain state space information for all requested IDs
+TEST_F(PowerStatsHidlTest, ValidateStateInfoAssociationSelect) {
+ std::vector<uint32_t> randomIds;
+ getRandomIds(randomIds);
+
+ if (randomIds.empty()) {
+ return;
+ }
+
+ hidl_vec<PowerEntityStateSpace> stateSpaces;
+ getStateSpaces(stateSpaces, randomIds);
+
+ ASSERT_EQ(stateSpaces.size(), randomIds.size());
+
+ std::set<uint32_t> ids;
+ for (auto id : randomIds) {
+ ids.insert(id);
+ }
+ for (auto stateSpace : stateSpaces) {
+ ASSERT_NE(ids.count(stateSpace.powerEntityId), 0);
+ }
+}
+
+// Requested state space info must match initially obtained stateinfos
+TEST_F(PowerStatsHidlTest, ValidateStateInfoSelect) {
+ hidl_vec<PowerEntityStateSpace> stateSpaces;
+ getStateSpaces(stateSpaces);
+ if (stateSpaces.size() == 0) {
+ return;
+ }
+
+ std::vector<uint32_t> randomIds;
+ getRandomIds(randomIds);
+ ASSERT_FALSE(randomIds.empty());
+
+ hidl_vec<PowerEntityStateSpace> selectedStateSpaces;
+ getStateSpaces(selectedStateSpaces, randomIds);
+
+ std::map<uint32_t, PowerEntityStateSpace> stateSpaceMap;
+ for (auto stateSpace : stateSpaces) {
+ stateSpaceMap[stateSpace.powerEntityId] = stateSpace;
+ }
+
+ for (auto stateSpace : selectedStateSpaces) {
+ auto it = stateSpaceMap.find(stateSpace.powerEntityId);
+ ASSERT_NE(it, stateSpaceMap.end());
+
+ ASSERT_EQ(stateSpace.states.size(), it->second.states.size());
+ for (auto i = 0; i < stateSpace.states.size(); i++) {
+ ASSERT_EQ(stateSpace.states[i].powerEntityStateId,
+ it->second.states[i].powerEntityStateId);
+ ASSERT_EQ(stateSpace.states[i].powerEntityStateName,
+ it->second.states[i].powerEntityStateName);
+ }
+ }
+}
+
+// stateResidencyResults must contain results for every PowerEntityStateSpace
+// returned by getPowerEntityStateInfo
+TEST_F(PowerStatsHidlTest, ValidateResidencyResultsAssociation) {
+ hidl_vec<PowerEntityStateSpace> stateSpaces;
+ getStateSpaces(stateSpaces);
+
+ hidl_vec<PowerEntityStateResidencyResult> results;
+ getResidencyResults(results);
+
+ std::map<uint32_t, PowerEntityStateResidencyResult> resultsMap;
+ for (auto result : results) {
+ resultsMap[result.powerEntityId] = result;
+ }
+
+ for (auto stateSpace : stateSpaces) {
+ auto it = resultsMap.find(stateSpace.powerEntityId);
+ ASSERT_NE(it, resultsMap.end());
+
+ ASSERT_EQ(stateSpace.states.size(), it->second.stateResidencyData.size());
+
+ std::set<uint32_t> stateIds;
+ for (auto residency : it->second.stateResidencyData) {
+ stateIds.insert(residency.powerEntityStateId);
+ }
+
+ for (auto state : stateSpace.states) {
+ ASSERT_NE(stateIds.count(state.powerEntityStateId), 0);
+ }
+ }
+}
+
+// getPowerEntityStateResidencyData must support passing in requested IDs
+// stateResidencyResults must contain results for each PowerEntityStateSpace
+// returned by getPowerEntityStateInfo
+TEST_F(PowerStatsHidlTest, ValidateResidencyResultsAssociationSelect) {
+ std::vector<uint32_t> randomIds;
+ getRandomIds(randomIds);
+ if (randomIds.empty()) {
+ return;
+ }
+
+ hidl_vec<PowerEntityStateSpace> stateSpaces;
+ getStateSpaces(stateSpaces, randomIds);
+
+ hidl_vec<PowerEntityStateResidencyResult> results;
+ getResidencyResults(results, randomIds);
+
+ std::map<uint32_t, PowerEntityStateResidencyResult> resultsMap;
+ for (auto result : results) {
+ resultsMap[result.powerEntityId] = result;
+ }
+
+ for (auto stateSpace : stateSpaces) {
+ auto it = resultsMap.find(stateSpace.powerEntityId);
+ ASSERT_NE(it, resultsMap.end());
+
+ ASSERT_EQ(stateSpace.states.size(), it->second.stateResidencyData.size());
+
+ std::set<uint32_t> stateIds;
+ for (auto residency : it->second.stateResidencyData) {
+ stateIds.insert(residency.powerEntityStateId);
+ }
+
+ for (auto state : stateSpace.states) {
+ ASSERT_NE(stateIds.count(state.powerEntityStateId), 0);
+ }
+ }
+}
+
TEST_F(PowerStatsHidlTest, ValidateRailInfo) {
hidl_vec<RailInfo> rails[2];
Status s;
@@ -299,7 +574,6 @@
LOG(INFO) << "Test result = " << status;
return status;
}
-
} // namespace vts
} // namespace stats
} // namespace power
diff --git a/radio/1.3/IRadio.hal b/radio/1.3/IRadio.hal
index 2d64381..d582c71 100644
--- a/radio/1.3/IRadio.hal
+++ b/radio/1.3/IRadio.hal
@@ -17,12 +17,8 @@
package android.hardware.radio@1.3;
import @1.2::IRadio;
-import @1.1::RadioAccessSpecifier;
/**
- * Note: IRadio 1.3 is an intermediate layer between Android P and Android Q. It's specifically
- * designed for CBRS related interfaces. All other interfaces for Q are added in IRadio 1.4.
- *
* This interface is used by telephony and telecom to talk to cellular radio.
* All the functions have minimum one parameter:
* serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
@@ -31,33 +27,4 @@
* setResponseFunctions must work with @1.1::IRadioResponse and @1.1::IRadioIndication.
*/
interface IRadio extends @1.2::IRadio {
- /**
- * Specify which bands modem's background scan must act on.
- * If specifyChannels is true, it only scans bands specified in specifiers.
- * If specifyChannels is false, it scans all bands.
- *
- * For example, CBRS is only on LTE band 48. By specifying this band,
- * modem saves more power.
- *
- * @param serial Serial number of request.
- * @param specifyChannels whether to scan bands defined in specifiers.
- * @param specifiers which bands to scan. Only used if specifyChannels is true.
- *
- * Response callback is IRadioResponse.setSystemSelectionChannelsResponse()
- */
- oneway setSystemSelectionChannels(int32_t serial, bool specifyChannels,
- vec<RadioAccessSpecifier> specifiers);
-
- /**
- * Toggle logical modem on and off. It should put the logical modem in low power
- * mode without any activity, while the SIM card remains visible. The difference
- * with setRadioPower is, setRadioPower affects all logical modem while this controls
- * just one.
- *
- * @param serial Serial number of request.
- * @param on True to turn on the logical modem, otherwise turn it off.
- *
- * Response function is IRadioResponse.enableModemResponse()
- */
- oneway enableModem(int32_t serial, bool on);
};
diff --git a/radio/1.3/IRadioResponse.hal b/radio/1.3/IRadioResponse.hal
index abdf2ee..2bcdd02 100644
--- a/radio/1.3/IRadioResponse.hal
+++ b/radio/1.3/IRadioResponse.hal
@@ -17,33 +17,9 @@
package android.hardware.radio@1.3;
import @1.2::IRadioResponse;
-import @1.0::RadioResponseInfo;
/**
- * Note: IRadio 1.3 is an intermediate layer between Android P and Android Q. It's specifically
- * designed for CBRS related interfaces. All other interfaces for Q are added in IRadio 1.4.
- *
* Interface declaring response functions to solicited radio requests.
*/
interface IRadioResponse extends @1.2::IRadioResponse {
- /**
- * @param info Response info struct containing response type, serial no. and error
- *
- * Valid errors returned:
- * RadioError:NONE
- * RadioError:RADIO_NOT_AVAILABLE
- * RadioError:INTERNAL_ERR
- * RadioError:INVALID_ARGUMENTS
- */
- oneway setSystemSelectionChannelsResponse(RadioResponseInfo info);
-
- /**
- * @param info Response info struct containing response type, serial no. and error
- *
- * Valid errors returned:
- * RadioError:NONE
- * RadioError:RADIO_NOT_AVAILABLE
- * RadioError:INTERNAL_ERR
- */
- oneway enableModemResponse(RadioResponseInfo info);
};
diff --git a/radio/config/1.1/Android.bp b/radio/config/1.1/Android.bp
index 056510c..10c4c98 100644
--- a/radio/config/1.1/Android.bp
+++ b/radio/config/1.1/Android.bp
@@ -7,20 +7,14 @@
enabled: true,
},
srcs: [
- "IRadioConfig.hal",
"IRadioConfigIndication.hal",
"IRadioConfigResponse.hal",
- "types.hal",
],
interfaces: [
"android.hardware.radio.config@1.0",
"android.hardware.radio@1.0",
"android.hidl.base@1.0",
],
- types: [
- "ModemInfo",
- "PhoneCapability",
- ],
gen_java: true,
}
diff --git a/radio/config/1.1/IRadioConfig.hal b/radio/config/1.1/IRadioConfig.hal
deleted file mode 100644
index bc63339..0000000
--- a/radio/config/1.1/IRadioConfig.hal
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.radio.config@1.1;
-
-import @1.0::IRadioConfig;
-import @1.1::IRadioConfigResponse;
-import @1.1::PhoneCapability;
-
-/**
- * Note: IRadioConfig 1.1 is an intermediate layer between Android P and Android Q.
- * It's specifically designed for CBRS related interfaces. All other interfaces
- * for Q are added in IRadioConfig 1.2.
- *
- * This interface is used by telephony and telecom to talk to cellular radio for the purpose of
- * radio configuration, and it is not associated with any specific modem or slot.
- * All the functions have minimum one parameter:
- * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
- * duration of a method call. If clients provide colliding serials (including passing the same
- * serial to different methods), multiple responses (one for each method call) must still be served.
- */
-interface IRadioConfig extends @1.0::IRadioConfig {
- /**
- * Request current phone capability.
- *
- * @param serial Serial number of request.
- *
- * Response callback is IRadioResponse.getPhoneCapabilityResponse() which
- * will return <@1.1::PhoneCapability>.
- */
- oneway getPhoneCapability(int32_t serial);
-
- /**
- * Set preferred data modem Id.
- * In a multi-SIM device, notify modem layer which logical modem will be used primarily
- * for data. It helps modem with resource optimization and decisions of what data connections
- * should be satisfied.
- *
- * @param serial Serial number of request.
- * @param modem Id the logical modem ID, which should match one of modem IDs returned
- * from getPhoneCapability().
- *
- * Response callback is IRadioConfigResponse.setPreferredDataModemResponse()
- */
- oneway setPreferredDataModem(int32_t serial, uint8_t modemId);
-};
diff --git a/radio/config/1.1/IRadioConfigResponse.hal b/radio/config/1.1/IRadioConfigResponse.hal
index ec0e0ec..5d75600 100644
--- a/radio/config/1.1/IRadioConfigResponse.hal
+++ b/radio/config/1.1/IRadioConfigResponse.hal
@@ -17,37 +17,9 @@
package android.hardware.radio.config@1.1;
import @1.0::IRadioConfigResponse;
-import @1.1::PhoneCapability;
-import android.hardware.radio@1.0::RadioResponseInfo;
/**
- * Note: IRadioConfig 1.1 is an intermediate layer between Android P and Android Q.
- * It's specifically designed for CBRS related interfaces. All other interfaces
- * for Q should be added in IRadioConfig 1.2.
- *
* Interface declaring response functions to solicited radio config requests.
*/
interface IRadioConfigResponse extends @1.0::IRadioConfigResponse {
- /**
- * @param info Response info struct containing response type, serial no. and error
- * @param phoneCapability <@1.1::PhoneCapability> it defines modem's capability for example
- * how many logical modems it has, how many data connections it supports.
- *
- * Valid errors returned:
- * RadioError:NONE
- * RadioError:RADIO_NOT_AVAILABLE
- * RadioError:INTERNAL_ERR
- */
- oneway getPhoneCapabilityResponse(RadioResponseInfo info, PhoneCapability phoneCapability);
-
- /**
- * @param info Response info struct containing response type, serial no. and error
- *
- * Valid errors returned:
- * RadioError:NONE
- * RadioError:RADIO_NOT_AVAILABLE
- * RadioError:INTERNAL_ERR
- * RadioError:INVALID_ARGUMENTS
- */
- oneway setPreferredDataModemResponse(RadioResponseInfo info);
};
diff --git a/radio/config/1.1/types.hal b/radio/config/1.1/types.hal
deleted file mode 100644
index 261f3b1..0000000
--- a/radio/config/1.1/types.hal
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.radio.config@1.1;
-
-/**
- * Note: IRadioConfig 1.1 is an intermediate layer between Android P and Android Q.
- * It's specifically designed for CBRS related interfaces. All other interfaces
- * for Q should be added in IRadioConfig 1.2.
- */
-
-/**
- * A field in PhoneCapability that has information of each logical modem.
- */
-struct ModemInfo {
- /**
- * Logical modem ID.
- */
- uint8_t modemId;
-};
-
-/**
- * Phone capability which describes the data connection capability of modem.
- * It's used to evaluate possible phone config change, for example from single
- * SIM device to multi-SIM device.
- */
-struct PhoneCapability {
- /**
- * maxActiveData defines how many logical modems can have
- * PS attached simultaneously. For example, for L+L modem it
- * should be 2.
- */
- uint8_t maxActiveData;
- /**
- * maxActiveData defines how many logical modems can have
- * internet PDN connections simultaneously. For example, for L+L
- * DSDS modem it’s 1, and for DSDA modem it’s 2.
- */
- uint8_t maxActiveInternetData;
- /**
- * Whether modem supports both internet PDN up so
- * that we can do ping test before tearing down the
- * other one.
- */
- bool isInternetLingeringSupported;
- /**
- * List of logical modem information.
- */
- vec<ModemInfo> logicalModemList;
-};
diff --git a/thermal/2.0/types.hal b/thermal/2.0/types.hal
index 4929e44..ad11849 100644
--- a/thermal/2.0/types.hal
+++ b/thermal/2.0/types.hal
@@ -48,27 +48,33 @@
* Not under throttling.
*/
NONE = 0,
+
/**
* Light throttling where UX is not impacted.
*/
LIGHT,
+
/**
- * Moderate throttling where UX is not largily impacted.
+ * Moderate throttling where UX is not largely impacted.
*/
MODERATE,
+
/**
* Severe throttling where UX is largely impacted.
* Similar to 1.0 throttlingThreshold.
*/
SEVERE,
+
/**
* Platform has done everything to reduce power.
*/
CRITICAL,
+
/**
* User should be warned before shutdown.
*/
WARNING,
+
/**
* Need shutdown immediately.
*/