Merge "Add vts tests for new drm@1.2 methods"
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 1af439a..edde1cb 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -72,3 +72,11 @@
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.cas@1.0*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.cas@1.0*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.cas@1.0*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.configstore@1.2-service.rc)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.configstore@1.2-service)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/seccomp_policy/configstore.policy)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/apex/com.android.media.swcodec/lib64/android.hardware.configstore@1.2.so)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/vndk-Q/android.hardware.configstore@1.2.so)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/android.hardware.configstore@1.2.so)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/vndk-Q/android.hardware.configstore@1.2.so)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/android.hardware.configstore@1.2.so)
diff --git a/atrace/1.0/Android.bp b/atrace/1.0/Android.bp
index f7c9078..4d73cfd 100644
--- a/atrace/1.0/Android.bp
+++ b/atrace/1.0/Android.bp
@@ -13,10 +13,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "Status",
- "TracingCategory",
- ],
gen_java: true,
}
diff --git a/audio/2.0/Android.bp b/audio/2.0/Android.bp
index d6e481f..3495b1a 100644
--- a/audio/2.0/Android.bp
+++ b/audio/2.0/Android.bp
@@ -21,16 +21,6 @@
"android.hardware.audio.effect@2.0",
"android.hidl.base@1.0",
],
- types: [
- "AudioDrain",
- "DeviceAddress",
- "MessageQueueFlagBits",
- "MmapBufferInfo",
- "MmapPosition",
- "ParameterValue",
- "Result",
- "TimeSpec",
- ],
gen_java: false,
gen_java_constants: true,
}
diff --git a/audio/4.0/Android.bp b/audio/4.0/Android.bp
index 6e217d9..b97fe01 100644
--- a/audio/4.0/Android.bp
+++ b/audio/4.0/Android.bp
@@ -21,27 +21,6 @@
"android.hardware.audio.effect@4.0",
"android.hidl.base@1.0",
],
- types: [
- "AudioDrain",
- "AudioFrequencyResponsePoint",
- "AudioMicrophoneChannelMapping",
- "AudioMicrophoneCoordinate",
- "AudioMicrophoneDirectionality",
- "AudioMicrophoneLocation",
- "DeviceAddress",
- "MessageQueueFlagBits",
- "MicrophoneInfo",
- "MmapBufferFlag",
- "MmapBufferInfo",
- "MmapPosition",
- "ParameterValue",
- "PlaybackTrackMetadata",
- "RecordTrackMetadata",
- "Result",
- "SinkMetadata",
- "SourceMetadata",
- "TimeSpec",
- ],
gen_java: false,
gen_java_constants: true,
}
diff --git a/audio/5.0/Android.bp b/audio/5.0/Android.bp
index 7c2db1d..f6ac2eb 100644
--- a/audio/5.0/Android.bp
+++ b/audio/5.0/Android.bp
@@ -22,23 +22,6 @@
"android.hidl.base@1.0",
"android.hidl.safe_union@1.0",
],
- types: [
- "AudioDrain",
- "AudioFrequencyResponsePoint",
- "AudioMicrophoneChannelMapping",
- "AudioMicrophoneCoordinate",
- "AudioMicrophoneDirectionality",
- "AudioMicrophoneLocation",
- "MessageQueueFlagBits",
- "MicrophoneDirection",
- "MicrophoneInfo",
- "MmapBufferFlag",
- "MmapBufferInfo",
- "MmapPosition",
- "ParameterValue",
- "Result",
- "TimeSpec",
- ],
gen_java: false,
gen_java_constants: true,
}
diff --git a/audio/5.0/config/audio_policy_configuration.xsd b/audio/5.0/config/audio_policy_configuration.xsd
index ee3a437..c580b25 100644
--- a/audio/5.0/config/audio_policy_configuration.xsd
+++ b/audio/5.0/config/audio_policy_configuration.xsd
@@ -42,7 +42,7 @@
<xs:element name="globalConfiguration" type="globalConfiguration"/>
<xs:element name="modules" type="modules" maxOccurs="unbounded"/>
<xs:element name="volumes" type="volumes" maxOccurs="unbounded"/>
- <xs:element name="surroundSound" type="surroundSound" />
+ <xs:element name="surroundSound" type="surroundSound" minOccurs="0" />
</xs:sequence>
<xs:attribute name="version" type="version"/>
</xs:complexType>
diff --git a/audio/common/2.0/Android.bp b/audio/common/2.0/Android.bp
index 878b594..a64548f 100644
--- a/audio/common/2.0/Android.bp
+++ b/audio/common/2.0/Android.bp
@@ -9,39 +9,6 @@
srcs: [
"types.hal",
],
- types: [
- "AudioChannelMask",
- "AudioConfig",
- "AudioDevice",
- "AudioFormat",
- "AudioGain",
- "AudioGainConfig",
- "AudioGainMode",
- "AudioHandleConsts",
- "AudioInputFlag",
- "AudioInterleave",
- "AudioMixLatencyClass",
- "AudioMode",
- "AudioOffloadInfo",
- "AudioOutputFlag",
- "AudioPort",
- "AudioPortConfig",
- "AudioPortConfigDeviceExt",
- "AudioPortConfigMask",
- "AudioPortConfigSessionExt",
- "AudioPortDeviceExt",
- "AudioPortMixExt",
- "AudioPortRole",
- "AudioPortSessionExt",
- "AudioPortType",
- "AudioSessionConsts",
- "AudioSource",
- "AudioStreamType",
- "AudioUsage",
- "FixedChannelCount",
- "ThreadInfo",
- "Uuid",
- ],
gen_java: false,
gen_java_constants: true,
}
diff --git a/audio/common/4.0/Android.bp b/audio/common/4.0/Android.bp
index 9b737dc..cd504e5 100644
--- a/audio/common/4.0/Android.bp
+++ b/audio/common/4.0/Android.bp
@@ -9,39 +9,6 @@
srcs: [
"types.hal",
],
- types: [
- "AudioChannelMask",
- "AudioConfig",
- "AudioContentType",
- "AudioDevice",
- "AudioFormat",
- "AudioGain",
- "AudioGainConfig",
- "AudioGainMode",
- "AudioHandleConsts",
- "AudioInputFlag",
- "AudioMixLatencyClass",
- "AudioMode",
- "AudioOffloadInfo",
- "AudioOutputFlag",
- "AudioPort",
- "AudioPortConfig",
- "AudioPortConfigDeviceExt",
- "AudioPortConfigMask",
- "AudioPortConfigSessionExt",
- "AudioPortDeviceExt",
- "AudioPortMixExt",
- "AudioPortRole",
- "AudioPortSessionExt",
- "AudioPortType",
- "AudioSessionConsts",
- "AudioSource",
- "AudioStreamType",
- "AudioUsage",
- "FixedChannelCount",
- "ThreadInfo",
- "Uuid",
- ],
gen_java: false,
gen_java_constants: true,
}
diff --git a/audio/common/5.0/Android.bp b/audio/common/5.0/Android.bp
index 86d9354..66c6fe8 100644
--- a/audio/common/5.0/Android.bp
+++ b/audio/common/5.0/Android.bp
@@ -12,44 +12,6 @@
interfaces: [
"android.hidl.safe_union@1.0",
],
- types: [
- "AudioChannelMask",
- "AudioConfig",
- "AudioContentType",
- "AudioDevice",
- "AudioFormat",
- "AudioGain",
- "AudioGainConfig",
- "AudioGainMode",
- "AudioHandleConsts",
- "AudioInputFlag",
- "AudioMixLatencyClass",
- "AudioMode",
- "AudioOffloadInfo",
- "AudioOutputFlag",
- "AudioPort",
- "AudioPortConfig",
- "AudioPortConfigDeviceExt",
- "AudioPortConfigMask",
- "AudioPortConfigSessionExt",
- "AudioPortDeviceExt",
- "AudioPortMixExt",
- "AudioPortRole",
- "AudioPortSessionExt",
- "AudioPortType",
- "AudioSessionConsts",
- "AudioSource",
- "AudioStreamType",
- "AudioUsage",
- "DeviceAddress",
- "FixedChannelCount",
- "PlaybackTrackMetadata",
- "RecordTrackMetadata",
- "SinkMetadata",
- "SourceMetadata",
- "ThreadInfo",
- "Uuid",
- ],
gen_java: false,
gen_java_constants: true,
}
diff --git a/audio/effect/2.0/Android.bp b/audio/effect/2.0/Android.bp
index c4f8b06..2dd1a0c 100644
--- a/audio/effect/2.0/Android.bp
+++ b/audio/effect/2.0/Android.bp
@@ -27,20 +27,6 @@
"android.hardware.audio.common@2.0",
"android.hidl.base@1.0",
],
- types: [
- "AudioBuffer",
- "EffectAuxChannelsConfig",
- "EffectBufferAccess",
- "EffectBufferConfig",
- "EffectConfig",
- "EffectConfigParameters",
- "EffectDescriptor",
- "EffectFeature",
- "EffectFlags",
- "EffectOffloadParameter",
- "MessageQueueFlagBits",
- "Result",
- ],
gen_java: false,
gen_java_constants: true,
}
diff --git a/audio/effect/4.0/Android.bp b/audio/effect/4.0/Android.bp
index e7676a9..2c32bcb 100644
--- a/audio/effect/4.0/Android.bp
+++ b/audio/effect/4.0/Android.bp
@@ -27,20 +27,6 @@
"android.hardware.audio.common@4.0",
"android.hidl.base@1.0",
],
- types: [
- "AudioBuffer",
- "EffectAuxChannelsConfig",
- "EffectBufferAccess",
- "EffectBufferConfig",
- "EffectConfig",
- "EffectConfigParameters",
- "EffectDescriptor",
- "EffectFeature",
- "EffectFlags",
- "EffectOffloadParameter",
- "MessageQueueFlagBits",
- "Result",
- ],
gen_java: false,
gen_java_constants: true,
}
diff --git a/audio/effect/5.0/Android.bp b/audio/effect/5.0/Android.bp
index 78b950e..32fe652 100644
--- a/audio/effect/5.0/Android.bp
+++ b/audio/effect/5.0/Android.bp
@@ -28,20 +28,6 @@
"android.hidl.base@1.0",
"android.hidl.safe_union@1.0",
],
- types: [
- "AudioBuffer",
- "EffectAuxChannelsConfig",
- "EffectBufferAccess",
- "EffectBufferConfig",
- "EffectConfig",
- "EffectConfigParameters",
- "EffectDescriptor",
- "EffectFeature",
- "EffectFlags",
- "EffectOffloadParameter",
- "MessageQueueFlagBits",
- "Result",
- ],
gen_java: false,
gen_java_constants: true,
}
diff --git a/automotive/audiocontrol/1.0/Android.bp b/automotive/audiocontrol/1.0/Android.bp
index 9335a6c..7c51cf7 100644
--- a/automotive/audiocontrol/1.0/Android.bp
+++ b/automotive/audiocontrol/1.0/Android.bp
@@ -13,9 +13,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "ContextNumber",
- ],
gen_java: true,
}
diff --git a/automotive/evs/1.0/Android.bp b/automotive/evs/1.0/Android.bp
index f620eb5..3ac67ea 100644
--- a/automotive/evs/1.0/Android.bp
+++ b/automotive/evs/1.0/Android.bp
@@ -16,13 +16,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "BufferDesc",
- "CameraDesc",
- "DisplayDesc",
- "DisplayState",
- "EvsResult",
- ],
gen_java: true,
}
diff --git a/automotive/vehicle/2.0/Android.bp b/automotive/vehicle/2.0/Android.bp
index f64028c..4163879 100644
--- a/automotive/vehicle/2.0/Android.bp
+++ b/automotive/vehicle/2.0/Android.bp
@@ -14,61 +14,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "DiagnosticFloatSensorIndex",
- "DiagnosticIntegerSensorIndex",
- "EvConnectorType",
- "FuelType",
- "Obd2CommonIgnitionMonitors",
- "Obd2CompressionIgnitionMonitors",
- "Obd2FuelSystemStatus",
- "Obd2FuelType",
- "Obd2IgnitionMonitorKind",
- "Obd2SecondaryAirStatus",
- "Obd2SparkIgnitionMonitors",
- "PortLocationType",
- "StatusCode",
- "SubscribeFlags",
- "SubscribeOptions",
- "VehicleApPowerStateConfigFlag",
- "VehicleApPowerStateReport",
- "VehicleApPowerStateReq",
- "VehicleApPowerStateReqIndex",
- "VehicleApPowerStateShutdownParam",
- "VehicleArea",
- "VehicleAreaConfig",
- "VehicleAreaDoor",
- "VehicleAreaMirror",
- "VehicleAreaSeat",
- "VehicleAreaWheel",
- "VehicleAreaWindow",
- "VehicleDisplay",
- "VehicleGear",
- "VehicleHvacFanDirection",
- "VehicleHwKeyInputAction",
- "VehicleIgnitionState",
- "VehicleLightState",
- "VehicleLightSwitch",
- "VehicleOilLevel",
- "VehiclePropConfig",
- "VehiclePropValue",
- "VehicleProperty",
- "VehiclePropertyAccess",
- "VehiclePropertyChangeMode",
- "VehiclePropertyGroup",
- "VehiclePropertyStatus",
- "VehiclePropertyType",
- "VehicleTurnSignal",
- "VehicleUnit",
- "VmsAvailabilityStateIntegerValuesIndex",
- "VmsBaseMessageIntegerValuesIndex",
- "VmsMessageType",
- "VmsMessageWithLayerAndPublisherIdIntegerValuesIndex",
- "VmsMessageWithLayerIntegerValuesIndex",
- "VmsOfferingMessageIntegerValuesIndex",
- "VmsPublisherInformationIntegerValuesIndex",
- "VmsSubscriptionsStateIntegerValuesIndex",
- ],
gen_java: true,
}
diff --git a/biometrics/face/1.0/Android.bp b/biometrics/face/1.0/Android.bp
index 0f8c6e6..222a09e 100644
--- a/biometrics/face/1.0/Android.bp
+++ b/biometrics/face/1.0/Android.bp
@@ -14,15 +14,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "FaceAcquiredInfo",
- "FaceError",
- "Feature",
- "OptionalBool",
- "OptionalUint64",
- "Status",
- "UserHandle",
- ],
gen_java: true,
}
diff --git a/biometrics/face/1.0/IBiometricsFace.hal b/biometrics/face/1.0/IBiometricsFace.hal
index 0499c5d..cd368fa 100644
--- a/biometrics/face/1.0/IBiometricsFace.hal
+++ b/biometrics/face/1.0/IBiometricsFace.hal
@@ -53,6 +53,10 @@
* returning to the idle state. Calling this method with the same userId
* should have no effect on the state machine.
*
+ * Note that onLockoutChanged() MUST be invoked by the implementation in
+ * response to a user change in order to update the framework with the
+ * timeout of the new user (or 0 if the user is not locked out).
+ *
* @param userId A non-negative user identifier that must be unique and
* persistent for a given user.
* @param storePath filesystem path to the template storage directory.
@@ -61,19 +65,22 @@
setActiveUser(int32_t userId, string storePath) generates (Status status);
/**
- * Begins a secure transaction request, e.g. enrollment.
+ * Begins a secure transaction request, e.g. enroll() or resetLockout().
*
* Generates a unique and cryptographically secure random token used to
* indicate the start of a secure transaction. generateChallenge() and
- * revokeChallenge() specify a pin/pattern/password cleared time window where
- * the secure transaction is allowed.
+ * revokeChallenge() specify a window where the resulting HAT that is
+ * generated in response to checking the user's PIN/pattern/password
+ * can be used to verify/perform a secure transaction.
*
- * generateChallenge() generates a challenge which must then be wrapped by the
+ * generateChallenge() generates a challenge which must then be wrapped by
* gatekeeper after verifying a successful strong authentication attempt,
* which generates a Hardware Authentication Token. The challenge prevents
- * spoofing and replay attacks and ensures that we only update a user’s face
- * template if the operation was preceded by some kind of strong credential
- * confirmation (e.g. device password).
+ * spoofing and replay attacks and ensures that only a transaction backed
+ * by a user authentication (PIN/pattern/password) can proceed.
+ *
+ * The implementation should be tolerant of revokeChallenge() being invoked
+ * after timeout has expired.
*
* @param challengeTimeoutSec A timeout in seconds, after which the driver
* must invalidate the challenge. This is to prevent bugs or crashes in
@@ -81,35 +88,35 @@
* @return result, with its "value" parameter representing a "challenge": a
* unique and cryptographically secure random token.
*/
- @callflow(next={"enroll", "revokeChallenge", "setFeatureDisabled"})
+ @callflow(next={"enroll", "revokeChallenge", "setFeature"})
generateChallenge(uint32_t challengeTimeoutSec)
generates (OptionalUint64 result);
/**
* Enrolls a user's face.
*
- * Note that this interface permits implementations where multiple faces can
- * be enrolled for a single user. However, allowing multiple faces to be
- * enrolled can be a severe security vulnerability and hence, most
- * implementations must ensure that only a single face be enrolled at a
- * given time. Multi-enrollment must only be used where there is a clear
- * necessity for a shared use case, e.g. TVs or cars.
- *
- * Note that the Hardware Authentication Token must still be valid after
- * this call, and must be explicitly invalidated by a call to
- * revokeChallenge(). This allows clients to immediately reattempt
- * enrollment (for example, if a user wasn’t satisfied with their enrollment)
- * without having to go through another strong authentication flow.
+ * Note that the Hardware Authentication Token must be valid for the
+ * duration of enrollment and thus should be explicitly invalidated by a
+ * call to revokeChallenge() when enrollment is complete, to reduce the
+ * window of opportunity to re-use the challenge and HAT. For example,
+ * Settings calls generateChallenge() once to allow the user to enroll one
+ * or more faces or toggle secure settings without having to re-enter the
+ * PIN/pattern/password. Once the user completes the operation, Settings
+ * invokes revokeChallenge() to close the transaction. If the HAT is expired,
+ * the implementation must invoke onError with UNABLE_TO_PROCESS.
*
* This method triggers the IBiometricsFaceClientCallback#onEnrollResult()
* method.
*
* @param hat A valid Hardware Authentication Token, generated as a result
* of a generateChallenge() challenge being wrapped by the gatekeeper
- * after a sucessful strong authentication request.
- * @param timeoutSec A timeout in seconds, after which this enrollment
- * attempt is cancelled. Note that the client still needs to
- * call revokeChallenge() to terminate the enrollment session.
+ * after a successful strong authentication request.
+ * @param timeoutSec A timeout in seconds, after which this enroll
+ * attempt is cancelled. Note that the framework can continue
+ * enrollment by calling this again with a valid HAT. This timeout is
+ * expected to be used to limit power usage if the device becomes idle
+ * during enrollment. The implementation is expected to send
+ * ERROR_TIMEOUT if this happens.
* @param disabledFeatures A list of features to be disabled during
* enrollment. Note that all features are enabled by default.
* @return status The status of this method call.
@@ -122,8 +129,8 @@
* Finishes the secure transaction by invalidating the challenge generated
* by generateChallenge().
*
- * Clients must call this method once enrollment is complete, and the user's
- * face template no longer needs to be updated.
+ * Clients must call this method once the secure transaction (e.g. enroll
+ * or setFeature) is completed. See generateChallenge().
*
* @return status The status of this method call.
*/
@@ -131,33 +138,43 @@
revokeChallenge() generates (Status status);
/**
- * Requires all subsequent enroll/authenticate calls to use the feature.
- * This method does not affect enroll, which has its own feature list.
- *
* Changes the state of previous enrollment setting. Because this may
* decrease security, the user must enter their password before this method
* is invoked (see @param HAT). The driver must verify the HAT before
- * changing any feature state.
+ * changing any feature state. This method must return ILLEGAL_ARGUMENT if
+ * the HAT or faceId is invalid. This must only be invoked after
+ * setActiveUser() is called.
+ *
* Note: In some cases it may not be possible to change the state of this
* flag without re-enrolling. For example, if the user didn't provide
* attention during the original enrollment. This flag reflects the same
* persistent state as the one passed to enroll().
*
+ * Note: This call may block for a short amount of time (few hundred
+ * milliseconds). Clients are expected to invoke this asynchronously if it
+ * takes much longer than the above limit. Also note that the result is
+ * returned solely through Status (and not onError).
+ *
* @param feature The feature to be enabled or disabled.
* @param enabled True to enable the feature, false to disable.
* @param hat A valid Hardware Authentication Token, generated as a result
* of getChallenge().
+ * @param faceId the ID of the enrollment returned by enroll() for the
+ * feature to update.
* @return status The status of this method call.
*/
- setFeature(Feature feature, bool enabled, vec<uint8_t> hat)
+ setFeature(Feature feature, bool enabled, vec<uint8_t> hat, uint32_t faceId)
generates(Status status);
/**
- * Retrieves the current state of the feature.
+ * Retrieves the current state of the feature. If the faceId is invalid,
+ * the implementation must return ILLEGAL_ARGUMENT.
*
- * @return enabled True if the feature is enabled, false if disabled.
+ * @param faceId the ID of the enrollment returned by enroll().
+ * @return result with the value set to true if the feature is enabled,
+ * false if disabled.
*/
- getFeature(Feature feature) generates (bool enabled);
+ getFeature(Feature feature, uint32_t faceId) generates (OptionalBool result);
/**
* Returns an identifier associated with the current face set.
@@ -176,7 +193,7 @@
getAuthenticatorId() generates (OptionalUint64 result);
/**
- * Cancels a pending enrollment or authentication request.
+ * Cancels the current enroll, authenticate, remove, or enumerate operation.
*
* @return status The status of this method call.
*/
@@ -241,8 +258,12 @@
/**
* Reset lockout for the current user.
*
+ * Note: This call may block for a short amount of time (few hundred
+ * milliseconds). Clients are expected to invoke this asynchronously if it
+ * takes much longer than the above limit.
+ *
* @param hat A valid Hardware Authentication Token, generated when the
- * user authenticates with Pin/Pattern/Pass. When the Hardware
+ * user authenticates with PIN/pattern/pass. When the Hardware
* Authentication Token is verified, lockout must be reset and
* onLockoutChanged must be called with duration 0.
* @return status The status of this method call.
diff --git a/biometrics/face/1.0/IBiometricsFaceClientCallback.hal b/biometrics/face/1.0/IBiometricsFaceClientCallback.hal
index c9dd0e2..969bc68 100644
--- a/biometrics/face/1.0/IBiometricsFaceClientCallback.hal
+++ b/biometrics/face/1.0/IBiometricsFaceClientCallback.hal
@@ -39,7 +39,7 @@
* A callback invoked when a face has been successfully authenticated.
*
* @param deviceId A unique id associated with the HAL implementation
- * service that processed this autentication attempt.
+ * service that processed this authentication attempt.
* @param faceId The id of the face template that passed the authentication
* challenge.
* @param userId The active user id for the authenticated face.
diff --git a/biometrics/face/1.0/types.hal b/biometrics/face/1.0/types.hal
index b5db966..8c4a4e9 100644
--- a/biometrics/face/1.0/types.hal
+++ b/biometrics/face/1.0/types.hal
@@ -82,13 +82,14 @@
enum FaceError : int32_t {
/**
- * A hardware error has occured that cannot be resolved. Try again later.
+ * A hardware error has occurred that cannot be resolved. Try again later.
*/
HW_UNAVAILABLE = 1,
/**
- * The current enroll or authenticate operation could not be completed;
- * the sensor was unable to process the current image.
+ * The current enroll or authenticate operation could not be completed,
+ * e.g. the sensor was unable to process the current image or the HAT was
+ * invalid.
*/
UNABLE_TO_PROCESS = 2,
@@ -97,6 +98,11 @@
* prevent programs from blocking the face HAL indefinitely. The timeout is
* framework and sensor-specific, but is generally on the order of 30
* seconds.
+
+ * The timeout is a device-specific time meant to optimize power. For
+ * example after 30 seconds of searching for a face it can be use to
+ * indicate that the implementation is no longer looking and the framework
+ * should restart the operation on the next user interaction.
*/
TIMEOUT = 3,
@@ -108,8 +114,8 @@
/**
* The current operation has been cancelled. This may happen if a new
- * request (authenticate, remove) is initiated while an on-going operation
- * is in progress, or if cancel() was called.
+ * request (authenticate, remove, enumerate, enroll) is initiated while
+ * an on-going operation is in progress, or if cancel() was called.
*/
CANCELED = 5,
@@ -357,7 +363,7 @@
/**
* Result structure with an addition bool field. See documentation in
- * getRequireAttention() for usage of the value.
+ * getFeature() for usage of the value.
*/
struct OptionalBool {
/**
diff --git a/configstore/1.2/vts/functional/Android.bp b/biometrics/face/1.0/vts/functional/Android.bp
similarity index 66%
rename from configstore/1.2/vts/functional/Android.bp
rename to biometrics/face/1.0/vts/functional/Android.bp
index 5f1eca6..fa68c4e 100644
--- a/configstore/1.2/vts/functional/Android.bp
+++ b/biometrics/face/1.0/vts/functional/Android.bp
@@ -1,5 +1,5 @@
//
-// Copyright (C) 2018 The Android Open Source Project
+// Copyright (C) 2019 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.
@@ -15,13 +15,10 @@
//
cc_test {
- name: "VtsHalConfigstoreV1_2TargetTest",
+ name: "VtsHalBiometricsFaceV1_0TargetTest",
defaults: ["VtsHalTargetTestDefaults"],
- srcs: ["VtsHalConfigstoreV1_2TargetTest.cpp"],
- static_libs: [
- "android.hardware.configstore@1.0",
- "android.hardware.configstore@1.1",
- "android.hardware.configstore@1.2",
- ],
+ srcs: ["VtsHalBiometricsFaceV1_0TargetTest.cpp"],
+ static_libs: ["android.hardware.biometrics.face@1.0"],
+ test_suites: ["general-tests"],
}
diff --git a/biometrics/face/1.0/vts/functional/VtsHalBiometricsFaceV1_0TargetTest.cpp b/biometrics/face/1.0/vts/functional/VtsHalBiometricsFaceV1_0TargetTest.cpp
new file mode 100644
index 0000000..795a1ae
--- /dev/null
+++ b/biometrics/face/1.0/vts/functional/VtsHalBiometricsFaceV1_0TargetTest.cpp
@@ -0,0 +1,439 @@
+/*
+ * Copyright (C) 2019 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.
+ */
+
+#define LOG_TAG "face_hidl_test"
+
+#include <VtsHalHidlTargetTestBase.h>
+#include <VtsHalHidlTargetTestEnvBase.h>
+#include <android-base/logging.h>
+#include <android-base/properties.h>
+#include <android/hardware/biometrics/face/1.0/IBiometricsFace.h>
+#include <android/hardware/biometrics/face/1.0/IBiometricsFaceClientCallback.h>
+#include <hidl/HidlSupport.h>
+#include <hidl/HidlTransportSupport.h>
+#include <utils/Condition.h>
+
+#include <cinttypes>
+#include <cstdint>
+#include <future>
+#include <utility>
+
+using android::Condition;
+using android::Mutex;
+using android::sp;
+using android::base::GetUintProperty;
+using android::hardware::hidl_vec;
+using android::hardware::Return;
+using android::hardware::biometrics::face::V1_0::FaceAcquiredInfo;
+using android::hardware::biometrics::face::V1_0::FaceError;
+using android::hardware::biometrics::face::V1_0::Feature;
+using android::hardware::biometrics::face::V1_0::IBiometricsFace;
+using android::hardware::biometrics::face::V1_0::IBiometricsFaceClientCallback;
+using android::hardware::biometrics::face::V1_0::OptionalBool;
+using android::hardware::biometrics::face::V1_0::OptionalUint64;
+using android::hardware::biometrics::face::V1_0::Status;
+
+namespace {
+
+const uint32_t kTimeout = 3;
+const std::chrono::seconds kTimeoutInSeconds = std::chrono::seconds(kTimeout);
+const uint32_t kUserId = 99;
+const uint32_t kFaceId = 5;
+const char kTmpDir[] = "/data/system/users/0/facedata";
+const int kIterations = 1000;
+
+const auto kAssertCallbackIsSet = [](const OptionalUint64& res) {
+ ASSERT_EQ(Status::OK, res.status);
+ // Makes sure the "deviceId" represented by "res.value" is not 0.
+ // 0 would mean the HIDL is not available.
+ ASSERT_NE(0UL, res.value);
+};
+
+// Wait for a callback to occur (signaled by the given future) up to the
+// provided timeout. If the future is invalid or the callback does not come
+// within the given time, returns false.
+template <class ReturnType>
+bool waitForCallback(std::future<ReturnType> future,
+ std::chrono::milliseconds timeout = kTimeoutInSeconds) {
+ auto expiration = std::chrono::system_clock::now() + timeout;
+ EXPECT_TRUE(future.valid());
+ if (future.valid()) {
+ std::future_status status = future.wait_until(expiration);
+ EXPECT_NE(std::future_status::timeout, status) << "Timed out waiting for callback";
+ if (status == std::future_status::ready) {
+ return true;
+ }
+ }
+ return false;
+}
+
+// Base callback implementation that just logs all callbacks by default
+class FaceCallbackBase : public IBiometricsFaceClientCallback {
+ public:
+ Return<void> onEnrollResult(uint64_t, uint32_t, int32_t, uint32_t) override {
+ ALOGD("Enroll callback called.");
+ return Return<void>();
+ }
+
+ Return<void> onAuthenticated(uint64_t, uint32_t, int32_t, const hidl_vec<uint8_t>&) override {
+ ALOGD("Authenticated callback called.");
+ return Return<void>();
+ }
+
+ Return<void> onAcquired(uint64_t, int32_t, FaceAcquiredInfo, int32_t) override {
+ ALOGD("Acquired callback called.");
+ return Return<void>();
+ }
+
+ Return<void> onError(uint64_t, int32_t, FaceError, int32_t) override {
+ ALOGD("Error callback called.");
+ EXPECT_TRUE(false); // fail any test that triggers an error
+ return Return<void>();
+ }
+
+ Return<void> onRemoved(uint64_t, uint32_t, int32_t, uint32_t) override {
+ ALOGD("Removed callback called.");
+ return Return<void>();
+ }
+
+ Return<void> onEnumerate(uint64_t, const hidl_vec<uint32_t>&, int32_t /* userId */) override {
+ ALOGD("Enumerate callback called.");
+ return Return<void>();
+ }
+
+ Return<void> onLockoutChanged(uint64_t) override {
+ ALOGD("LockoutChanged callback called.");
+ return Return<void>();
+ }
+};
+
+class EnumerateCallback : public FaceCallbackBase {
+ public:
+ Return<void> onEnumerate(uint64_t, const hidl_vec<uint32_t>&, int32_t) override {
+ promise.set_value();
+ return Return<void>();
+ }
+
+ std::promise<void> promise;
+};
+
+class ErrorCallback : public FaceCallbackBase {
+ public:
+ ErrorCallback(bool filterErrors = false, FaceError errorType = FaceError::HW_UNAVAILABLE)
+ : filterErrors(filterErrors), errorType(errorType), hasError(false) {}
+
+ Return<void> onError(uint64_t, int32_t, FaceError error, int32_t) override {
+ if ((filterErrors && errorType == error) || !filterErrors) {
+ hasError = true;
+ this->error = error;
+ promise.set_value();
+ }
+ return Return<void>();
+ }
+
+ bool filterErrors;
+ FaceError errorType;
+ bool hasError;
+ FaceError error;
+ std::promise<void> promise;
+};
+
+class RemoveCallback : public FaceCallbackBase {
+ public:
+ explicit RemoveCallback(int32_t userId) : removeUserId(userId) {}
+
+ Return<void> onRemoved(uint64_t, uint32_t, int32_t userId, uint32_t remaining) override {
+ EXPECT_EQ(removeUserId, userId);
+ promise.set_value();
+ if (remaining == 0UL) {
+ promise.set_value();
+ }
+ return Return<void>();
+ }
+
+ int32_t removeUserId;
+ std::promise<void> promise;
+};
+
+class LockoutChangedCallback : public FaceCallbackBase {
+ public:
+ Return<void> onLockoutChanged(uint64_t duration) override {
+ this->hasDuration = true;
+ this->duration = duration;
+ promise.set_value();
+ return Return<void>();
+ }
+ bool hasDuration;
+ uint64_t duration;
+ std::promise<void> promise;
+};
+
+// Test environment for Face HIDL HAL.
+class FaceHidlEnvironment : public ::testing::VtsHalHidlTargetTestEnvBase {
+ public:
+ // get the test environment singleton
+ static FaceHidlEnvironment* Instance() {
+ static FaceHidlEnvironment* instance = new FaceHidlEnvironment;
+ return instance;
+ }
+
+ void registerTestServices() override { registerTestService<IBiometricsFace>(); }
+};
+
+class FaceHidlTest : public ::testing::VtsHalHidlTargetTestBase {
+ public:
+ void SetUp() override {
+ mService = ::testing::VtsHalHidlTargetTestBase::getService<IBiometricsFace>(
+ FaceHidlEnvironment::Instance()->getServiceName<IBiometricsFace>());
+ ASSERT_FALSE(mService == nullptr);
+ Return<Status> res = mService->setActiveUser(kUserId, kTmpDir);
+ ASSERT_EQ(Status::OK, static_cast<Status>(res));
+ }
+
+ void TearDown() override {}
+
+ sp<IBiometricsFace> mService;
+};
+
+// The service should be reachable.
+TEST_F(FaceHidlTest, ConnectTest) {
+ sp<FaceCallbackBase> cb = new FaceCallbackBase();
+ mService->setCallback(cb, kAssertCallbackIsSet);
+}
+
+// Starting the service with null callback should succeed.
+TEST_F(FaceHidlTest, ConnectNullTest) {
+ mService->setCallback(nullptr, kAssertCallbackIsSet);
+}
+
+// generateChallenge should always return a unique, cryptographically secure,
+// non-zero number.
+TEST_F(FaceHidlTest, GenerateChallengeTest) {
+ std::map<uint64_t, int> m;
+ for (int i = 0; i < kIterations; ++i) {
+ mService->generateChallenge(kTimeout, [&m](const OptionalUint64& res) {
+ ASSERT_EQ(Status::OK, res.status);
+ EXPECT_NE(0UL, res.value);
+ m[res.value]++;
+ EXPECT_EQ(1UL, m[res.value]);
+ });
+ }
+}
+
+// enroll with an invalid (all zeroes) HAT should fail.
+TEST_F(FaceHidlTest, EnrollZeroHatTest) {
+ sp<ErrorCallback> cb = new ErrorCallback();
+ mService->setCallback(cb, kAssertCallbackIsSet);
+
+ hidl_vec<uint8_t> token(69);
+ for (size_t i = 0; i < 69; i++) {
+ token[i] = 0;
+ }
+
+ Return<Status> res = mService->enroll(token, kTimeout, {});
+ ASSERT_EQ(Status::OK, static_cast<Status>(res));
+
+ // At least one call to onError should occur
+ ASSERT_TRUE(waitForCallback(cb->promise.get_future()));
+ ASSERT_TRUE(cb->hasError);
+}
+
+// enroll with an invalid HAT should fail.
+TEST_F(FaceHidlTest, EnrollGarbageHatTest) {
+ sp<ErrorCallback> cb = new ErrorCallback();
+ mService->setCallback(cb, kAssertCallbackIsSet);
+
+ // Filling HAT with invalid data
+ hidl_vec<uint8_t> token(69);
+ for (size_t i = 0; i < 69; ++i) {
+ token[i] = i;
+ }
+
+ Return<Status> res = mService->enroll(token, kTimeout, {});
+ ASSERT_EQ(Status::OK, static_cast<Status>(res));
+
+ // At least one call to onError should occur
+ ASSERT_TRUE(waitForCallback(cb->promise.get_future()));
+ ASSERT_TRUE(cb->hasError);
+}
+
+// setFeature with an invalid (all zeros) HAT should fail.
+TEST_F(FaceHidlTest, SetFeatureZeroHatTest) {
+ sp<ErrorCallback> cb = new ErrorCallback();
+ mService->setCallback(cb, kAssertCallbackIsSet);
+
+ hidl_vec<uint8_t> token(69);
+ for (size_t i = 0; i < 69; i++) {
+ token[i] = 0;
+ }
+
+ Return<Status> res = mService->setFeature(Feature::REQUIRE_DIVERSITY, false, token, 0);
+ ASSERT_EQ(Status::ILLEGAL_ARGUMENT, static_cast<Status>(res));
+}
+
+// setFeature with an invalid HAT should fail.
+TEST_F(FaceHidlTest, SetFeatureGarbageHatTest) {
+ sp<ErrorCallback> cb = new ErrorCallback();
+ mService->setCallback(cb, kAssertCallbackIsSet);
+
+ // Filling HAT with invalid data
+ hidl_vec<uint8_t> token(69);
+ for (size_t i = 0; i < 69; ++i) {
+ token[i] = i;
+ }
+
+ Return<Status> res = mService->setFeature(Feature::REQUIRE_DIVERSITY, false, token, 0);
+ ASSERT_EQ(Status::ILLEGAL_ARGUMENT, static_cast<Status>(res));
+}
+
+void assertGetFeatureFails(sp<IBiometricsFace> service, int faceId, Feature feature) {
+ std::promise<void> promise;
+
+ // Features cannot be retrieved for invalid faces.
+ Return<void> res = service->getFeature(feature, faceId, [&promise](const OptionalBool& result) {
+ ASSERT_EQ(Status::ILLEGAL_ARGUMENT, result.status);
+ promise.set_value();
+ });
+ ASSERT_TRUE(waitForCallback(promise.get_future()));
+}
+
+TEST_F(FaceHidlTest, GetFeatureRequireAttentionTest) {
+ assertGetFeatureFails(mService, 0 /* faceId */, Feature::REQUIRE_ATTENTION);
+}
+
+TEST_F(FaceHidlTest, GetFeatureRequireDiversityTest) {
+ assertGetFeatureFails(mService, 0 /* faceId */, Feature::REQUIRE_DIVERSITY);
+}
+
+// revokeChallenge should always return within the timeout
+TEST_F(FaceHidlTest, RevokeChallengeTest) {
+ sp<FaceCallbackBase> cb = new FaceCallbackBase();
+ mService->setCallback(cb, kAssertCallbackIsSet);
+
+ auto start = std::chrono::system_clock::now();
+ mService->revokeChallenge();
+ auto elapsed = std::chrono::system_clock::now() - start;
+ ASSERT_GE(kTimeoutInSeconds, elapsed);
+}
+
+// The call to getAuthenticatorId should succeed.
+TEST_F(FaceHidlTest, GetAuthenticatorIdTest) {
+ mService->getAuthenticatorId(
+ [](const OptionalUint64& res) { ASSERT_EQ(Status::OK, res.status); });
+}
+
+// The call to enumerate should succeed.
+TEST_F(FaceHidlTest, EnumerateTest) {
+ sp<EnumerateCallback> cb = new EnumerateCallback();
+ mService->setCallback(cb, kAssertCallbackIsSet);
+ Return<Status> res = mService->enumerate();
+ ASSERT_EQ(Status::OK, static_cast<Status>(res));
+ ASSERT_TRUE(waitForCallback(cb->promise.get_future()));
+}
+
+// The call to remove should succeed for any faceId
+TEST_F(FaceHidlTest, RemoveFaceTest) {
+ sp<ErrorCallback> cb = new ErrorCallback();
+ mService->setCallback(cb, kAssertCallbackIsSet);
+
+ // Remove a face
+ Return<Status> res = mService->remove(kFaceId);
+ ASSERT_EQ(Status::OK, static_cast<Status>(res));
+}
+
+// Remove should accept 0 to delete all faces
+TEST_F(FaceHidlTest, RemoveAllFacesTest) {
+ sp<ErrorCallback> cb = new ErrorCallback();
+ mService->setCallback(cb, kAssertCallbackIsSet);
+
+ // Remove all faces
+ Return<Status> res = mService->remove(0);
+ ASSERT_EQ(Status::OK, static_cast<Status>(res));
+}
+
+// Active user should successfully set to a writable location.
+TEST_F(FaceHidlTest, SetActiveUserTest) {
+ // Create an active user
+ Return<Status> res = mService->setActiveUser(2, kTmpDir);
+ ASSERT_EQ(Status::OK, static_cast<Status>(res));
+
+ // Reset active user
+ res = mService->setActiveUser(kUserId, kTmpDir);
+ ASSERT_EQ(Status::OK, static_cast<Status>(res));
+}
+
+// Active user should fail to set to an unwritable location.
+TEST_F(FaceHidlTest, SetActiveUserUnwritableTest) {
+ // Create an active user to an unwritable location (device root dir)
+ Return<Status> res = mService->setActiveUser(3, "/");
+ ASSERT_NE(Status::OK, static_cast<Status>(res));
+
+ // Reset active user
+ res = mService->setActiveUser(kUserId, kTmpDir);
+ ASSERT_EQ(Status::OK, static_cast<Status>(res));
+}
+
+// Active user should fail to set to a null location.
+TEST_F(FaceHidlTest, SetActiveUserNullTest) {
+ // Create an active user to a null location.
+ Return<Status> res = mService->setActiveUser(4, nullptr);
+ ASSERT_NE(Status::OK, static_cast<Status>(res));
+
+ // Reset active user
+ res = mService->setActiveUser(kUserId, kTmpDir);
+ ASSERT_EQ(Status::OK, static_cast<Status>(res));
+}
+
+// Cancel should always return CANCELED from any starting state including
+// the IDLE state.
+TEST_F(FaceHidlTest, CancelTest) {
+ sp<ErrorCallback> cb = new ErrorCallback(true, FaceError::CANCELED);
+ mService->setCallback(cb, kAssertCallbackIsSet);
+
+ Return<Status> res = mService->cancel();
+ // check that we were able to make an IPC request successfully
+ ASSERT_EQ(Status::OK, static_cast<Status>(res));
+
+ // make sure callback was invoked within kTimeoutInSeconds
+ ASSERT_TRUE(waitForCallback(cb->promise.get_future()));
+ // check error should be CANCELED
+ ASSERT_EQ(FaceError::CANCELED, cb->error);
+}
+
+TEST_F(FaceHidlTest, OnLockoutChangedTest) {
+ sp<LockoutChangedCallback> cb = new LockoutChangedCallback();
+ mService->setCallback(cb, kAssertCallbackIsSet);
+
+ // Update active user and ensure lockout duration 0 is received
+ mService->setActiveUser(5, kTmpDir);
+
+ // Make sure callback was invoked
+ ASSERT_TRUE(waitForCallback(cb->promise.get_future()));
+
+ // Check that duration 0 was received
+ ASSERT_EQ(0, cb->duration);
+}
+
+} // anonymous namespace
+
+int main(int argc, char** argv) {
+ ::testing::AddGlobalTestEnvironment(FaceHidlEnvironment::Instance());
+ ::testing::InitGoogleTest(&argc, argv);
+ FaceHidlEnvironment::Instance()->init(&argc, argv);
+ int status = RUN_ALL_TESTS();
+ LOG(INFO) << "Test result = " << status;
+ return status;
+}
diff --git a/biometrics/fingerprint/2.1/Android.bp b/biometrics/fingerprint/2.1/Android.bp
index dbcce92..cff43c4 100644
--- a/biometrics/fingerprint/2.1/Android.bp
+++ b/biometrics/fingerprint/2.1/Android.bp
@@ -14,17 +14,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "FingerprintAcquired",
- "FingerprintAcquiredInfo",
- "FingerprintAuthenticated",
- "FingerprintEnroll",
- "FingerprintError",
- "FingerprintFingerId",
- "FingerprintIterator",
- "FingerprintMsgType",
- "RequestStatus",
- ],
gen_java: true,
}
diff --git a/bluetooth/1.0/Android.bp b/bluetooth/1.0/Android.bp
index 49df8a3..67f1a4f 100644
--- a/bluetooth/1.0/Android.bp
+++ b/bluetooth/1.0/Android.bp
@@ -14,9 +14,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "Status",
- ],
gen_java: true,
}
diff --git a/bluetooth/a2dp/1.0/Android.bp b/bluetooth/a2dp/1.0/Android.bp
index 5e85290..fa46a1c 100644
--- a/bluetooth/a2dp/1.0/Android.bp
+++ b/bluetooth/a2dp/1.0/Android.bp
@@ -14,14 +14,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "BitsPerSample",
- "ChannelMode",
- "CodecConfiguration",
- "CodecType",
- "SampleRate",
- "Status",
- ],
gen_java: false,
}
diff --git a/bluetooth/audio/2.0/Android.bp b/bluetooth/audio/2.0/Android.bp
index e72b6ab..a020f22 100644
--- a/bluetooth/audio/2.0/Android.bp
+++ b/bluetooth/audio/2.0/Android.bp
@@ -17,32 +17,6 @@
"android.hidl.base@1.0",
"android.hidl.safe_union@1.0",
],
- types: [
- "AacObjectType",
- "AacParameters",
- "AacVariableBitRate",
- "AptxParameters",
- "AudioCapabilities",
- "AudioConfiguration",
- "BitsPerSample",
- "ChannelMode",
- "CodecCapabilities",
- "CodecConfiguration",
- "CodecType",
- "LdacChannelMode",
- "LdacParameters",
- "LdacQualityIndex",
- "PcmParameters",
- "SampleRate",
- "SbcAllocMethod",
- "SbcBlockLength",
- "SbcChannelMode",
- "SbcNumSubbands",
- "SbcParameters",
- "SessionType",
- "Status",
- "TimeSpec",
- ],
gen_java: false,
}
diff --git a/boot/1.0/Android.bp b/boot/1.0/Android.bp
index 85c3b61..b580cac 100644
--- a/boot/1.0/Android.bp
+++ b/boot/1.0/Android.bp
@@ -13,10 +13,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "BoolResult",
- "CommandResult",
- ],
gen_java: true,
}
diff --git a/broadcastradio/1.0/Android.bp b/broadcastradio/1.0/Android.bp
index ecfecc4..76e580e 100644
--- a/broadcastradio/1.0/Android.bp
+++ b/broadcastradio/1.0/Android.bp
@@ -16,23 +16,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "AmBandConfig",
- "Band",
- "BandConfig",
- "Class",
- "Deemphasis",
- "Direction",
- "FmBandConfig",
- "MetaData",
- "MetaDataClock",
- "MetadataKey",
- "MetadataType",
- "ProgramInfo",
- "Properties",
- "Rds",
- "Result",
- ],
gen_java: false,
}
diff --git a/broadcastradio/1.1/Android.bp b/broadcastradio/1.1/Android.bp
index 1d59105..2186b9a 100644
--- a/broadcastradio/1.1/Android.bp
+++ b/broadcastradio/1.1/Android.bp
@@ -17,18 +17,6 @@
"android.hardware.broadcastradio@1.0",
"android.hidl.base@1.0",
],
- types: [
- "IdentifierType",
- "Modulation",
- "ProgramIdentifier",
- "ProgramInfo",
- "ProgramInfoFlags",
- "ProgramListResult",
- "ProgramSelector",
- "ProgramType",
- "Properties",
- "VendorKeyValue",
- ],
gen_java: false,
}
diff --git a/broadcastradio/2.0/Android.bp b/broadcastradio/2.0/Android.bp
index 2434fdc..93afc02 100644
--- a/broadcastradio/2.0/Android.bp
+++ b/broadcastradio/2.0/Android.bp
@@ -17,29 +17,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "AmFmBandRange",
- "AmFmRegionConfig",
- "Announcement",
- "AnnouncementType",
- "ConfigFlag",
- "Constants",
- "DabTableEntry",
- "Deemphasis",
- "IdentifierType",
- "Metadata",
- "MetadataKey",
- "ProgramFilter",
- "ProgramIdentifier",
- "ProgramInfo",
- "ProgramInfoFlags",
- "ProgramListChunk",
- "ProgramSelector",
- "Properties",
- "Rds",
- "Result",
- "VendorKeyValue",
- ],
gen_java: true,
}
diff --git a/camera/common/1.0/Android.bp b/camera/common/1.0/Android.bp
index c42e054..fe29774 100644
--- a/camera/common/1.0/Android.bp
+++ b/camera/common/1.0/Android.bp
@@ -9,17 +9,6 @@
srcs: [
"types.hal",
],
- types: [
- "CameraDeviceStatus",
- "CameraMetadataType",
- "CameraResourceCost",
- "Status",
- "TagBoundaryId",
- "TorchMode",
- "TorchModeStatus",
- "VendorTag",
- "VendorTagSection",
- ],
gen_java: true,
}
diff --git a/camera/device/1.0/Android.bp b/camera/device/1.0/Android.bp
index b08f873..a8df1ec 100644
--- a/camera/device/1.0/Android.bp
+++ b/camera/device/1.0/Android.bp
@@ -17,18 +17,6 @@
"android.hardware.graphics.common@1.0",
"android.hidl.base@1.0",
],
- types: [
- "CameraFace",
- "CameraFacing",
- "CameraFrameMetadata",
- "CameraInfo",
- "CommandType",
- "DataCallbackMsg",
- "FrameCallbackFlag",
- "HandleTimestampMessage",
- "NotifyCallbackMsg",
- "VideoFrameMessage",
- ],
gen_java: true,
}
diff --git a/camera/device/3.2/Android.bp b/camera/device/3.2/Android.bp
index a8a164e..e7546de 100644
--- a/camera/device/3.2/Android.bp
+++ b/camera/device/3.2/Android.bp
@@ -17,28 +17,6 @@
"android.hardware.graphics.common@1.0",
"android.hidl.base@1.0",
],
- types: [
- "BufferCache",
- "BufferStatus",
- "CameraBlob",
- "CameraBlobId",
- "CaptureRequest",
- "CaptureResult",
- "ErrorCode",
- "ErrorMsg",
- "HalStream",
- "HalStreamConfiguration",
- "MsgType",
- "NotifyMsg",
- "RequestTemplate",
- "ShutterMsg",
- "Stream",
- "StreamBuffer",
- "StreamConfiguration",
- "StreamConfigurationMode",
- "StreamRotation",
- "StreamType",
- ],
gen_java: false,
}
diff --git a/camera/device/3.3/Android.bp b/camera/device/3.3/Android.bp
index f006f79..e21824f 100644
--- a/camera/device/3.3/Android.bp
+++ b/camera/device/3.3/Android.bp
@@ -16,10 +16,6 @@
"android.hardware.graphics.common@1.0",
"android.hidl.base@1.0",
],
- types: [
- "HalStream",
- "HalStreamConfiguration",
- ],
gen_java: false,
}
diff --git a/camera/device/3.4/Android.bp b/camera/device/3.4/Android.bp
index 2c649ba..6a2eac5 100644
--- a/camera/device/3.4/Android.bp
+++ b/camera/device/3.4/Android.bp
@@ -18,16 +18,6 @@
"android.hardware.graphics.common@1.0",
"android.hidl.base@1.0",
],
- types: [
- "CaptureRequest",
- "CaptureResult",
- "HalStream",
- "HalStreamConfiguration",
- "PhysicalCameraMetadata",
- "PhysicalCameraSetting",
- "Stream",
- "StreamConfiguration",
- ],
gen_java: false,
}
diff --git a/camera/device/3.5/Android.bp b/camera/device/3.5/Android.bp
index 6d18367..d51fd0e 100644
--- a/camera/device/3.5/Android.bp
+++ b/camera/device/3.5/Android.bp
@@ -20,16 +20,6 @@
"android.hardware.graphics.common@1.0",
"android.hidl.base@1.0",
],
- types: [
- "BufferRequest",
- "BufferRequestStatus",
- "CameraBlob",
- "CameraBlobId",
- "StreamBufferRequestError",
- "StreamBufferRet",
- "StreamBuffersVal",
- "StreamConfiguration",
- ],
gen_java: false,
}
diff --git a/camera/device/3.5/default/CameraDeviceSession.cpp b/camera/device/3.5/default/CameraDeviceSession.cpp
index bea1be6..e812e50 100644
--- a/camera/device/3.5/default/CameraDeviceSession.cpp
+++ b/camera/device/3.5/default/CameraDeviceSession.cpp
@@ -273,6 +273,7 @@
int streamId = bufRets[i].streamId;
const hidl_vec<StreamBuffer>& hBufs = bufRets[i].val.buffers();
camera3_stream_buffer_t* outBufs = returned_buf_reqs[i].output_buffers;
+ returned_buf_reqs[i].num_output_buffers = hBufs.size();
for (size_t b = 0; b < hBufs.size(); b++) {
const StreamBuffer& hBuf = hBufs[b];
camera3_stream_buffer_t& outBuf = outBufs[b];
@@ -281,27 +282,19 @@
hBuf.bufferId, hBuf.buffer.getNativeHandle(),
/*out*/&(outBuf.buffer),
/*allowEmptyBuf*/false);
- if (s != Status::OK) {
- ALOGE("%s: import stream %d bufferId %" PRIu64 " failed!",
- __FUNCTION__, streamId, hBuf.bufferId);
- cleanupInflightBufferFences(importedFences, importedBuffers);
- // Buffer import should never fail - restart HAL since something is very
- // wrong.
- assert(false);
- return CAMERA3_BUF_REQ_FAILED_UNKNOWN;
- }
+ // Buffer import should never fail - restart HAL since something is very wrong.
+ LOG_ALWAYS_FATAL_IF(s != Status::OK,
+ "%s: import stream %d bufferId %" PRIu64 " failed!",
+ __FUNCTION__, streamId, hBuf.bufferId);
pushBufferId(*(outBuf.buffer), hBuf.bufferId, streamId);
importedBuffers.push_back(std::make_pair(*(outBuf.buffer), streamId));
- if (!sHandleImporter.importFence(
- hBuf.acquireFence,
- outBuf.acquire_fence)) {
- ALOGE("%s: stream %d bufferId %" PRIu64 "acquire fence is invalid",
+ bool succ = sHandleImporter.importFence(hBuf.acquireFence, outBuf.acquire_fence);
+ // Fence import should never fail - restart HAL since something is very wrong.
+ LOG_ALWAYS_FATAL_IF(!succ,
+ "%s: stream %d bufferId %" PRIu64 "acquire fence is invalid",
__FUNCTION__, streamId, hBuf.bufferId);
- cleanupInflightBufferFences(importedFences, importedBuffers);
- return CAMERA3_BUF_REQ_FAILED_UNKNOWN;
- }
importedFences.push_back(outBuf.acquire_fence);
outBuf.stream = returned_buf_reqs[i].stream;
outBuf.status = CAMERA3_BUFFER_STATUS_OK;
diff --git a/camera/device/3.5/types.hal b/camera/device/3.5/types.hal
index e3c2350..f98c603 100644
--- a/camera/device/3.5/types.hal
+++ b/camera/device/3.5/types.hal
@@ -142,7 +142,9 @@
* To capture a JPEG APP segments blob, a stream is created using the pixel format
* HAL_PIXEL_FORMAT_BLOB and dataspace HAL_DATASPACE_JPEG_APP_SEGMENTS. The buffer
* size for the stream is calculated by the framework, based on the static
- * metadata field android.heic.maxAppSegmentsCount.
+ * metadata field android.heic.maxAppSegmentsCount, and is assigned to both
+ * @3.2::Stream::width and @3.4::Stream::bufferSize. Camera framework sets
+ * @3.2::Stream::height to 1.
*
* Similar to JPEG image, the JPEG APP segment images can be of variable size,
* so the HAL needs to include the final size of all APP segments using this
diff --git a/camera/metadata/3.2/Android.bp b/camera/metadata/3.2/Android.bp
index bce2c9b..3271d91 100644
--- a/camera/metadata/3.2/Android.bp
+++ b/camera/metadata/3.2/Android.bp
@@ -9,72 +9,6 @@
srcs: [
"types.hal",
],
- types: [
- "CameraMetadataEnumAndroidBlackLevelLock",
- "CameraMetadataEnumAndroidColorCorrectionAberrationMode",
- "CameraMetadataEnumAndroidColorCorrectionMode",
- "CameraMetadataEnumAndroidControlAeAntibandingMode",
- "CameraMetadataEnumAndroidControlAeLock",
- "CameraMetadataEnumAndroidControlAeLockAvailable",
- "CameraMetadataEnumAndroidControlAeMode",
- "CameraMetadataEnumAndroidControlAePrecaptureTrigger",
- "CameraMetadataEnumAndroidControlAeState",
- "CameraMetadataEnumAndroidControlAfMode",
- "CameraMetadataEnumAndroidControlAfState",
- "CameraMetadataEnumAndroidControlAfTrigger",
- "CameraMetadataEnumAndroidControlAwbLock",
- "CameraMetadataEnumAndroidControlAwbLockAvailable",
- "CameraMetadataEnumAndroidControlAwbMode",
- "CameraMetadataEnumAndroidControlAwbState",
- "CameraMetadataEnumAndroidControlCaptureIntent",
- "CameraMetadataEnumAndroidControlEffectMode",
- "CameraMetadataEnumAndroidControlEnableZsl",
- "CameraMetadataEnumAndroidControlMode",
- "CameraMetadataEnumAndroidControlSceneMode",
- "CameraMetadataEnumAndroidControlVideoStabilizationMode",
- "CameraMetadataEnumAndroidDemosaicMode",
- "CameraMetadataEnumAndroidDepthAvailableDepthStreamConfigurations",
- "CameraMetadataEnumAndroidDepthDepthIsExclusive",
- "CameraMetadataEnumAndroidEdgeMode",
- "CameraMetadataEnumAndroidFlashInfoAvailable",
- "CameraMetadataEnumAndroidFlashMode",
- "CameraMetadataEnumAndroidFlashState",
- "CameraMetadataEnumAndroidHotPixelMode",
- "CameraMetadataEnumAndroidInfoSupportedHardwareLevel",
- "CameraMetadataEnumAndroidLedAvailableLeds",
- "CameraMetadataEnumAndroidLedTransmit",
- "CameraMetadataEnumAndroidLensFacing",
- "CameraMetadataEnumAndroidLensInfoFocusDistanceCalibration",
- "CameraMetadataEnumAndroidLensOpticalStabilizationMode",
- "CameraMetadataEnumAndroidLensState",
- "CameraMetadataEnumAndroidNoiseReductionMode",
- "CameraMetadataEnumAndroidQuirksPartialResult",
- "CameraMetadataEnumAndroidRequestAvailableCapabilities",
- "CameraMetadataEnumAndroidRequestMetadataMode",
- "CameraMetadataEnumAndroidRequestType",
- "CameraMetadataEnumAndroidScalerAvailableFormats",
- "CameraMetadataEnumAndroidScalerAvailableStreamConfigurations",
- "CameraMetadataEnumAndroidScalerCroppingType",
- "CameraMetadataEnumAndroidSensorInfoColorFilterArrangement",
- "CameraMetadataEnumAndroidSensorInfoLensShadingApplied",
- "CameraMetadataEnumAndroidSensorInfoTimestampSource",
- "CameraMetadataEnumAndroidSensorReferenceIlluminant1",
- "CameraMetadataEnumAndroidSensorTestPatternMode",
- "CameraMetadataEnumAndroidShadingMode",
- "CameraMetadataEnumAndroidStatisticsFaceDetectMode",
- "CameraMetadataEnumAndroidStatisticsHistogramMode",
- "CameraMetadataEnumAndroidStatisticsHotPixelMapMode",
- "CameraMetadataEnumAndroidStatisticsLensShadingMapMode",
- "CameraMetadataEnumAndroidStatisticsSceneFlicker",
- "CameraMetadataEnumAndroidStatisticsSharpnessMapMode",
- "CameraMetadataEnumAndroidSyncFrameNumber",
- "CameraMetadataEnumAndroidSyncMaxLatency",
- "CameraMetadataEnumAndroidTonemapMode",
- "CameraMetadataEnumAndroidTonemapPresetCurve",
- "CameraMetadataSection",
- "CameraMetadataSectionStart",
- "CameraMetadataTag",
- ],
gen_java: true,
}
diff --git a/camera/metadata/3.3/Android.bp b/camera/metadata/3.3/Android.bp
index ad6f141..4dddfad 100644
--- a/camera/metadata/3.3/Android.bp
+++ b/camera/metadata/3.3/Android.bp
@@ -12,20 +12,6 @@
interfaces: [
"android.hardware.camera.metadata@3.2",
],
- types: [
- "CameraMetadataEnumAndroidControlAeMode",
- "CameraMetadataEnumAndroidControlAfSceneChange",
- "CameraMetadataEnumAndroidControlCaptureIntent",
- "CameraMetadataEnumAndroidDistortionCorrectionMode",
- "CameraMetadataEnumAndroidInfoSupportedHardwareLevel",
- "CameraMetadataEnumAndroidLensPoseReference",
- "CameraMetadataEnumAndroidLogicalMultiCameraSensorSyncType",
- "CameraMetadataEnumAndroidRequestAvailableCapabilities",
- "CameraMetadataEnumAndroidStatisticsOisDataMode",
- "CameraMetadataSection",
- "CameraMetadataSectionStart",
- "CameraMetadataTag",
- ],
gen_java: true,
}
diff --git a/camera/metadata/3.3/types.hal b/camera/metadata/3.3/types.hal
index 27d82b9..1ed8ed8 100644
--- a/camera/metadata/3.3/types.hal
+++ b/camera/metadata/3.3/types.hal
@@ -98,7 +98,7 @@
*/
ANDROID_REQUEST_AVAILABLE_SESSION_KEYS = android.hardware.camera.metadata@3.2::CameraMetadataTag:ANDROID_REQUEST_END,
- /** android.request.availablePhysicalCameraRequestKeys [static, int32[], hidden]
+ /** android.request.availablePhysicalCameraRequestKeys [static, int32[], ndk_public]
*
* <p>A subset of the available request keys that can be overridden for
* physical devices backing a logical multi-camera.</p>
diff --git a/camera/metadata/3.4/Android.bp b/camera/metadata/3.4/Android.bp
index d1cba14..2b75eba 100644
--- a/camera/metadata/3.4/Android.bp
+++ b/camera/metadata/3.4/Android.bp
@@ -13,19 +13,6 @@
"android.hardware.camera.metadata@3.2",
"android.hardware.camera.metadata@3.3",
],
- types: [
- "CameraMetadataEnumAndroidDepthAvailableDynamicDepthStreamConfigurations",
- "CameraMetadataEnumAndroidHeicAvailableHeicStreamConfigurations",
- "CameraMetadataEnumAndroidHeicInfoSupported",
- "CameraMetadataEnumAndroidInfoSupportedBufferManagementVersion",
- "CameraMetadataEnumAndroidRequestAvailableCapabilities",
- "CameraMetadataEnumAndroidScalerAvailableFormats",
- "CameraMetadataEnumAndroidScalerAvailableRecommendedStreamConfigurations",
- "CameraMetadataEnumAndroidSensorInfoColorFilterArrangement",
- "CameraMetadataSection",
- "CameraMetadataSectionStart",
- "CameraMetadataTag",
- ],
gen_java: true,
}
diff --git a/camera/provider/2.5/Android.bp b/camera/provider/2.5/Android.bp
index 3de010a..a4af07e 100644
--- a/camera/provider/2.5/Android.bp
+++ b/camera/provider/2.5/Android.bp
@@ -17,9 +17,6 @@
"android.hardware.camera.provider@2.4",
"android.hidl.base@1.0",
],
- types: [
- "DeviceState",
- ],
gen_java: false,
}
diff --git a/cas/1.0/Android.bp b/cas/1.0/Android.bp
index 39b36be..8d8e946 100644
--- a/cas/1.0/Android.bp
+++ b/cas/1.0/Android.bp
@@ -16,10 +16,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "HidlCasPluginDescriptor",
- "Status",
- ],
gen_java: true,
}
diff --git a/cas/native/1.0/Android.bp b/cas/native/1.0/Android.bp
index 7587416..880eccd 100644
--- a/cas/native/1.0/Android.bp
+++ b/cas/native/1.0/Android.bp
@@ -14,13 +14,6 @@
"android.hardware.cas@1.0",
"android.hidl.base@1.0",
],
- types: [
- "BufferType",
- "DestinationBuffer",
- "ScramblingControl",
- "SharedBuffer",
- "SubSample",
- ],
gen_java: false,
}
diff --git a/compatibility_matrices/compatibility_matrix.current.xml b/compatibility_matrices/compatibility_matrix.current.xml
index 244d7a0..566bd48 100644
--- a/compatibility_matrices/compatibility_matrix.current.xml
+++ b/compatibility_matrices/compatibility_matrix.current.xml
@@ -127,9 +127,9 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="hidl" optional="false">
+ <hal format="hidl" optional="true">
<name>android.hardware.configstore</name>
- <version>1.2</version>
+ <version>1.1</version>
<interface>
<name>ISurfaceFlingerConfigs</name>
<instance>default</instance>
diff --git a/configstore/1.0/Android.bp b/configstore/1.0/Android.bp
index 5e98e5c..a6fd656 100644
--- a/configstore/1.0/Android.bp
+++ b/configstore/1.0/Android.bp
@@ -13,14 +13,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "OptionalBool",
- "OptionalInt32",
- "OptionalInt64",
- "OptionalString",
- "OptionalUInt32",
- "OptionalUInt64",
- ],
gen_java: true,
}
diff --git a/configstore/1.1/Android.bp b/configstore/1.1/Android.bp
index 2b6e6fa..3900d9b 100644
--- a/configstore/1.1/Android.bp
+++ b/configstore/1.1/Android.bp
@@ -14,10 +14,6 @@
"android.hardware.configstore@1.0",
"android.hidl.base@1.0",
],
- types: [
- "DisplayOrientation",
- "OptionalDisplayOrientation",
- ],
gen_java: true,
}
diff --git a/configstore/1.2/default/Android.mk b/configstore/1.1/default/Android.mk
similarity index 70%
rename from configstore/1.2/default/Android.mk
rename to configstore/1.1/default/Android.mk
index b807357..104e15e 100644
--- a/configstore/1.2/default/Android.mk
+++ b/configstore/1.1/default/Android.mk
@@ -2,15 +2,15 @@
################################################################################
include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.configstore@1.2-service
+LOCAL_MODULE := android.hardware.configstore@1.1-service
# seccomp is not required for coverage build.
ifneq ($(NATIVE_COVERAGE),true)
-LOCAL_REQUIRED_MODULES_arm64 := configstore.policy
+LOCAL_REQUIRED_MODULES_arm64 := configstore@1.1.policy
endif
LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_MODULE_RELATIVE_PATH := hw
-LOCAL_INIT_RC := android.hardware.configstore@1.2-service.rc
+LOCAL_INIT_RC := android.hardware.configstore@1.1-service.rc
LOCAL_SRC_FILES:= service.cpp
include $(LOCAL_PATH)/surfaceflinger.mk
@@ -23,17 +23,16 @@
liblog \
libutils \
android.hardware.configstore@1.0 \
- android.hardware.configstore@1.1 \
- android.hardware.configstore@1.2
+ android.hardware.configstore@1.1
include $(BUILD_EXECUTABLE)
# seccomp filter for configstore
ifeq ($(TARGET_ARCH), $(filter $(TARGET_ARCH), arm64))
include $(CLEAR_VARS)
-LOCAL_MODULE := configstore.policy
+LOCAL_MODULE := configstore@1.1.policy
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/seccomp_policy
-LOCAL_SRC_FILES := seccomp_policy/configstore-$(TARGET_ARCH).policy
+LOCAL_SRC_FILES := seccomp_policy/configstore@1.1-$(TARGET_ARCH).policy
include $(BUILD_PREBUILT)
endif
diff --git a/configstore/1.1/default/SurfaceFlingerConfigs.cpp b/configstore/1.1/default/SurfaceFlingerConfigs.cpp
new file mode 100644
index 0000000..377e467
--- /dev/null
+++ b/configstore/1.1/default/SurfaceFlingerConfigs.cpp
@@ -0,0 +1,196 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.1 (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.1
+ *
+ * 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.
+ */
+
+#include "SurfaceFlingerConfigs.h"
+
+#include <android/hardware/configstore/1.1/types.h>
+#include <log/log.h>
+
+namespace android {
+namespace hardware {
+namespace configstore {
+namespace V1_1 {
+namespace implementation {
+
+// ::android::hardware::configstore::V1_0::ISurfaceFlingerConfigs implementation.
+Return<void> SurfaceFlingerConfigs::vsyncEventPhaseOffsetNs(vsyncEventPhaseOffsetNs_cb _hidl_cb) {
+#ifdef VSYNC_EVENT_PHASE_OFFSET_NS
+ _hidl_cb({true, VSYNC_EVENT_PHASE_OFFSET_NS});
+#else
+ _hidl_cb({false, 0});
+#endif
+ return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::vsyncSfEventPhaseOffsetNs(vsyncEventPhaseOffsetNs_cb _hidl_cb) {
+#ifdef SF_VSYNC_EVENT_PHASE_OFFSET_NS
+ _hidl_cb({true, SF_VSYNC_EVENT_PHASE_OFFSET_NS});
+#else
+ _hidl_cb({false, 0});
+#endif
+ return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::useContextPriority(useContextPriority_cb _hidl_cb) {
+#ifdef USE_CONTEXT_PRIORITY
+ _hidl_cb({true, USE_CONTEXT_PRIORITY});
+#else
+ _hidl_cb({false, false});
+#endif
+ return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::maxFrameBufferAcquiredBuffers(
+ maxFrameBufferAcquiredBuffers_cb _hidl_cb) {
+#ifdef NUM_FRAMEBUFFER_SURFACE_BUFFERS
+ _hidl_cb({true, NUM_FRAMEBUFFER_SURFACE_BUFFERS});
+#else
+ _hidl_cb({false, 0});
+#endif
+ return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::hasWideColorDisplay(hasWideColorDisplay_cb _hidl_cb) {
+ bool value = false;
+#ifdef HAS_WIDE_COLOR_DISPLAY
+ value = true;
+#endif
+ _hidl_cb({true, value});
+ return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::hasSyncFramework(hasSyncFramework_cb _hidl_cb) {
+ bool value = true;
+#ifdef RUNNING_WITHOUT_SYNC_FRAMEWORK
+ value = false;
+#endif
+ _hidl_cb({true, value});
+ return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::hasHDRDisplay(hasHDRDisplay_cb _hidl_cb) {
+ bool value = false;
+#ifdef HAS_HDR_DISPLAY
+ value = true;
+#endif
+ _hidl_cb({true, value});
+ return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::presentTimeOffsetFromVSyncNs(
+ presentTimeOffsetFromVSyncNs_cb _hidl_cb) {
+#ifdef PRESENT_TIME_OFFSET_FROM_VSYNC_NS
+ _hidl_cb({true, PRESENT_TIME_OFFSET_FROM_VSYNC_NS});
+#else
+ _hidl_cb({false, 0});
+#endif
+ return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::useHwcForRGBtoYUV(useHwcForRGBtoYUV_cb _hidl_cb) {
+ bool value = false;
+#ifdef FORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS
+ value = true;
+#endif
+ _hidl_cb({true, value});
+ return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::maxVirtualDisplaySize(maxVirtualDisplaySize_cb _hidl_cb) {
+ uint64_t maxSize = 0;
+#ifdef MAX_VIRTUAL_DISPLAY_DIMENSION
+ maxSize = MAX_VIRTUAL_DISPLAY_DIMENSION;
+ _hidl_cb({true, maxSize});
+#else
+ _hidl_cb({false, maxSize});
+#endif
+ return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::useVrFlinger(useVrFlinger_cb _hidl_cb) {
+ bool value = false;
+ bool specified = false;
+#ifdef USE_VR_FLINGER
+ value = true;
+ specified = true;
+#endif
+ _hidl_cb({specified, value});
+ return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::startGraphicsAllocatorService(
+ startGraphicsAllocatorService_cb _hidl_cb) {
+ bool value = false;
+#ifdef START_GRAPHICS_ALLOCATOR_SERVICE
+ value = true;
+#endif
+ _hidl_cb({true, value});
+ return Void();
+}
+
+// ::android::hardware::configstore::V1_1::ISurfaceFlingerConfigs implementation.
+
+#ifdef PRIMARY_DISPLAY_ORIENTATION
+static_assert(PRIMARY_DISPLAY_ORIENTATION == 0 || PRIMARY_DISPLAY_ORIENTATION == 90 ||
+ PRIMARY_DISPLAY_ORIENTATION == 180 || PRIMARY_DISPLAY_ORIENTATION == 270,
+ "Primary display orientation must be 0/90/180/270");
+#endif
+
+Return<void> SurfaceFlingerConfigs::primaryDisplayOrientation(
+ primaryDisplayOrientation_cb _hidl_cb) {
+ using ::android::hardware::configstore::V1_1::DisplayOrientation;
+
+ bool specified = false;
+ DisplayOrientation value = DisplayOrientation::ORIENTATION_0;
+
+ int orientation = 0;
+#ifdef PRIMARY_DISPLAY_ORIENTATION
+ specified = true;
+ orientation = PRIMARY_DISPLAY_ORIENTATION;
+#endif
+
+ switch (orientation) {
+ case 0: {
+ value = DisplayOrientation::ORIENTATION_0;
+ break;
+ }
+ case 90: {
+ value = DisplayOrientation::ORIENTATION_90;
+ break;
+ }
+ case 180: {
+ value = DisplayOrientation::ORIENTATION_180;
+ break;
+ }
+ case 270: {
+ value = DisplayOrientation::ORIENTATION_270;
+ break;
+ }
+ default: {
+ // statically checked above -> memory corruption
+ LOG_ALWAYS_FATAL("Invalid orientation %d", orientation);
+ }
+ }
+
+ _hidl_cb({specified, value});
+ return Void();
+}
+
+} // namespace implementation
+} // namespace V1_1
+} // namespace configstore
+} // namespace hardware
+} // namespace android
diff --git a/configstore/1.2/default/SurfaceFlingerConfigs.h b/configstore/1.1/default/SurfaceFlingerConfigs.h
similarity index 76%
rename from configstore/1.2/default/SurfaceFlingerConfigs.h
rename to configstore/1.1/default/SurfaceFlingerConfigs.h
index 54a6e62..c2f5fef 100644
--- a/configstore/1.2/default/SurfaceFlingerConfigs.h
+++ b/configstore/1.1/default/SurfaceFlingerConfigs.h
@@ -14,23 +14,23 @@
* limitations under the License.
*/
-#ifndef ANDROID_HARDWARE_CONFIGSTORE_V1_2_SURFACEFLINGERCONFIGS_H
-#define ANDROID_HARDWARE_CONFIGSTORE_V1_2_SURFACEFLINGERCONFIGS_H
+#ifndef ANDROID_HARDWARE_CONFIGSTORE_V1_1_SURFACEFLINGERCONFIGS_H
+#define ANDROID_HARDWARE_CONFIGSTORE_V1_1_SURFACEFLINGERCONFIGS_H
-#include <android/hardware/configstore/1.2/ISurfaceFlingerConfigs.h>
+#include <android/hardware/configstore/1.1/ISurfaceFlingerConfigs.h>
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>
namespace android {
namespace hardware {
namespace configstore {
-namespace V1_2 {
+namespace V1_1 {
namespace implementation {
using ::android::sp;
using ::android::hardware::Return;
using ::android::hardware::Void;
-using ::android::hardware::configstore::V1_2::ISurfaceFlingerConfigs;
+using ::android::hardware::configstore::V1_1::ISurfaceFlingerConfigs;
struct SurfaceFlingerConfigs : public ISurfaceFlingerConfigs {
// ::android::hardware::configstore::V1_0::ISurfaceFlingerConfigs implementation.
@@ -49,17 +49,12 @@
// ::android::hardware::configstore::V1_1::ISurfaceFlingerConfigs follow implementation.
Return<void> primaryDisplayOrientation(primaryDisplayOrientation_cb _hidl_cb) override;
-
- // ::android::hardware::configstore::V1_2::ISurfaceFlingerConfigs follow implementation.
- Return<void> useColorManagement(useColorManagement_cb _hidl_cb) override;
- Return<void> getCompositionPreference(getCompositionPreference_cb _hidl_cb) override;
- Return<void> getDisplayNativePrimaries(getDisplayNativePrimaries_cb _hidl_cb) override;
};
} // namespace implementation
-} // namespace V1_2
+} // namespace V1_1
} // namespace configstore
} // namespace hardware
} // namespace android
-#endif // ANDROID_HARDWARE_CONFIGSTORE_V1_2_SURFACEFLINGERCONFIGS_H
+#endif // ANDROID_HARDWARE_CONFIGSTORE_V1_1_SURFACEFLINGERCONFIGS_H
diff --git a/configstore/1.2/default/android.hardware.configstore@1.2-service.rc b/configstore/1.1/default/android.hardware.configstore@1.1-service.rc
similarity index 83%
rename from configstore/1.2/default/android.hardware.configstore@1.2-service.rc
rename to configstore/1.1/default/android.hardware.configstore@1.1-service.rc
index d6c5d10..105678a 100644
--- a/configstore/1.2/default/android.hardware.configstore@1.2-service.rc
+++ b/configstore/1.1/default/android.hardware.configstore@1.1-service.rc
@@ -1,4 +1,4 @@
-service vendor.configstore-hal /vendor/bin/hw/android.hardware.configstore@1.2-service
+service vendor.configstore-hal /vendor/bin/hw/android.hardware.configstore@1.1-service
class hal animation
user system
group system
diff --git a/configstore/1.2/default/seccomp_policy/configstore-arm64.policy b/configstore/1.1/default/seccomp_policy/configstore@1.1-arm64.policy
similarity index 100%
rename from configstore/1.2/default/seccomp_policy/configstore-arm64.policy
rename to configstore/1.1/default/seccomp_policy/configstore@1.1-arm64.policy
diff --git a/configstore/1.2/default/service.cpp b/configstore/1.1/default/service.cpp
similarity index 80%
rename from configstore/1.2/default/service.cpp
rename to configstore/1.1/default/service.cpp
index 65a42f5..e21de0b 100644
--- a/configstore/1.2/default/service.cpp
+++ b/configstore/1.1/default/service.cpp
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-#define LOG_TAG "android.hardware.configstore@1.2-service"
+#define LOG_TAG "android.hardware.configstore@1.1-service"
-#include <android/hardware/configstore/1.2/ISurfaceFlingerConfigs.h>
+#include <android/hardware/configstore/1.1/ISurfaceFlingerConfigs.h>
#include <hidl/HidlTransportSupport.h>
#include <hwminijail/HardwareMinijail.h>
@@ -28,13 +28,13 @@
using android::hardware::configureRpcThreadpool;
using android::hardware::joinRpcThreadpool;
using android::hardware::SetupMinijail;
-using android::hardware::configstore::V1_2::ISurfaceFlingerConfigs;
-using android::hardware::configstore::V1_2::implementation::SurfaceFlingerConfigs;
+using android::hardware::configstore::V1_1::ISurfaceFlingerConfigs;
+using android::hardware::configstore::V1_1::implementation::SurfaceFlingerConfigs;
int main() {
configureRpcThreadpool(10, true);
- SetupMinijail("/vendor/etc/seccomp_policy/configstore.policy");
+ SetupMinijail("/vendor/etc/seccomp_policy/configstore@1.1.policy");
sp<ISurfaceFlingerConfigs> surfaceFlingerConfigs = new SurfaceFlingerConfigs;
status_t status = surfaceFlingerConfigs->registerAsService();
diff --git a/configstore/1.1/default/surfaceflinger.mk b/configstore/1.1/default/surfaceflinger.mk
new file mode 100644
index 0000000..35922eb
--- /dev/null
+++ b/configstore/1.1/default/surfaceflinger.mk
@@ -0,0 +1,56 @@
+
+LOCAL_SRC_FILES += SurfaceFlingerConfigs.cpp
+
+ifneq ($(VSYNC_EVENT_PHASE_OFFSET_NS),)
+ LOCAL_CFLAGS += -DVSYNC_EVENT_PHASE_OFFSET_NS=$(VSYNC_EVENT_PHASE_OFFSET_NS)
+endif
+
+ifneq ($(SF_VSYNC_EVENT_PHASE_OFFSET_NS),)
+ LOCAL_CFLAGS += -DSF_VSYNC_EVENT_PHASE_OFFSET_NS=$(SF_VSYNC_EVENT_PHASE_OFFSET_NS)
+endif
+
+ifeq ($(TARGET_USE_CONTEXT_PRIORITY),true)
+ LOCAL_CFLAGS += -DUSE_CONTEXT_PRIORITY=1
+endif
+
+ifeq ($(TARGET_HAS_WIDE_COLOR_DISPLAY),true)
+ LOCAL_CFLAGS += -DHAS_WIDE_COLOR_DISPLAY
+endif
+
+ifeq ($(TARGET_HAS_HDR_DISPLAY),true)
+ LOCAL_CFLAGS += -DHAS_HDR_DISPLAY
+endif
+
+ifneq ($(PRESENT_TIME_OFFSET_FROM_VSYNC_NS),)
+ LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=$(PRESENT_TIME_OFFSET_FROM_VSYNC_NS)
+else
+ LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=0
+endif
+
+ifeq ($(TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS),true)
+ LOCAL_CFLAGS += -DFORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS
+endif
+
+ifneq ($(MAX_VIRTUAL_DISPLAY_DIMENSION),)
+ LOCAL_CFLAGS += -DMAX_VIRTUAL_DISPLAY_DIMENSION=$(MAX_VIRTUAL_DISPLAY_DIMENSION)
+endif
+
+ifeq ($(TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK),true)
+ LOCAL_CFLAGS += -DRUNNING_WITHOUT_SYNC_FRAMEWORK
+endif
+
+ifneq ($(USE_VR_FLINGER),)
+ LOCAL_CFLAGS += -DUSE_VR_FLINGER
+endif
+
+ifneq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),)
+ LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS)
+endif
+
+ifneq ($(SF_START_GRAPHICS_ALLOCATOR_SERVICE),)
+ LOCAL_CFLAGS += -DSTART_GRAPHICS_ALLOCATOR_SERVICE
+endif
+
+ifneq ($(SF_PRIMARY_DISPLAY_ORIENTATION),)
+ LOCAL_CFLAGS += -DPRIMARY_DISPLAY_ORIENTATION=$(SF_PRIMARY_DISPLAY_ORIENTATION)
+endif
diff --git a/configstore/1.2/Android.bp b/configstore/1.2/Android.bp
deleted file mode 100644
index a3976b6..0000000
--- a/configstore/1.2/Android.bp
+++ /dev/null
@@ -1,27 +0,0 @@
-// This file is autogenerated by hidl-gen -Landroidbp.
-
-hidl_interface {
- name: "android.hardware.configstore@1.2",
- root: "android.hardware",
- vndk: {
- enabled: true,
- },
- srcs: [
- "types.hal",
- "ISurfaceFlingerConfigs.hal",
- ],
- interfaces: [
- "android.hardware.configstore@1.0",
- "android.hardware.configstore@1.1",
- "android.hardware.graphics.common@1.0",
- "android.hardware.graphics.common@1.1",
- "android.hardware.graphics.common@1.2",
- "android.hidl.base@1.0",
- ],
- types: [
- "CieXyz",
- "DisplayPrimaries",
- ],
- gen_java: true,
-}
-
diff --git a/configstore/1.2/ISurfaceFlingerConfigs.hal b/configstore/1.2/ISurfaceFlingerConfigs.hal
deleted file mode 100644
index 431b3fc..0000000
--- a/configstore/1.2/ISurfaceFlingerConfigs.hal
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.1 (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.1
- *
- * 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.configstore@1.2;
-
-import android.hardware.graphics.common@1.2::PixelFormat;
-import android.hardware.graphics.common@1.2::Dataspace;
-import @1.1::ISurfaceFlingerConfigs;
-import @1.0::OptionalBool;
-
-/**
- * New revision of ISurfaceFlingerConfigs
- */
-interface ISurfaceFlingerConfigs extends @1.1::ISurfaceFlingerConfigs {
- /**
- * useColorManagement indicates whether SurfaceFlinger should manage color
- * by switching to appropriate color mode automatically depending on the
- * Dataspace of the surfaces on screen.
- * This function must return true when hasWideColorDisplay or hasHDRDisplay
- * return true.
- */
- useColorManagement() generates (OptionalBool value);
-
- /**
- * Returns the default data space and pixel format that SurfaceFlinger
- * expects to receive and output as well as the wide color gamut data space
- * and pixel format for wide color gamut surfaces.
- * To determine the data space and pixel format, there are a few things
- * we recommend to consider:
- *
- * 1. Hardware composer's capability to composite contents with the chosen
- * data space and pixel format efficiently;
- * 2. Hardware composer's ability to composite contents when sRGB contents
- * and the chosen wide color gamut data space contents coexist;
- * 3. For better blending, consider using pixel format where the alpha
- * channel has as many bits as the RGB color channel.
- * 4. Memory consumption and efficient buffer compression when considering
- * more bits in pixel format.
- *
- * @return dataspace is the default data space that SurfaceFlinger expects.
- * The data space must not be Dataspace::UNKNOWN, if unspecified,
- * the default data space is Dataspace::V0_SRGB;
- * @return pixelFormat is the default pixel format that SurfaceFlinger
- * expects. If unspecified, the default pixel format is
- * PixelFormat::RGBA_8888.
- * @return wcgDataspace is the data space that SurfaceFlinger expects for
- * wide color gamut surfaces.
- * When hasWideColorDisplay returns true, this API must return a
- * valid wide color gamut data space.
- * The data space must not be UNKNOWN, if unspecified, the data space
- * is V0_SRGB by default, which essentially indicates there's no wide
- * color gamut, meaning hasWideColorDisplay returns false.
- * @return wcgPixelFormat is the pixel format that SurfaceFlinger expects for
- * wide color gamut surfaces. If unspecified, the pixel format is
- * PixelFormat::RGBA_8888 by default.
- */
- getCompositionPreference()
- generates (Dataspace dataspace, PixelFormat pixelFormat,
- Dataspace wcgDataspace, PixelFormat wcgPixelFormat);
-
- /**
- * Returns the native panel primary data. The data includes red, green,
- * blue and white. The primary format is CIE 1931 XYZ color space. If
- * unspecified, the primaries is sRGB gamut by default.
- */
- getDisplayNativePrimaries() generates (DisplayPrimaries primaries);
-};
diff --git a/configstore/1.2/default/SurfaceFlingerConfigs.cpp b/configstore/1.2/default/SurfaceFlingerConfigs.cpp
deleted file mode 100644
index 714442b..0000000
--- a/configstore/1.2/default/SurfaceFlingerConfigs.cpp
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.1 (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.1
- *
- * 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.
- */
-
-#include "SurfaceFlingerConfigs.h"
-
-#include <android/hardware/configstore/1.1/types.h>
-#include <android/hardware/configstore/1.2/types.h>
-#include <android/hardware/graphics/common/1.1/types.h>
-#include <log/log.h>
-
-namespace android {
-namespace hardware {
-namespace configstore {
-namespace V1_2 {
-namespace implementation {
-
-using ::android::hardware::graphics::common::V1_2::Dataspace;
-using ::android::hardware::graphics::common::V1_2::PixelFormat;
-
-// ::android::hardware::configstore::V1_0::ISurfaceFlingerConfigs implementation.
-Return<void> SurfaceFlingerConfigs::vsyncEventPhaseOffsetNs(vsyncEventPhaseOffsetNs_cb _hidl_cb) {
-#ifdef VSYNC_EVENT_PHASE_OFFSET_NS
- _hidl_cb({true, VSYNC_EVENT_PHASE_OFFSET_NS});
-#else
- _hidl_cb({false, 0});
-#endif
- return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::vsyncSfEventPhaseOffsetNs(vsyncEventPhaseOffsetNs_cb _hidl_cb) {
-#ifdef SF_VSYNC_EVENT_PHASE_OFFSET_NS
- _hidl_cb({true, SF_VSYNC_EVENT_PHASE_OFFSET_NS});
-#else
- _hidl_cb({false, 0});
-#endif
- return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::useContextPriority(useContextPriority_cb _hidl_cb) {
-#ifdef USE_CONTEXT_PRIORITY
- _hidl_cb({true, USE_CONTEXT_PRIORITY});
-#else
- _hidl_cb({false, false});
-#endif
- return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::maxFrameBufferAcquiredBuffers(
- maxFrameBufferAcquiredBuffers_cb _hidl_cb) {
-#ifdef NUM_FRAMEBUFFER_SURFACE_BUFFERS
- _hidl_cb({true, NUM_FRAMEBUFFER_SURFACE_BUFFERS});
-#else
- _hidl_cb({false, 0});
-#endif
- return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::hasWideColorDisplay(hasWideColorDisplay_cb _hidl_cb) {
- bool value = false;
-#ifdef HAS_WIDE_COLOR_DISPLAY
- value = true;
-#endif
- _hidl_cb({true, value});
- return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::hasSyncFramework(hasSyncFramework_cb _hidl_cb) {
- bool value = true;
-#ifdef RUNNING_WITHOUT_SYNC_FRAMEWORK
- value = false;
-#endif
- _hidl_cb({true, value});
- return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::hasHDRDisplay(hasHDRDisplay_cb _hidl_cb) {
- bool value = false;
-#ifdef HAS_HDR_DISPLAY
- value = true;
-#endif
- _hidl_cb({true, value});
- return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::presentTimeOffsetFromVSyncNs(
- presentTimeOffsetFromVSyncNs_cb _hidl_cb) {
-#ifdef PRESENT_TIME_OFFSET_FROM_VSYNC_NS
- _hidl_cb({true, PRESENT_TIME_OFFSET_FROM_VSYNC_NS});
-#else
- _hidl_cb({false, 0});
-#endif
- return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::useHwcForRGBtoYUV(useHwcForRGBtoYUV_cb _hidl_cb) {
- bool value = false;
-#ifdef FORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS
- value = true;
-#endif
- _hidl_cb({true, value});
- return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::maxVirtualDisplaySize(maxVirtualDisplaySize_cb _hidl_cb) {
- uint64_t maxSize = 0;
-#ifdef MAX_VIRTUAL_DISPLAY_DIMENSION
- maxSize = MAX_VIRTUAL_DISPLAY_DIMENSION;
- _hidl_cb({true, maxSize});
-#else
- _hidl_cb({false, maxSize});
-#endif
- return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::useVrFlinger(useVrFlinger_cb _hidl_cb) {
- bool value = false;
- bool specified = false;
-#ifdef USE_VR_FLINGER
- value = true;
- specified = true;
-#endif
- _hidl_cb({specified, value});
- return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::startGraphicsAllocatorService(
- startGraphicsAllocatorService_cb _hidl_cb) {
- bool value = false;
-#ifdef START_GRAPHICS_ALLOCATOR_SERVICE
- value = true;
-#endif
- _hidl_cb({true, value});
- return Void();
-}
-
-// ::android::hardware::configstore::V1_1::ISurfaceFlingerConfigs implementation.
-
-#ifdef PRIMARY_DISPLAY_ORIENTATION
-static_assert(PRIMARY_DISPLAY_ORIENTATION == 0 || PRIMARY_DISPLAY_ORIENTATION == 90 ||
- PRIMARY_DISPLAY_ORIENTATION == 180 || PRIMARY_DISPLAY_ORIENTATION == 270,
- "Primary display orientation must be 0/90/180/270");
-#endif
-
-Return<void> SurfaceFlingerConfigs::primaryDisplayOrientation(
- primaryDisplayOrientation_cb _hidl_cb) {
- using ::android::hardware::configstore::V1_1::DisplayOrientation;
-
- bool specified = false;
- DisplayOrientation value = DisplayOrientation::ORIENTATION_0;
-
- int orientation = 0;
-#ifdef PRIMARY_DISPLAY_ORIENTATION
- specified = true;
- orientation = PRIMARY_DISPLAY_ORIENTATION;
-#endif
-
- switch (orientation) {
- case 0: {
- value = DisplayOrientation::ORIENTATION_0;
- break;
- }
- case 90: {
- value = DisplayOrientation::ORIENTATION_90;
- break;
- }
- case 180: {
- value = DisplayOrientation::ORIENTATION_180;
- break;
- }
- case 270: {
- value = DisplayOrientation::ORIENTATION_270;
- break;
- }
- default: {
- // statically checked above -> memory corruption
- LOG_ALWAYS_FATAL("Invalid orientation %d", orientation);
- }
- }
-
- _hidl_cb({specified, value});
- return Void();
-}
-
-// ::android::hardware::configstore::V1_2::ISurfaceFlingerConfigs implementation.
-Return<void> SurfaceFlingerConfigs::useColorManagement(useColorManagement_cb _hidl_cb) {
-#if defined(USE_COLOR_MANAGEMENT) || defined(HAS_WIDE_COLOR_DISPLAY) || defined(HAS_HDR_DISPLAY)
- _hidl_cb({true, true});
-#else
- _hidl_cb({true, false});
-#endif
- return Void();
-}
-
-#ifdef DEFAULT_COMPOSITION_DATA_SPACE
-static_assert(DEFAULT_COMPOSITION_DATA_SPACE != 0,
- "Default composition data space must not be UNKNOWN");
-#endif
-
-#ifdef WCG_COMPOSITION_DATA_SPACE
-static_assert(WCG_COMPOSITION_DATA_SPACE != 0,
- "Wide color gamut composition data space must not be UNKNOWN");
-#endif
-
-Return<void> SurfaceFlingerConfigs::getCompositionPreference(getCompositionPreference_cb _hidl_cb) {
- Dataspace defaultDataspace = Dataspace::V0_SRGB;
- PixelFormat defaultPixelFormat = PixelFormat::RGBA_8888;
-
-#ifdef DEFAULT_COMPOSITION_DATA_SPACE
- defaultDataspace = static_cast<Dataspace>(DEFAULT_COMPOSITION_DATA_SPACE);
-#endif
-
-#ifdef DEFAULT_COMPOSITION_PIXEL_FORMAT
- defaultPixelFormat = static_cast<PixelFormat>(DEFAULT_COMPOSITION_PIXEL_FORMAT);
-#endif
-
- Dataspace wideColorGamutDataspace = Dataspace::V0_SRGB;
- PixelFormat wideColorGamutPixelFormat = PixelFormat::RGBA_8888;
-
-#ifdef WCG_COMPOSITION_DATA_SPACE
- wideColorGamutDataspace = static_cast<Dataspace>(WCG_COMPOSITION_DATA_SPACE);
-#endif
-
-#ifdef WCG_COMPOSITION_PIXEL_FORMAT
- wideColorGamutPixelFormat = static_cast<PixelFormat>(WCG_COMPOSITION_PIXEL_FORMAT);
-#endif
-
- _hidl_cb(defaultDataspace, defaultPixelFormat, wideColorGamutDataspace,
- wideColorGamutPixelFormat);
- return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::getDisplayNativePrimaries(getDisplayNativePrimaries_cb _hidl_cb) {
- DisplayPrimaries primaries;
- // The default XYZ is sRGB gamut in CIE1931 color space
-#ifdef TARGET_DISPLAY_PRIMARY_RED_X
- primaries.red.X = TARGET_DISPLAY_PRIMARY_RED_X;
-#else
- primaries.red.X = 0.4123;
-#endif
-
-#ifdef TARGET_DISPLAY_PRIMARY_RED_Y
- primaries.red.Y = TARGET_DISPLAY_PRIMARY_RED_Y;
-#else
- primaries.red.Y = 0.2126;
-#endif
-
-#ifdef TARGET_DISPLAY_PRIMARY_RED_Z
- primaries.red.Z = TARGET_DISPLAY_PRIMARY_RED_Z;
-#else
- primaries.red.Z = 0.0193;
-#endif
-
-#ifdef TARGET_DISPLAY_PRIMARY_GREEN_X
- primaries.green.X = TARGET_DISPLAY_PRIMARY_GREEN_X;
-#else
- primaries.green.X = 0.3576;
-#endif
-
-#ifdef TARGET_DISPLAY_PRIMARY_GREEN_Y
- primaries.green.Y = TARGET_DISPLAY_PRIMARY_GREEN_Y;
-#else
- primaries.green.Y = 0.7152;
-#endif
-
-#ifdef TARGET_DISPLAY_PRIMARY_GREEN_Z
- primaries.green.Z = TARGET_DISPLAY_PRIMARY_GREEN_Z;
-#else
- primaries.green.Z = 0.1192;
-#endif
-
-#ifdef TARGET_DISPLAY_PRIMARY_BLUE_X
- primaries.blue.X = TARGET_DISPLAY_PRIMARY_BLUE_X;
-#else
- primaries.blue.X = 0.1805;
-#endif
-
-#ifdef TARGET_DISPLAY_PRIMARY_BLUE_Y
- primaries.blue.Y = TARGET_DISPLAY_PRIMARY_BLUE_Y;
-#else
- primaries.blue.Y = 0.0722;
-#endif
-
-#ifdef TARGET_DISPLAY_PRIMARY_BLUE_Z
- primaries.blue.Z = TARGET_DISPLAY_PRIMARY_BLUE_Z;
-#else
- primaries.blue.Z = 0.9506;
-#endif
-
-#ifdef TARGET_DISPLAY_PRIMARY_WHITE_X
- primaries.white.X = TARGET_DISPLAY_PRIMARY_WHITE_X;
-#else
- primaries.white.X = 0.9505;
-#endif
-
-#ifdef TARGET_DISPLAY_PRIMARY_WHITE_Y
- primaries.white.Y = TARGET_DISPLAY_PRIMARY_WHITE_Y;
-#else
- primaries.white.Y = 1.0000;
-#endif
-
-#ifdef TARGET_DISPLAY_PRIMARY_WHITE_Z
- primaries.white.Z = TARGET_DISPLAY_PRIMARY_WHITE_Z;
-#else
- primaries.white.Z = 1.0891;
-#endif
-
- _hidl_cb(primaries);
- return Void();
-}
-
-} // namespace implementation
-} // namespace V1_2
-} // namespace configstore
-} // namespace hardware
-} // namespace android
diff --git a/configstore/1.2/default/surfaceflinger.mk b/configstore/1.2/default/surfaceflinger.mk
deleted file mode 100644
index 9a67256..0000000
--- a/configstore/1.2/default/surfaceflinger.mk
+++ /dev/null
@@ -1,124 +0,0 @@
-
-LOCAL_SRC_FILES += SurfaceFlingerConfigs.cpp
-
-ifneq ($(VSYNC_EVENT_PHASE_OFFSET_NS),)
- LOCAL_CFLAGS += -DVSYNC_EVENT_PHASE_OFFSET_NS=$(VSYNC_EVENT_PHASE_OFFSET_NS)
-endif
-
-ifneq ($(SF_VSYNC_EVENT_PHASE_OFFSET_NS),)
- LOCAL_CFLAGS += -DSF_VSYNC_EVENT_PHASE_OFFSET_NS=$(SF_VSYNC_EVENT_PHASE_OFFSET_NS)
-endif
-
-ifeq ($(TARGET_USE_CONTEXT_PRIORITY),true)
- LOCAL_CFLAGS += -DUSE_CONTEXT_PRIORITY=1
-endif
-
-ifeq ($(TARGET_HAS_WIDE_COLOR_DISPLAY),true)
- LOCAL_CFLAGS += -DHAS_WIDE_COLOR_DISPLAY
-endif
-
-ifeq ($(TARGET_HAS_HDR_DISPLAY),true)
- LOCAL_CFLAGS += -DHAS_HDR_DISPLAY
-endif
-
-ifneq ($(PRESENT_TIME_OFFSET_FROM_VSYNC_NS),)
- LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=$(PRESENT_TIME_OFFSET_FROM_VSYNC_NS)
-else
- LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=0
-endif
-
-ifeq ($(TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS),true)
- LOCAL_CFLAGS += -DFORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS
-endif
-
-ifneq ($(MAX_VIRTUAL_DISPLAY_DIMENSION),)
- LOCAL_CFLAGS += -DMAX_VIRTUAL_DISPLAY_DIMENSION=$(MAX_VIRTUAL_DISPLAY_DIMENSION)
-endif
-
-ifeq ($(TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK),true)
- LOCAL_CFLAGS += -DRUNNING_WITHOUT_SYNC_FRAMEWORK
-endif
-
-ifneq ($(USE_VR_FLINGER),)
- LOCAL_CFLAGS += -DUSE_VR_FLINGER
-endif
-
-ifneq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),)
- LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS)
-endif
-
-ifneq ($(SF_START_GRAPHICS_ALLOCATOR_SERVICE),)
- LOCAL_CFLAGS += -DSTART_GRAPHICS_ALLOCATOR_SERVICE
-endif
-
-ifneq ($(SF_PRIMARY_DISPLAY_ORIENTATION),)
- LOCAL_CFLAGS += -DPRIMARY_DISPLAY_ORIENTATION=$(SF_PRIMARY_DISPLAY_ORIENTATION)
-endif
-
-ifeq ($(TARGET_USE_COLOR_MANAGEMENT),true)
- LOCAL_CFLAGS += -DUSE_COLOR_MANAGEMENT
-endif
-
-ifneq ($(SF_DEFAULT_COMPOSITION_DATA_SPACE),)
- LOCAL_CFLAGS += -DDEFAULT_COMPOSITION_DATA_SPACE=$(SF_DEFAULT_COMPOSITION_DATA_SPACE)
-endif
-
-ifneq ($(SF_DEFAULT_COMPOSITION_PIXEL_FORMAT),)
- LOCAL_CFLAGS += -DDEFAULT_COMPOSITION_PIXEL_FORMAT=$(SF_DEFAULT_COMPOSITION_PIXEL_FORMAT)
-endif
-
-ifneq ($(SF_WCG_COMPOSITION_DATA_SPACE),)
- LOCAL_CFLAGS += -DWCG_COMPOSITION_DATA_SPACE=$(SF_WCG_COMPOSITION_DATA_SPACE)
-endif
-
-ifneq ($(SF_WCG_COMPOSITION_PIXEL_FORMAT),)
- LOCAL_CFLAGS += -DWCG_COMPOSITION_PIXEL_FORMAT=$(SF_WCG_COMPOSITION_PIXEL_FORMAT)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_RED_X),)
- LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_RED_X=$(TARGET_DISPLAY_PRIMARY_RED_X)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_RED_Y),)
- LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_RED_Y=$(TARGET_DISPLAY_PRIMARY_RED_Y)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_RED_Z),)
- LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_RED_Z=$(TARGET_DISPLAY_PRIMARY_RED_Z)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_GREEN_X),)
- LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_GREEN_X=$(TARGET_DISPLAY_PRIMARY_GREEN_X)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_GREEN_Y),)
- LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_GREEN_Y=$(TARGET_DISPLAY_PRIMARY_GREEN_Y)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_GREEN_Z),)
- LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_GREEN_Z=$(TARGET_DISPLAY_PRIMARY_GREEN_Z)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_BLUE_X),)
- LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_BLUE_X=$(TARGET_DISPLAY_PRIMARY_BLUE_X)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_BLUE_Y),)
- LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_BLUE_Y=$(TARGET_DISPLAY_PRIMARY_BLUE_Y)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_BLUE_Z),)
- LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_BLUE_Z=$(TARGET_DISPLAY_PRIMARY_BLUE_Z)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_WHITE_X),)
- LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_WHITE_X=$(TARGET_DISPLAY_PRIMARY_WHITE_X)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_WHITE_Y),)
- LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_WHITE_Y=$(TARGET_DISPLAY_PRIMARY_WHITE_Y)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_WHITE_Z),)
- LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_WHITE_Z=$(TARGET_DISPLAY_PRIMARY_WHITE_Z)
-endif
diff --git a/configstore/1.2/types.hal b/configstore/1.2/types.hal
deleted file mode 100644
index 5b2c9a6..0000000
--- a/configstore/1.2/types.hal
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (C) 2019 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.configstore@1.2;
-
-struct CieXyz {
- float X;
- float Y;
- float Z;
-};
-struct DisplayPrimaries {
- CieXyz red;
- CieXyz green;
- CieXyz blue;
- CieXyz white;
-};
diff --git a/configstore/1.2/vts/functional/OWNERS b/configstore/1.2/vts/functional/OWNERS
deleted file mode 100644
index 2b4fb8c..0000000
--- a/configstore/1.2/vts/functional/OWNERS
+++ /dev/null
@@ -1,7 +0,0 @@
-# Graphics team
-lpy@google.com
-olv@google.com
-stoza@google.com
-
-# VTS team
-yim@google.com
diff --git a/configstore/1.2/vts/functional/VtsHalConfigstoreV1_2TargetTest.cpp b/configstore/1.2/vts/functional/VtsHalConfigstoreV1_2TargetTest.cpp
deleted file mode 100644
index d7f4dcf..0000000
--- a/configstore/1.2/vts/functional/VtsHalConfigstoreV1_2TargetTest.cpp
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Copyright (C) 2017 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.
- */
-
-#define LOG_TAG "ConfigstoreHidlHalTest"
-
-#include <VtsHalHidlTargetTestBase.h>
-#include <VtsHalHidlTargetTestEnvBase.h>
-#include <android-base/logging.h>
-#include <android/hardware/configstore/1.0/types.h>
-#include <android/hardware/configstore/1.2/ISurfaceFlingerConfigs.h>
-#include <android/hardware/configstore/1.2/types.h>
-#include <unistd.h>
-
-using ::android::sp;
-using ::android::hardware::hidl_vec;
-using ::android::hardware::Return;
-using ::android::hardware::Void;
-using ::android::hardware::configstore::V1_0::OptionalBool;
-using ::android::hardware::configstore::V1_0::OptionalInt64;
-using ::android::hardware::configstore::V1_0::OptionalUInt64;
-using ::android::hardware::configstore::V1_2::DisplayPrimaries;
-using ::android::hardware::configstore::V1_2::ISurfaceFlingerConfigs;
-using ::android::hardware::graphics::common::V1_2::Dataspace;
-using ::android::hardware::graphics::common::V1_2::PixelFormat;
-
-#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
-#define EXPECT_OK(ret) EXPECT_TRUE(ret.isOk())
-
-// Test environment for Configstore HIDL HAL.
-class ConfigstoreHidlEnvironment : public ::testing::VtsHalHidlTargetTestEnvBase {
- public:
- // get the test environment singleton
- static ConfigstoreHidlEnvironment* Instance() {
- static ConfigstoreHidlEnvironment* instance = new ConfigstoreHidlEnvironment;
- return instance;
- }
-
- virtual void registerTestServices() override { registerTestService<ISurfaceFlingerConfigs>(); }
-};
-
-class ConfigstoreHidlTest : public ::testing::VtsHalHidlTargetTestBase {
- public:
- sp<ISurfaceFlingerConfigs> sfConfigs;
-
- virtual void SetUp() override {
- sfConfigs = ::testing::VtsHalHidlTargetTestBase::getService<ISurfaceFlingerConfigs>(
- ConfigstoreHidlEnvironment::Instance()->getServiceName<ISurfaceFlingerConfigs>());
- ASSERT_NE(sfConfigs, nullptr);
- }
-
- virtual void TearDown() override {}
-
- bool isSupportedWideColorGamut(Dataspace dataspace) {
- Dataspace standard = static_cast<Dataspace>(dataspace & Dataspace::STANDARD_MASK);
- return standard == Dataspace::STANDARD_DCI_P3 || standard == Dataspace::STANDARD_BT2020;
- }
-};
-
-/**
- * Make sure the constrains of hasWideColorDisplay, hasHDRDisplay
- * and useColorManagement are enforced.
- */
-TEST_F(ConfigstoreHidlTest, TestColorConstrainsWithColorManagement) {
- bool hasWideColorDisplay;
- bool hasHDRDisplay;
- bool useColorManagement;
-
- Return<void> status = sfConfigs->hasWideColorDisplay(
- [&](OptionalBool arg) { hasWideColorDisplay = arg.specified; });
- EXPECT_OK(status);
-
- status = sfConfigs->hasHDRDisplay([&](OptionalBool arg) { hasHDRDisplay = arg.specified; });
- EXPECT_OK(status);
-
- status = sfConfigs->useColorManagement(
- [&](OptionalBool arg) { useColorManagement = arg.specified; });
- EXPECT_OK(status);
-
- // When hasHDRDisplay returns true, hasWideColorDisplay must also return true.
- if (hasHDRDisplay) {
- ASSERT_TRUE(hasWideColorDisplay);
- }
-
- // When hasWideColorDisplay returns true, useColorManagement
- // must also return true.
- if (hasWideColorDisplay) {
- ASSERT_TRUE(useColorManagement);
- }
-}
-
-TEST_F(ConfigstoreHidlTest, TestGetCompositionPreference) {
- bool hasWideColorDisplay;
-
- Return<void> status = sfConfigs->hasWideColorDisplay(
- [&](OptionalBool arg) { hasWideColorDisplay = arg.specified; });
- EXPECT_OK(status);
-
- Dataspace defaultDataspace, wcgDataspace;
-
- status = sfConfigs->getCompositionPreference(
- [&](auto tmpDefaultDataspace, PixelFormat, auto tmpWcgDataspace, PixelFormat) {
- defaultDataspace = tmpDefaultDataspace;
- wcgDataspace = tmpWcgDataspace;
- });
- EXPECT_OK(status);
-
- // Default data space and wide color gamut data space must not be UNKNOWN.
- ASSERT_TRUE(defaultDataspace != Dataspace::UNKNOWN && wcgDataspace != Dataspace::UNKNOWN);
-
- // If hasWideColorDisplay returns true, the wide color gamut data space must be a valid wide
- // color gamut.
- if (hasWideColorDisplay) {
- ASSERT_TRUE(isSupportedWideColorGamut(wcgDataspace));
- }
-}
-
-TEST_F(ConfigstoreHidlTest, TestGetDisplayNativePrimaries) {
- DisplayPrimaries primaries;
-
- Return<void> status = sfConfigs->getDisplayNativePrimaries(
- [&](DisplayPrimaries tmpPrimaries) {
- primaries.red = tmpPrimaries.red;
- primaries.green = tmpPrimaries.green;
- primaries.blue = tmpPrimaries.blue;
- primaries.white = tmpPrimaries.white;
- });
- EXPECT_OK(status);
-
- // Display primaries should be greater than or equal to zero.
- // Or it returns defualt value if there is no definition.
- // RED
- EXPECT_GE(primaries.red.X, 0.0);
- EXPECT_GE(primaries.red.Y, 0.0);
- EXPECT_GE(primaries.red.Z, 0.0);
-
- // GREEN
- EXPECT_GE(primaries.green.X, 0.0);
- EXPECT_GE(primaries.green.Y, 0.0);
- EXPECT_GE(primaries.green.Z, 0.0);
-
-
- // BLUE
- EXPECT_GE(primaries.blue.X, 0.0);
- EXPECT_GE(primaries.blue.Y, 0.0);
- EXPECT_GE(primaries.blue.Z, 0.0);
-
-
- // WHITE
- EXPECT_GE(primaries.white.X, 0.0);
- EXPECT_GE(primaries.white.Y, 0.0);
- EXPECT_GE(primaries.white.Z, 0.0);
-}
-
-int main(int argc, char** argv) {
- ::testing::AddGlobalTestEnvironment(ConfigstoreHidlEnvironment::Instance());
- ::testing::InitGoogleTest(&argc, argv);
- ConfigstoreHidlEnvironment::Instance()->init(&argc, argv);
- int status = RUN_ALL_TESTS();
- LOG(INFO) << "Test result = " << status;
- return status;
-}
diff --git a/configstore/utils/Android.bp b/configstore/utils/Android.bp
index e0d4aa8..178f245 100644
--- a/configstore/utils/Android.bp
+++ b/configstore/utils/Android.bp
@@ -30,14 +30,12 @@
shared_libs: [
"android.hardware.configstore@1.0",
"android.hardware.configstore@1.1",
- "android.hardware.configstore@1.2",
"libbase",
"libhidlbase"
],
export_shared_lib_headers: [
"android.hardware.configstore@1.0",
"android.hardware.configstore@1.1",
- "android.hardware.configstore@1.2",
"libbase",
"libhidlbase"
],
diff --git a/confirmationui/1.0/Android.bp b/confirmationui/1.0/Android.bp
index 21acecb..e6b0414 100644
--- a/confirmationui/1.0/Android.bp
+++ b/confirmationui/1.0/Android.bp
@@ -15,13 +15,6 @@
"android.hardware.keymaster@4.0",
"android.hidl.base@1.0",
],
- types: [
- "MessageSize",
- "ResponseCode",
- "TestKeyBits",
- "TestModeCommands",
- "UIOption",
- ],
gen_java: false,
}
diff --git a/contexthub/1.0/Android.bp b/contexthub/1.0/Android.bp
index 77dba66..730adcb 100644
--- a/contexthub/1.0/Android.bp
+++ b/contexthub/1.0/Android.bp
@@ -14,22 +14,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "AsyncEventType",
- "ContextHub",
- "ContextHubMsg",
- "HostEndPoint",
- "HubAppInfo",
- "HubMemoryFlag",
- "HubMemoryType",
- "MemRange",
- "NanoAppBinary",
- "NanoAppFlags",
- "PhysicalSensor",
- "Result",
- "SensorType",
- "TransactionResult",
- ],
gen_java: true,
}
diff --git a/current.txt b/current.txt
index 14d41a1..09e53c9 100644
--- a/current.txt
+++ b/current.txt
@@ -390,10 +390,11 @@
684702a60deef03a1e8093961dc0a18c555c857ad5a77ba7340b0635ae01eb70 android.hardware.camera.device@3.4::ICameraDeviceSession
f8a19622cb0cc890913b1ef3e32b675ffb26089a09e02fef4056ebad324d2b5d android.hardware.camera.device@3.4::types
291638a1b6d4e63283e9e722ab5049d9351717ffa2b66162124f84d1aa7c2835 android.hardware.camera.metadata@3.2::types
-8a075cf3a17fe99c6d23415a3e9a65612f1fee73ee052a3a8a0ca5b8877395a4 android.hardware.camera.metadata@3.3::types
+a31142da4cc87ad50e4e981d12291d4decbb432fcb00f175f0ca904d0fcdbe5b android.hardware.camera.metadata@3.3::types
da33234403ff5d60f3473711917b9948e6484a4260b5247acdafb111193a9de2 android.hardware.configstore@1.0::ISurfaceFlingerConfigs
21165b8e30c4b2d52980e4728f661420adc16e38bbe73476c06b2085be908f4c android.hardware.gnss@1.0::IGnssCallback
d702fb01dc2a0733aa820b7eb65435ee3334f75632ef880bafd2fb8803a20a58 android.hardware.gnss@1.0::IGnssMeasurementCallback
+d4fea995378bb4f421b4e24ccf68cad2734ab07fe4f874a126ba558b99df5766 android.hardware.graphics.composer@2.1::IComposerClient
b7ecf29927055ec422ec44bf776223f07d79ad9f92ccf9becf167e62c2607e7a android.hardware.keymaster@4.0::IKeymasterDevice
574e8f1499436fb4075894dcae0b36682427956ecb114f17f1fe22d116a83c6b android.hardware.neuralnetworks@1.0::IPreparedModel
417ab60fe1ef786778047e4486f3d868ebce570d91addd8fe4251515213072de android.hardware.neuralnetworks@1.0::types
@@ -434,9 +435,9 @@
443659bb9e27221e5da0d16c7a0ecb2dc3a9a03acc8a0b2196b47c50735e2d2e android.hardware.audio.effect@5.0::IVirtualizerEffect
78fed26a781cdca1b3bcb37520bff705d7764ee81db9cfd37014953c7ad2596e android.hardware.audio.effect@5.0::IVisualizerEffect
6385b6accab8a544e2ee54ba7bf5aa55dff6153bcedd80fdaae16fe9e0be7050 android.hardware.audio.effect@5.0::types
-2f11e4c10ebe2b600426e0695f3c720d21663501c1c9449537055f13f37600d3 android.hardware.biometrics.face@1.0::IBiometricsFace
-dfb0666af59eb306c82a6f576c65a160e6829d3324211a10429fd63768df70df android.hardware.biometrics.face@1.0::IBiometricsFaceClientCallback
-cc40d308f38b6a218fcf99f264ebb49544fce670a6abdf294c617357a3d83dad android.hardware.biometrics.face@1.0::types
+baf5a0cbf357035394be02d87334890228338fae715f7ab06e2f0e7d05abe656 android.hardware.biometrics.face@1.0::IBiometricsFace
+6cbf288d6e6a9f6f0c09d1cde66318aa5b6a8c525778a61ccaedddb090f5e9cb android.hardware.biometrics.face@1.0::IBiometricsFaceClientCallback
+ef5d339413d0c94a5b58baafbe3e4bccfd9ed2e7328fbbb5c25471c79923ed2f android.hardware.biometrics.face@1.0::types
ecedc58dbcdb13503c19c0ab160ac1dd0530bb1471164149282dd1463c684185 android.hardware.bluetooth.audio@2.0::IBluetoothAudioPort
fb9c40e4deab40be5476477078fe3d8a4a4495fd9deef4321878d169d675c633 android.hardware.bluetooth.audio@2.0::IBluetoothAudioProvider
f7431f3e3e4e3387fc6f27a6cf423eddcd824a395dc4349d302c995ab44a9895 android.hardware.bluetooth.audio@2.0::IBluetoothAudioProvidersFactory
@@ -444,15 +445,13 @@
09ab9b24994429d9bb32a3fb420b6f6be3e47eb655139a2c08c4e80d3f33ff95 android.hardware.camera.device@3.5::ICameraDevice
06237de53c42890029e3f8fe7d1480d078469c0d07608e51c37b4d485d342992 android.hardware.camera.device@3.5::ICameraDeviceCallback
08c68b196e2fc4e5ba67ba0d0917bde828a87cbe2cffec19d04733972da9eb49 android.hardware.camera.device@3.5::ICameraDeviceSession
-acaba39216973e58949f50978762bcda1c29f5f7e0bca3e08db21f0767356130 android.hardware.camera.device@3.5::types
+a848f7cb3cb3d080cf175bf08412322bfddb535168253796cdf777afdbf05b38 android.hardware.camera.device@3.5::types
74ec7732fdacb22292c907b49f8f933510851ea1b3ed195c4dcdff35a20387f5 android.hardware.camera.metadata@3.4::types
0fb39a7809ad1c52b3efbbed5ef4749b06c2a4f1f19cdc3efa2e3d9b28f1205c android.hardware.camera.provider@2.5::ICameraProvider
f5777403d65135a5407723671bc7a864cdca83aea13ee3ce2894b95e6588ca3a android.hardware.camera.provider@2.5::types
44c88954b3c201b26f64fcdb6f278024ab3aae864a9e1ec70e8a74274ae9d6aa android.hardware.cas@1.1::ICas
25012d1778f7396f967bbc0231397d544bde421ba5b98706c9e48ac790612683 android.hardware.cas@1.1::ICasListener
dffacdbe0bcf8443013de5bdc56a83479ad979d4919ed15a5585539f46091f07 android.hardware.cas@1.1::IMediaCasService
-bc742c6b17c834010f90c06ce2939c845198eecd2706be18da99e14bceb2acc0 android.hardware.configstore@1.2::ISurfaceFlingerConfigs
-aadac6b9fcf660384d73cbb97f3732ff9eeb8e8c67001e3fdbf4add108e5b1dc android.hardware.configstore@1.2::types
5b1f4a4fb88c239e07d76026467a1f2ee0d08f4d52c1805bd93bd7c05e3fe69c android.hardware.drm@1.2::ICryptoFactory
4895f98e9ef210e9acb01982f5d07b654538377e1404b8db5e19e7858835e9d8 android.hardware.drm@1.2::ICryptoPlugin
976116b9033b2c222b940109fdf0ffcc29b77cbe631ef6b4fcc2ad5ce8e605f7 android.hardware.drm@1.2::IDrmFactory
@@ -480,7 +479,7 @@
01c6398c90fc6be0640810e2c5d8a4863b457280132bb3f97dd5682e19632b62 android.hardware.graphics.bufferqueue@2.0::types
7a2d64095252f85781b2d521f4f11d04ce774544feececcec2088c568656e93c android.hardware.graphics.common@1.2::types
3dff04a36b86660b5807414587e530bb0c294ed56fdff06f8915ba0a9b73f974 android.hardware.graphics.composer@2.3::IComposer
-ed0cf91532e88dff073cf7f45b9c65ee1c88553ebcb97892f7b7072abb9b822a android.hardware.graphics.composer@2.3::IComposerClient
+daa44e83d7709bf1c9e0bd9a6b552feff496fd14574a9461ee93c21980fc5b15 android.hardware.graphics.composer@2.3::IComposerClient
5c8bf8e1af9efe225a4661db8c08ff1b7e13fdc8ed49f35291bd0b6c9436b8f2 android.hardware.graphics.mapper@3.0::IMapper
7183d9d9acfa41a61a64bdfed548e98299265a7bb1821a3ed204173b5c2cfd4a android.hardware.graphics.mapper@3.0::types
c3f831a66d5815baf74f5b82fe79cf099542ddae4dfab3f388e1d41828e794fc android.hardware.health.storage@1.0::IGarbageCollectCallback
@@ -493,7 +492,7 @@
aee53b2865b4f7939fb3df6fae758d9750c14f93dd454b479fc74aa7978fda4f android.hardware.media.bufferpool@2.0::IConnection
0bf3758eeeb05767830ea87041214be80968c4679fb73577ac5b3091841ee71f android.hardware.media.bufferpool@2.0::IObserver
82255e252ae215382473ad2e5ac7a2814a439a24f0092551aad7a2f89c6e9546 android.hardware.media.bufferpool@2.0::types
-fd4725732511b8ae124b868fd0b2090386663dffc5e67dfd0d0b4a0b49c335db android.hardware.media.c2@1.0::IComponent
+277161ea99236a0858e9fcc021c357db03be2de500acf5701d125e73e3e8071a android.hardware.media.c2@1.0::IComponent
389d06e4a4ecf60f828a260045b0c327a5ae883ee0856a3c054556dd22b1f450 android.hardware.media.c2@1.0::IComponentInterface
5ee0c02265c5505ade189796bef46697df4e0563e3544bb0c934855b34694b07 android.hardware.media.c2@1.0::IComponentListener
43d70bcdc63b3d042bac3c3297f5d941dfabbd08f3ceb96b6016cc14f6e34ba3 android.hardware.media.c2@1.0::IComponentStore
@@ -508,19 +507,19 @@
92714960d1a53fc2ec557302b41c7cc93d2636d8364a44bd0f85be0c92927ff8 android.hardware.neuralnetworks@1.2::IExecutionCallback
83885d366f22ada42c00d8854f0b7e7ba4cf73ddf80bb0d8e168ce132cec57ea android.hardware.neuralnetworks@1.2::IPreparedModel
e1c734d1545e1a4ae749ff1dd9704a8e594c59aea7c8363159dc258e93e0df3b android.hardware.neuralnetworks@1.2::IPreparedModelCallback
-769f8650631eef7a3ceedc8cf130f4b99eb52fe698a11609d55de32985a3dddf android.hardware.neuralnetworks@1.2::types
+c752cff336d86762c26dc82e7e037f4962b815b1a068d2319d40a3d068e26f68 android.hardware.neuralnetworks@1.2::types
cf7a4ba516a638f9b82a249c91fb603042c2d9ca43fd5aad9cf6c0401ed2a5d7 android.hardware.nfc@1.2::INfc
abf98c2ae08bf765db54edc8068e36d52eb558cff6706b6fd7c18c65a1f3fc18 android.hardware.nfc@1.2::types
4cb252dc6372a874aef666b92a6e9529915aa187521a700f0789065c3c702ead android.hardware.power.stats@1.0::IPowerStats
2043037d5baaff604805757d06979aa861013a1e87430db745265339a8681f79 android.hardware.power.stats@1.0::types
-d5545a4090e5cf8b7f844121377d580926cb9137d693d8c66772ef99ca23e514 android.hardware.radio@1.3::IRadio
+a1c6b0761bcb89d6bf15a156f9306b8090b3a916a15fea1689b4b0c1738e382f android.hardware.radio@1.3::IRadio
e9d0f11a52715f5a29d89e2d8e2e21db1e16a43174af6b9d51a62d705cda1455 android.hardware.radio@1.3::IRadioIndication
d233f0da44f55fdef0a95db5229231412787bb67695cd1ea197ce89a3c2908b9 android.hardware.radio@1.3::IRadioResponse
750a363c8cec70baa1aac19e275c15233c5898e93c6bb5155fa2ca7f365490dc android.hardware.radio@1.3::types
4ac73ec1e4cfa535209e5e22547f08beb20ef812b4a29d0824780f52cbe2324d android.hardware.radio@1.4::IRadio
33d9e6895cca98aa56296bb01720d18b8acd0e4de4960beb712e63ad147438a5 android.hardware.radio@1.4::IRadioIndication
0cc0dd87c634aad36d7df22b2832839ef7ded71909dbcde11cfdd69dc0dc52b8 android.hardware.radio@1.4::IRadioResponse
-29d34232cc3974626b08759e039fe788bded7695cdeb098458e3e11e4c7d3603 android.hardware.radio@1.4::types
+22091ad1f6cb6da1c7c1467e6412c9c1ae577b3ecc0c3e5047fc4b50cdd60c69 android.hardware.radio@1.4::types
51e696c0ceff30f74da8ff8d02fe4522ffd2f4a04cdfdbca0c68bfa64fcd306b android.hardware.radio.config@1.1::IRadioConfig
7fcf167f593b10c67b59ab70321781c26a5575eab60803e7cbb1c14c71085a3b android.hardware.radio.config@1.1::IRadioConfigIndication
b42eb3bbd5e7b519e28362340c2205aa75356de6b30f4fd09ec2ea784f250ab0 android.hardware.radio.config@1.1::IRadioConfigResponse
diff --git a/drm/1.0/Android.bp b/drm/1.0/Android.bp
index aca5ae4..fea851f 100644
--- a/drm/1.0/Android.bp
+++ b/drm/1.0/Android.bp
@@ -17,22 +17,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "BufferType",
- "DestinationBuffer",
- "EventType",
- "KeyRequestType",
- "KeyStatus",
- "KeyStatusType",
- "KeyType",
- "KeyValue",
- "Mode",
- "Pattern",
- "SecureStop",
- "SharedBuffer",
- "Status",
- "SubSample",
- ],
gen_java: false,
}
diff --git a/drm/1.1/Android.bp b/drm/1.1/Android.bp
index dba3e42..739b470 100644
--- a/drm/1.1/Android.bp
+++ b/drm/1.1/Android.bp
@@ -16,13 +16,6 @@
"android.hardware.drm@1.0",
"android.hidl.base@1.0",
],
- types: [
- "DrmMetricGroup",
- "HdcpLevel",
- "KeyRequestType",
- "SecureStopRelease",
- "SecurityLevel",
- ],
gen_java: false,
}
diff --git a/drm/1.2/Android.bp b/drm/1.2/Android.bp
index 4e0e8ba..2d54302 100644
--- a/drm/1.2/Android.bp
+++ b/drm/1.2/Android.bp
@@ -19,11 +19,6 @@
"android.hardware.drm@1.1",
"android.hidl.base@1.0",
],
- types: [
- "HdcpLevel",
- "OfflineLicenseState",
- "Status",
- ],
gen_java: false,
}
diff --git a/fastboot/1.0/Android.bp b/fastboot/1.0/Android.bp
index 467fc6d..ea3566f 100644
--- a/fastboot/1.0/Android.bp
+++ b/fastboot/1.0/Android.bp
@@ -13,11 +13,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "FileSystemType",
- "Result",
- "Status",
- ],
gen_java: true,
}
diff --git a/fastboot/1.0/default/Android.bp b/fastboot/1.0/default/Android.bp
new file mode 100644
index 0000000..fde7efa
--- /dev/null
+++ b/fastboot/1.0/default/Android.bp
@@ -0,0 +1,31 @@
+//
+// Copyright (C) 2019 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.
+
+cc_library {
+ name: "android.hardware.fastboot@1.0-impl-mock",
+ recovery: true,
+ srcs: [
+ "Fastboot.cpp",
+ ],
+ relative_install_path: "hw",
+ shared_libs: [
+ "libbase",
+ "libhidlbase",
+ "libhidltransport",
+ "libutils",
+ "libcutils",
+ "android.hardware.fastboot@1.0",
+ ],
+}
diff --git a/fastboot/1.0/default/Fastboot.cpp b/fastboot/1.0/default/Fastboot.cpp
new file mode 100644
index 0000000..a12233d
--- /dev/null
+++ b/fastboot/1.0/default/Fastboot.cpp
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2019 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.
+ */
+
+#include "Fastboot.h"
+
+namespace android {
+namespace hardware {
+namespace fastboot {
+namespace V1_0 {
+namespace implementation {
+
+// Methods from ::android::hardware::fastboot::V1_0::IFastboot follow.
+Return<void> Fastboot::getPartitionType(const hidl_string& /* partitionName */,
+ getPartitionType_cb _hidl_cb) {
+ _hidl_cb(FileSystemType::RAW, {Status::SUCCESS, ""});
+ return Void();
+}
+
+Return<void> Fastboot::doOemCommand(const hidl_string& /* oemCmd */, doOemCommand_cb _hidl_cb) {
+ _hidl_cb({Status::FAILURE_UNKNOWN, "Command not supported in default implementation"});
+ return Void();
+}
+
+Return<void> Fastboot::getVariant(getVariant_cb _hidl_cb) {
+ _hidl_cb("NA", {Status::SUCCESS, ""});
+ return Void();
+}
+
+Return<void> Fastboot::getOffModeChargeState(getOffModeChargeState_cb _hidl_cb) {
+ _hidl_cb(false, {Status::SUCCESS, ""});
+ return Void();
+}
+
+Return<void> Fastboot::getBatteryVoltageFlashingThreshold(
+ getBatteryVoltageFlashingThreshold_cb _hidl_cb) {
+ _hidl_cb(0, {Status::SUCCESS, ""});
+ return Void();
+}
+
+extern "C" IFastboot* HIDL_FETCH_IFastboot(const char* /* name */) {
+ return new Fastboot();
+}
+
+} // namespace implementation
+} // namespace V1_0
+} // namespace fastboot
+} // namespace hardware
+} // namespace android
diff --git a/fastboot/1.0/default/Fastboot.h b/fastboot/1.0/default/Fastboot.h
new file mode 100644
index 0000000..3127059
--- /dev/null
+++ b/fastboot/1.0/default/Fastboot.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2019 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.
+ */
+#pragma once
+
+#include <android/hardware/fastboot/1.0/IFastboot.h>
+#include <hidl/Status.h>
+
+namespace android {
+namespace hardware {
+namespace fastboot {
+namespace V1_0 {
+namespace implementation {
+
+using ::android::hardware::hidl_string;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+
+struct Fastboot : public IFastboot {
+ // Methods from ::android::hardware::fastboot::V1_0::IFastboot follow.
+ Return<void> getPartitionType(const hidl_string& partitionName,
+ getPartitionType_cb _hidl_cb) override;
+ Return<void> doOemCommand(const hidl_string& oemCmd, doOemCommand_cb _hidl_cb) override;
+ Return<void> getVariant(getVariant_cb _hidl_cb) override;
+ Return<void> getOffModeChargeState(getOffModeChargeState_cb _hidl_cb) override;
+ Return<void> getBatteryVoltageFlashingThreshold(
+ getBatteryVoltageFlashingThreshold_cb _hidl_cb) override;
+};
+
+extern "C" IFastboot* HIDL_FETCH_IFastboot(const char* name);
+
+} // namespace implementation
+} // namespace V1_0
+} // namespace fastboot
+} // namespace hardware
+} // namespace android
diff --git a/gatekeeper/1.0/Android.bp b/gatekeeper/1.0/Android.bp
index 7dc2133..7eff2e8 100644
--- a/gatekeeper/1.0/Android.bp
+++ b/gatekeeper/1.0/Android.bp
@@ -13,10 +13,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "GatekeeperResponse",
- "GatekeeperStatusCode",
- ],
gen_java: true,
}
diff --git a/gnss/1.0/Android.bp b/gnss/1.0/Android.bp
index dc659a3..2e3e6fd 100644
--- a/gnss/1.0/Android.bp
+++ b/gnss/1.0/Android.bp
@@ -32,12 +32,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "GnssConstellationType",
- "GnssLocation",
- "GnssLocationFlags",
- "GnssMax",
- ],
gen_java: true,
gen_java_constants: true,
}
diff --git a/gnss/1.1/vts/functional/Android.bp b/gnss/1.1/vts/functional/Android.bp
index 147a470..cc34290 100644
--- a/gnss/1.1/vts/functional/Android.bp
+++ b/gnss/1.1/vts/functional/Android.bp
@@ -27,5 +27,8 @@
"android.hardware.gnss@1.1",
"android.hardware.gnss@common-vts-lib",
],
+ shared_libs: [
+ "android.hardware.gnss.measurement_corrections@1.0",
+ ],
test_suites: ["general-tests"],
}
diff --git a/gnss/2.0/Android.bp b/gnss/2.0/Android.bp
index 230dd90..c01ec55 100644
--- a/gnss/2.0/Android.bp
+++ b/gnss/2.0/Android.bp
@@ -24,11 +24,6 @@
"android.hardware.gnss@1.1",
"android.hidl.base@1.0",
],
- types: [
- "ElapsedRealtime",
- "ElapsedRealtimeFlags",
- "GnssLocation",
- ],
gen_java: true,
gen_java_constants: true,
}
diff --git a/gnss/2.0/default/Android.bp b/gnss/2.0/default/Android.bp
index f327197..64187e2 100644
--- a/gnss/2.0/default/Android.bp
+++ b/gnss/2.0/default/Android.bp
@@ -26,6 +26,7 @@
"AGnssRil.cpp",
"Gnss.cpp",
"GnssMeasurement.cpp",
+ "GnssMeasurementCorrections.cpp",
"GnssVisibilityControl.cpp",
"service.cpp"
],
diff --git a/gnss/2.0/default/Gnss.cpp b/gnss/2.0/default/Gnss.cpp
index 599681b..ee6da53 100644
--- a/gnss/2.0/default/Gnss.cpp
+++ b/gnss/2.0/default/Gnss.cpp
@@ -25,11 +25,14 @@
#include "AGnssRil.h"
#include "GnssConfiguration.h"
#include "GnssMeasurement.h"
+#include "GnssMeasurementCorrections.h"
#include "GnssVisibilityControl.h"
#include "Utils.h"
using ::android::hardware::Status;
using ::android::hardware::gnss::common::Utils;
+using ::android::hardware::gnss::measurement_corrections::V1_0::implementation::
+ GnssMeasurementCorrections;
using ::android::hardware::gnss::visibility_control::V1_0::implementation::GnssVisibilityControl;
namespace android {
@@ -122,8 +125,7 @@
Return<bool> Gnss::setPositionMode(V1_0::IGnss::GnssPositionMode,
V1_0::IGnss::GnssPositionRecurrence, uint32_t, uint32_t,
uint32_t) {
- // TODO(b/124012850): Implement function.
- return bool{};
+ return true;
}
Return<sp<V1_0::IAGnssRil>> Gnss::getExtensionAGnssRil() {
@@ -249,8 +251,8 @@
Return<sp<measurement_corrections::V1_0::IMeasurementCorrections>>
Gnss::getExtensionMeasurementCorrections() {
- // TODO(b/124012850): Implement function.
- return sp<measurement_corrections::V1_0::IMeasurementCorrections>{};
+ ALOGD("Gnss::getExtensionMeasurementCorrections");
+ return new GnssMeasurementCorrections();
}
Return<sp<visibility_control::V1_0::IGnssVisibilityControl>> Gnss::getExtensionVisibilityControl() {
@@ -267,7 +269,7 @@
sGnssCallback_2_0 = callback;
- uint32_t capabilities = 0x0;
+ uint32_t capabilities = static_cast<uint32_t>(V1_0::IGnssCallback::Capabilities::MEASUREMENTS);
auto ret = sGnssCallback_2_0->gnssSetCapabilitesCb(capabilities);
if (!ret.isOk()) {
ALOGE("%s: Unable to invoke callback", __func__);
diff --git a/gnss/2.0/default/GnssMeasurementCorrections.cpp b/gnss/2.0/default/GnssMeasurementCorrections.cpp
new file mode 100644
index 0000000..cbf34ba
--- /dev/null
+++ b/gnss/2.0/default/GnssMeasurementCorrections.cpp
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2019 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.
+ */
+
+#define LOG_TAG "GnssMeasurementCorrections"
+
+#include "GnssMeasurementCorrections.h"
+#include <log/log.h>
+
+namespace android {
+namespace hardware {
+namespace gnss {
+namespace measurement_corrections {
+namespace V1_0 {
+namespace implementation {
+
+// Methods from V1_0::IMeasurementCorrections follow.
+Return<bool> GnssMeasurementCorrections::setCorrections(const MeasurementCorrections& corrections) {
+ ALOGD("setCorrections");
+ ALOGD("corrections = lat: %f, lng: %f, alt: %f, hUnc: %f, vUnc: %f, toa: %llu, "
+ "satCorrections.size: %d",
+ corrections.latitudeDegrees, corrections.longitudeDegrees, corrections.altitudeMeters,
+ corrections.horizontalPositionUncertaintyMeters,
+ corrections.verticalPositionUncertaintyMeters,
+ static_cast<unsigned long long>(corrections.toaGpsNanosecondsOfWeek),
+ static_cast<int>(corrections.satCorrections.size()));
+ for (auto singleSatCorrection : corrections.satCorrections) {
+ ALOGD("singleSatCorrection = flags: %d, constellation: %d, svid: %d, cfHz: %f, probLos: %f,"
+ " epl: %f, eplUnc: %f",
+ static_cast<int>(singleSatCorrection.singleSatCorrectionFlags),
+ static_cast<int>(singleSatCorrection.constellation),
+ static_cast<int>(singleSatCorrection.svid), singleSatCorrection.carrierFrequencyHz,
+ singleSatCorrection.probSatIsLos, singleSatCorrection.excessPathLengthMeters,
+ singleSatCorrection.excessPathLengthUncertaintyMeters);
+ ALOGD("reflecting plane = lat: %f, lng: %f, alt: %f, azm: %f",
+ singleSatCorrection.reflectingPlane.latitudeDegrees,
+ singleSatCorrection.reflectingPlane.longitudeDegrees,
+ singleSatCorrection.reflectingPlane.altitudeMeters,
+ singleSatCorrection.reflectingPlane.azimuthDegrees);
+ }
+
+ return true;
+}
+
+} // namespace implementation
+} // namespace V1_0
+} // namespace measurement_corrections
+} // namespace gnss
+} // namespace hardware
+} // namespace android
diff --git a/gnss/2.0/default/GnssMeasurementCorrections.h b/gnss/2.0/default/GnssMeasurementCorrections.h
new file mode 100644
index 0000000..f758bc8
--- /dev/null
+++ b/gnss/2.0/default/GnssMeasurementCorrections.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2019 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.
+ */
+
+#pragma once
+
+#include <android/hardware/gnss/measurement_corrections/1.0/IMeasurementCorrections.h>
+#include <hidl/MQDescriptor.h>
+#include <hidl/Status.h>
+
+namespace android {
+namespace hardware {
+namespace gnss {
+namespace measurement_corrections {
+namespace V1_0 {
+namespace implementation {
+
+using ::android::sp;
+using ::android::hardware::hidl_array;
+using ::android::hardware::hidl_memory;
+using ::android::hardware::hidl_string;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+
+struct GnssMeasurementCorrections : public IMeasurementCorrections {
+ // Methods from V1_0::IMeasurementCorrections follow.
+ Return<bool> setCorrections(const MeasurementCorrections& corrections) override;
+};
+
+} // namespace implementation
+} // namespace V1_0
+} // namespace measurement_corrections
+} // namespace gnss
+} // namespace hardware
+} // namespace android
diff --git a/gnss/2.0/vts/functional/gnss_hal_test_cases.cpp b/gnss/2.0/vts/functional/gnss_hal_test_cases.cpp
index b135dba..3703eba 100644
--- a/gnss/2.0/vts/functional/gnss_hal_test_cases.cpp
+++ b/gnss/2.0/vts/functional/gnss_hal_test_cases.cpp
@@ -18,6 +18,7 @@
#include <VtsHalHidlTargetTestBase.h>
#include <gnss_hal_test.h>
+#include "Utils.h"
using android::hardware::hidl_string;
using android::hardware::hidl_vec;
@@ -32,6 +33,9 @@
using IAGnss_1_0 = android::hardware::gnss::V1_0::IAGnss;
using IAGnssCallback_2_0 = android::hardware::gnss::V2_0::IAGnssCallback;
+using android::hardware::gnss::common::Utils;
+using android::hardware::gnss::measurement_corrections::V1_0::IMeasurementCorrections;
+using android::hardware::gnss::measurement_corrections::V1_0::MeasurementCorrections;
using android::hardware::gnss::V1_0::IGnssNi;
using android::hardware::gnss::V2_0::ElapsedRealtimeFlags;
using android::hardware::gnss::visibility_control::V1_0::IGnssVisibilityControl;
@@ -273,6 +277,24 @@
}
/*
+ * TestGnssMeasurementCorrections:
+ * Gets the GnssMeasurementCorrectionsExtension and verifies that it supports the
+ * gnss.measurement_corrections@1.0::IMeasurementCorrections interface by invoking a method.
+ */
+TEST_F(GnssHalTest, TestGnssMeasurementCorrections) {
+ // Verify IMeasurementCorrections is supported.
+ auto measurementCorrections = gnss_hal_->getExtensionMeasurementCorrections();
+ ASSERT_TRUE(measurementCorrections.isOk());
+ sp<IMeasurementCorrections> iMeasurementCorrections = measurementCorrections;
+ ASSERT_NE(iMeasurementCorrections, nullptr);
+
+ // Set a mock MeasurementCorrections.
+ auto result = iMeasurementCorrections->setCorrections(Utils::getMockMeasurementCorrections());
+ ASSERT_TRUE(result.isOk());
+ EXPECT_TRUE(result);
+}
+
+/*
* TestGnssDataElapsedRealtimeFlags:
* Sets a GnssMeasurementCallback, waits for a GnssData object, and verifies the flags in member
* elapsedRealitme are valid.
diff --git a/gnss/common/utils/vts/Android.bp b/gnss/common/utils/vts/Android.bp
index 99d8cf9..1988171 100644
--- a/gnss/common/utils/vts/Android.bp
+++ b/gnss/common/utils/vts/Android.bp
@@ -29,6 +29,7 @@
export_include_dirs: ["include"],
shared_libs: [
"android.hardware.gnss@1.0",
+ "android.hardware.gnss.measurement_corrections@1.0",
],
static_libs: [
"libgtest",
diff --git a/gnss/common/utils/vts/Utils.cpp b/gnss/common/utils/vts/Utils.cpp
index 24d6883..51d3ea1 100644
--- a/gnss/common/utils/vts/Utils.cpp
+++ b/gnss/common/utils/vts/Utils.cpp
@@ -22,6 +22,7 @@
namespace gnss {
namespace common {
+using V1_0::GnssConstellationType;
using V1_0::GnssLocationFlags;
void Utils::checkLocation(const GnssLocation& location, bool check_speed,
@@ -91,6 +92,53 @@
EXPECT_GT(location.timestamp, 1.48e12);
}
+const MeasurementCorrections Utils::getMockMeasurementCorrections() {
+ ReflectingPlane reflectingPlane = {
+ .latitudeDegrees = 37.4220039,
+ .longitudeDegrees = -122.0840991,
+ .altitudeMeters = 250.35,
+ .azimuthDegrees = 203.0,
+ };
+
+ SingleSatCorrection singleSatCorrection1 = {
+ .singleSatCorrectionFlags = GnssSingleSatCorrectionFlags::HAS_SAT_IS_LOS_PROBABILITY |
+ GnssSingleSatCorrectionFlags::HAS_EXCESS_PATH_LENGTH |
+ GnssSingleSatCorrectionFlags::HAS_EXCESS_PATH_LENGTH_UNC |
+ GnssSingleSatCorrectionFlags::HAS_REFLECTING_PLANE,
+ .constellation = GnssConstellationType::GPS,
+ .svid = 12,
+ .carrierFrequencyHz = 1.59975e+09,
+ .probSatIsLos = 0.50001,
+ .excessPathLengthMeters = 137.4802,
+ .excessPathLengthUncertaintyMeters = 25.5,
+ .reflectingPlane = reflectingPlane,
+ };
+ SingleSatCorrection singleSatCorrection2 = {
+ .singleSatCorrectionFlags = GnssSingleSatCorrectionFlags::HAS_SAT_IS_LOS_PROBABILITY |
+ GnssSingleSatCorrectionFlags::HAS_EXCESS_PATH_LENGTH |
+ GnssSingleSatCorrectionFlags::HAS_EXCESS_PATH_LENGTH_UNC,
+ .constellation = GnssConstellationType::GPS,
+ .svid = 9,
+ .carrierFrequencyHz = 1.59975e+09,
+ .probSatIsLos = 0.873,
+ .excessPathLengthMeters = 26.294,
+ .excessPathLengthUncertaintyMeters = 10.0,
+ };
+
+ hidl_vec<SingleSatCorrection> singleSatCorrections = {singleSatCorrection1,
+ singleSatCorrection2};
+ MeasurementCorrections mockCorrections = {
+ .latitudeDegrees = 37.4219999,
+ .longitudeDegrees = -122.0840575,
+ .altitudeMeters = 30.60062531,
+ .horizontalPositionUncertaintyMeters = 9.23542,
+ .verticalPositionUncertaintyMeters = 15.02341,
+ .toaGpsNanosecondsOfWeek = 2935633453L,
+ .satCorrections = singleSatCorrections,
+ };
+ return mockCorrections;
+}
+
} // namespace common
} // namespace gnss
} // namespace hardware
diff --git a/gnss/common/utils/vts/include/Utils.h b/gnss/common/utils/vts/include/Utils.h
index f8eeff6..dce4c7b 100644
--- a/gnss/common/utils/vts/include/Utils.h
+++ b/gnss/common/utils/vts/include/Utils.h
@@ -18,8 +18,10 @@
#define android_hardware_gnss_common_vts_Utils_H_
#include <android/hardware/gnss/1.0/IGnss.h>
+#include <android/hardware/gnss/measurement_corrections/1.0/IMeasurementCorrections.h>
using GnssLocation = ::android::hardware::gnss::V1_0::GnssLocation;
+using namespace android::hardware::gnss::measurement_corrections::V1_0;
namespace android {
namespace hardware {
@@ -29,6 +31,7 @@
struct Utils {
static void checkLocation(const GnssLocation& location, bool check_speed,
bool check_more_accuracies);
+ static const MeasurementCorrections getMockMeasurementCorrections();
};
} // namespace common
diff --git a/gnss/measurement_corrections/1.0/Android.bp b/gnss/measurement_corrections/1.0/Android.bp
index 237b008..4aac7e0 100644
--- a/gnss/measurement_corrections/1.0/Android.bp
+++ b/gnss/measurement_corrections/1.0/Android.bp
@@ -14,12 +14,6 @@
"android.hardware.gnss@1.0",
"android.hidl.base@1.0",
],
- types: [
- "GnssSingleSatCorrectionFlags",
- "MeasurementCorrections",
- "ReflectingPlane",
- "SingleSatCorrection",
- ],
gen_java: true,
}
diff --git a/graphics/bufferqueue/2.0/Android.bp b/graphics/bufferqueue/2.0/Android.bp
index 5385f28..97c05fa 100644
--- a/graphics/bufferqueue/2.0/Android.bp
+++ b/graphics/bufferqueue/2.0/Android.bp
@@ -17,11 +17,6 @@
"android.hardware.graphics.common@1.2",
"android.hidl.base@1.0",
],
- types: [
- "ConnectionType",
- "SlotIndex",
- "Status",
- ],
gen_java: true,
}
diff --git a/graphics/common/1.0/Android.bp b/graphics/common/1.0/Android.bp
index f88cbdf..175166d 100644
--- a/graphics/common/1.0/Android.bp
+++ b/graphics/common/1.0/Android.bp
@@ -10,15 +10,6 @@
srcs: [
"types.hal",
],
- types: [
- "BufferUsage",
- "ColorMode",
- "ColorTransform",
- "Dataspace",
- "Hdr",
- "PixelFormat",
- "Transform",
- ],
gen_java: true,
gen_java_constants: true,
}
diff --git a/graphics/common/1.1/Android.bp b/graphics/common/1.1/Android.bp
index 8bc68f5..0647d12d 100644
--- a/graphics/common/1.1/Android.bp
+++ b/graphics/common/1.1/Android.bp
@@ -13,13 +13,6 @@
interfaces: [
"android.hardware.graphics.common@1.0",
],
- types: [
- "BufferUsage",
- "ColorMode",
- "Dataspace",
- "PixelFormat",
- "RenderIntent",
- ],
gen_java: true,
gen_java_constants: true,
}
diff --git a/graphics/common/1.2/Android.bp b/graphics/common/1.2/Android.bp
index b6cd865..088bc37 100644
--- a/graphics/common/1.2/Android.bp
+++ b/graphics/common/1.2/Android.bp
@@ -14,14 +14,6 @@
"android.hardware.graphics.common@1.0",
"android.hardware.graphics.common@1.1",
],
- types: [
- "BufferUsage",
- "ColorMode",
- "Dataspace",
- "HardwareBuffer",
- "Hdr",
- "PixelFormat",
- ],
gen_java: true,
gen_java_constants: true,
}
diff --git a/graphics/composer/2.1/Android.bp b/graphics/composer/2.1/Android.bp
index 8fbc8c2..38786fd 100644
--- a/graphics/composer/2.1/Android.bp
+++ b/graphics/composer/2.1/Android.bp
@@ -16,9 +16,6 @@
"android.hardware.graphics.common@1.0",
"android.hidl.base@1.0",
],
- types: [
- "Error",
- ],
gen_java: false,
}
diff --git a/graphics/composer/2.1/IComposerClient.hal b/graphics/composer/2.1/IComposerClient.hal
index 5ad46f0..e036ce9 100644
--- a/graphics/composer/2.1/IComposerClient.hal
+++ b/graphics/composer/2.1/IComposerClient.hal
@@ -992,10 +992,10 @@
*
* setLayerDataspace(Dataspace dataspace);
*
- * Sets the dataspace that the current buffer on this layer is in.
+ * Sets the dataspace of the layer.
*
- * The dataspace provides more information about how to interpret the
- * buffer contents, such as the encoding standard and color transform.
+ * The dataspace provides more information about how to interpret the buffer
+ * or solid color, such as the encoding standard and color transform.
*
* See the values of Dataspace for more information.
*
diff --git a/graphics/composer/2.3/IComposerClient.hal b/graphics/composer/2.3/IComposerClient.hal
index a3b7792..5fcc0e6 100644
--- a/graphics/composer/2.3/IComposerClient.hal
+++ b/graphics/composer/2.3/IComposerClient.hal
@@ -28,7 +28,6 @@
interface IComposerClient extends @2.2::IComposerClient {
- // Bug: Move this enum to LLNDK after we decide where to put graphic types.
/**
* Required capabilities which are supported by the display. The
* particular set of supported capabilities for a given display may be
@@ -64,7 +63,6 @@
DOZE = 2,
};
- //Bug: Move this enum to LLNDK after we decide where to put graphic types.
/**
* PerFrameMetadataKey
*
diff --git a/graphics/mapper/2.0/Android.bp b/graphics/mapper/2.0/Android.bp
index 2f9a344..96e812b 100644
--- a/graphics/mapper/2.0/Android.bp
+++ b/graphics/mapper/2.0/Android.bp
@@ -15,10 +15,6 @@
"android.hardware.graphics.common@1.0",
"android.hidl.base@1.0",
],
- types: [
- "Error",
- "YCbCrLayout",
- ],
gen_java: false,
}
diff --git a/graphics/mapper/3.0/Android.bp b/graphics/mapper/3.0/Android.bp
index b2f0aa6..e348296 100644
--- a/graphics/mapper/3.0/Android.bp
+++ b/graphics/mapper/3.0/Android.bp
@@ -17,10 +17,6 @@
"android.hardware.graphics.common@1.2",
"android.hidl.base@1.0",
],
- types: [
- "Error",
- "YCbCrLayout",
- ],
gen_java: false,
}
diff --git a/health/1.0/Android.bp b/health/1.0/Android.bp
index dcbaf58..e03b142 100644
--- a/health/1.0/Android.bp
+++ b/health/1.0/Android.bp
@@ -13,13 +13,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "BatteryHealth",
- "BatteryStatus",
- "HealthConfig",
- "HealthInfo",
- "Result",
- ],
gen_java: true,
gen_java_constants: true,
}
diff --git a/health/2.0/Android.bp b/health/2.0/Android.bp
index 0325467..f472b27 100644
--- a/health/2.0/Android.bp
+++ b/health/2.0/Android.bp
@@ -15,13 +15,6 @@
"android.hardware.health@1.0",
"android.hidl.base@1.0",
],
- types: [
- "DiskStats",
- "HealthInfo",
- "Result",
- "StorageAttribute",
- "StorageInfo",
- ],
gen_java: true,
}
diff --git a/health/storage/1.0/Android.bp b/health/storage/1.0/Android.bp
index 35ee34f..45fa01f 100644
--- a/health/storage/1.0/Android.bp
+++ b/health/storage/1.0/Android.bp
@@ -14,9 +14,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "Result",
- ],
gen_java: true,
}
diff --git a/input/common/1.0/Android.bp b/input/common/1.0/Android.bp
index 3de18b4..07b38cf 100644
--- a/input/common/1.0/Android.bp
+++ b/input/common/1.0/Android.bp
@@ -9,23 +9,6 @@
srcs: [
"types.hal",
],
- types: [
- "Action",
- "Axis",
- "Button",
- "Classification",
- "EdgeFlag",
- "Flag",
- "Meta",
- "MotionEvent",
- "PointerCoords",
- "PointerProperties",
- "PolicyFlag",
- "Source",
- "SourceClass",
- "ToolType",
- "VideoFrame",
- ],
gen_java: true,
}
diff --git a/ir/1.0/Android.bp b/ir/1.0/Android.bp
index 272acb3..5f25172 100644
--- a/ir/1.0/Android.bp
+++ b/ir/1.0/Android.bp
@@ -13,9 +13,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "ConsumerIrFreqRange",
- ],
gen_java: true,
}
diff --git a/keymaster/3.0/Android.bp b/keymaster/3.0/Android.bp
index e0f1b94..ca17a9b 100644
--- a/keymaster/3.0/Android.bp
+++ b/keymaster/3.0/Android.bp
@@ -13,26 +13,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "Algorithm",
- "BlockMode",
- "Digest",
- "EcCurve",
- "ErrorCode",
- "HardwareAuthToken",
- "HardwareAuthenticatorType",
- "KeyBlobUsageRequirements",
- "KeyCharacteristics",
- "KeyDerivationFunction",
- "KeyFormat",
- "KeyOrigin",
- "KeyParameter",
- "KeyPurpose",
- "PaddingMode",
- "SecurityLevel",
- "Tag",
- "TagType",
- ],
gen_java: false,
}
diff --git a/keymaster/4.0/Android.bp b/keymaster/4.0/Android.bp
index 2daad41..cd46fd9 100644
--- a/keymaster/4.0/Android.bp
+++ b/keymaster/4.0/Android.bp
@@ -14,29 +14,6 @@
"android.hardware.keymaster@3.0",
"android.hidl.base@1.0",
],
- types: [
- "Algorithm",
- "BlockMode",
- "Constants",
- "Digest",
- "EcCurve",
- "ErrorCode",
- "HardwareAuthToken",
- "HardwareAuthenticatorType",
- "HmacSharingParameters",
- "KeyBlobUsageRequirements",
- "KeyCharacteristics",
- "KeyDerivationFunction",
- "KeyFormat",
- "KeyOrigin",
- "KeyParameter",
- "KeyPurpose",
- "PaddingMode",
- "SecurityLevel",
- "Tag",
- "TagType",
- "VerificationToken",
- ],
gen_java: false,
}
diff --git a/light/2.0/Android.bp b/light/2.0/Android.bp
index ee58f93..6068752 100644
--- a/light/2.0/Android.bp
+++ b/light/2.0/Android.bp
@@ -13,13 +13,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "Brightness",
- "Flash",
- "LightState",
- "Status",
- "Type",
- ],
gen_java: true,
}
diff --git a/media/1.0/Android.bp b/media/1.0/Android.bp
index 45fedb9..844cfa2 100644
--- a/media/1.0/Android.bp
+++ b/media/1.0/Android.bp
@@ -12,11 +12,6 @@
interfaces: [
"android.hardware.graphics.common@1.0",
],
- types: [
- "AnwBuffer",
- "AnwBufferAttributes",
- "Rect",
- ],
gen_java: true,
}
diff --git a/media/bufferpool/1.0/Android.bp b/media/bufferpool/1.0/Android.bp
index 986da8a..86297d3 100644
--- a/media/bufferpool/1.0/Android.bp
+++ b/media/bufferpool/1.0/Android.bp
@@ -15,12 +15,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "Buffer",
- "BufferStatus",
- "BufferStatusMessage",
- "ResultStatus",
- ],
gen_java: false,
}
diff --git a/media/bufferpool/2.0/Android.bp b/media/bufferpool/2.0/Android.bp
index 1f8bbdb..0faa00e 100644
--- a/media/bufferpool/2.0/Android.bp
+++ b/media/bufferpool/2.0/Android.bp
@@ -16,13 +16,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "Buffer",
- "BufferInvalidationMessage",
- "BufferStatus",
- "BufferStatusMessage",
- "ResultStatus",
- ],
gen_java: false,
}
diff --git a/media/c2/1.0/Android.bp b/media/c2/1.0/Android.bp
index 56c78b2..6c836af 100644
--- a/media/c2/1.0/Android.bp
+++ b/media/c2/1.0/Android.bp
@@ -25,28 +25,6 @@
"android.hardware.media@1.0",
"android.hidl.base@1.0",
],
- types: [
- "BaseBlock",
- "Block",
- "Buffer",
- "FieldDescriptor",
- "FieldId",
- "FieldSupportedValues",
- "FieldSupportedValuesQuery",
- "FieldSupportedValuesQueryResult",
- "FrameData",
- "InfoBuffer",
- "ParamDescriptor",
- "ParamField",
- "ParamFieldValues",
- "SettingResult",
- "Status",
- "StructDescriptor",
- "Work",
- "WorkBundle",
- "WorkOrdinal",
- "Worklet",
- ],
gen_java: false,
}
diff --git a/media/c2/1.0/IComponent.hal b/media/c2/1.0/IComponent.hal
index 7fd551f..abd1448 100644
--- a/media/c2/1.0/IComponent.hal
+++ b/media/c2/1.0/IComponent.hal
@@ -22,6 +22,7 @@
import IConfigurable;
import IComponentInterface;
import IComponentListener;
+import IInputSink;
import IInputSurface;
import IInputSurfaceConnection;
@@ -355,11 +356,19 @@
* Returns the @ref IComponentInterface instance associated to this
* component.
*
- * An @p IConfigurable instance for the component can be obtained by calling
+ * An @ref IConfigurable instance for the component can be obtained by calling
* IComponentInterface::getConfigurable() on the returned @p intf.
*
* @return intf `IComponentInterface` instance. This must not be null.
*/
getInterface() generates (IComponentInterface intf);
+
+ /**
+ * Returns an @ref IInputSink instance that has the component as the
+ * underlying implementation.
+ *
+ * @return sink `IInputSink` instance.
+ */
+ asInputSink() generates (IInputSink sink);
};
diff --git a/media/omx/1.0/Android.bp b/media/omx/1.0/Android.bp
index 89709bd..ee51d5d 100644
--- a/media/omx/1.0/Android.bp
+++ b/media/omx/1.0/Android.bp
@@ -21,13 +21,6 @@
"android.hardware.media@1.0",
"android.hidl.base@1.0",
],
- types: [
- "CodecBuffer",
- "ColorAspects",
- "Message",
- "PortMode",
- "Status",
- ],
gen_java: false,
}
diff --git a/memtrack/1.0/Android.bp b/memtrack/1.0/Android.bp
index d56aa64..0f24977 100644
--- a/memtrack/1.0/Android.bp
+++ b/memtrack/1.0/Android.bp
@@ -13,12 +13,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "MemtrackFlag",
- "MemtrackRecord",
- "MemtrackStatus",
- "MemtrackType",
- ],
gen_java: true,
}
diff --git a/neuralnetworks/1.0/Android.bp b/neuralnetworks/1.0/Android.bp
index e8600d3..63b5b98 100644
--- a/neuralnetworks/1.0/Android.bp
+++ b/neuralnetworks/1.0/Android.bp
@@ -16,22 +16,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "Capabilities",
- "DataLocation",
- "DeviceStatus",
- "ErrorStatus",
- "FusedActivationFunc",
- "Model",
- "Operand",
- "OperandLifeTime",
- "OperandType",
- "Operation",
- "OperationType",
- "PerformanceInfo",
- "Request",
- "RequestArgument",
- ],
gen_java: false,
}
diff --git a/neuralnetworks/1.1/Android.bp b/neuralnetworks/1.1/Android.bp
index 24d8396..1158a90 100644
--- a/neuralnetworks/1.1/Android.bp
+++ b/neuralnetworks/1.1/Android.bp
@@ -14,13 +14,6 @@
"android.hardware.neuralnetworks@1.0",
"android.hidl.base@1.0",
],
- types: [
- "Capabilities",
- "ExecutionPreference",
- "Model",
- "Operation",
- "OperationType",
- ],
gen_java: false,
}
diff --git a/neuralnetworks/1.2/Android.bp b/neuralnetworks/1.2/Android.bp
index daf0c18..085bda1 100644
--- a/neuralnetworks/1.2/Android.bp
+++ b/neuralnetworks/1.2/Android.bp
@@ -21,24 +21,6 @@
"android.hidl.base@1.0",
"android.hidl.safe_union@1.0",
],
- types: [
- "Constant",
- "DeviceType",
- "Extension",
- "FmqRequestDatum",
- "FmqResultDatum",
- "MeasureTiming",
- "Model",
- "Operand",
- "OperandType",
- "OperandTypeRange",
- "Operation",
- "OperationType",
- "OperationTypeRange",
- "OutputShape",
- "SymmPerChannelQuantParams",
- "Timing",
- ],
gen_java: false,
}
diff --git a/neuralnetworks/1.2/types.hal b/neuralnetworks/1.2/types.hal
index ab17598..4a8664f 100644
--- a/neuralnetworks/1.2/types.hal
+++ b/neuralnetworks/1.2/types.hal
@@ -218,6 +218,7 @@
* ) / sum(1)
*
* Supported tensor {@link OperandType}:
+ * * {@link OperandType::TENSOR_FLOAT16} (since API level 29)
* * {@link OperandType::TENSOR_FLOAT32}
* * {@link OperandType::TENSOR_QUANT8_ASYMM}
*
@@ -333,7 +334,7 @@
* ) + bias[channel]
*
* Supported tensor {@link OperandType} configurations:
- * * 32 bit Floating point :
+ * * 32 bit floating point:
* * * {@link OperandType::TENSOR_FLOAT32} for input, filter, output, and bias.
*
* * Quantized:
@@ -342,15 +343,15 @@
* * * input.scale * filter.scale).
*
* Available since API level 29:
+ * * 16 bit floating point:
+ * * * {@link OperandType::TENSOR_FLOAT16} for input, filter, output, and bias.
+ *
* * Quantized with symmetric per channel quantization for the filter:
* * * {@link OperandType::TENSOR_QUANT8_ASYMM} for input, and output.
* * * {@link OperandType::TENSOR_QUANT8_SYMM_PER_CHANNEL} for filter.
* * * {@link OperandType::TENSOR_INT32} for bias (scale set to 0.0,
* * * each value scaling is separate and equal to input.scale * filter.scales[channel]).
*
- * * 16 bit Floating point:
- * * {@link OperandType::TENSOR_FLOAT16} for input, filter, output, and bias.
- *
* Supported tensor rank: 4, with "NHWC" or "NCHW" data layout.
* With the default data layout NHWC, the data is stored in the order of:
* [batch, height, width, channels]. Alternatively, the data layout could
@@ -482,7 +483,7 @@
* ) + bias[k * channel_multiplier + q]
*
* Supported tensor {@link OperandType} configurations:
- * * 32 bit Floating point :
+ * * 32 bit floating point:
* * * {@link OperandType::TENSOR_FLOAT32} for input, filter, output, and bias.
*
* * Quantized:
@@ -491,6 +492,9 @@
* * * input.scale * filter.scale).
*
* Available since API level 29:
+ * * 16 bit floating point:
+ * * * {@link OperandType::TENSOR_FLOAT16} for input, filter, output, and bias.
+ *
* * Quantized with symmetric per channel quantization for the filter:
* * * {@link OperandType::TENSOR_QUANT8_ASYMM} for input, and output.
* * * {@link OperandType::TENSOR_QUANT8_SYMM_PER_CHANNEL} for filter.
@@ -1010,6 +1014,7 @@
* output = 1 / (1 + exp(-input))
*
* Supported tensor {@link OperandType}:
+ * * {@link OperandType::TENSOR_FLOAT16} (since API level 29)
* * {@link OperandType::TENSOR_FLOAT32}
* * {@link OperandType::TENSOR_QUANT8_ASYMM}
*
@@ -1315,6 +1320,7 @@
* )
*
* Supported tensor {@link OperandType}:
+ * * {@link OperandType::TENSOR_FLOAT16} (since API level 29)
* * {@link OperandType::TENSOR_FLOAT32}
* * {@link OperandType::TENSOR_QUANT8_ASYMM}
*
@@ -1623,6 +1629,7 @@
* independently on each 1-D slice along specified dimension.
*
* Supported tensor {@link OperandType}:
+ * * {@link OperandType::TENSOR_FLOAT16} (since API level 29)
* * {@link OperandType::TENSOR_FLOAT32}
* * {@link OperandType::TENSOR_QUANT8_ASYMM}
*
@@ -1631,8 +1638,12 @@
*
* Inputs:
* * 0: A 2-D or 4-D tensor, specifying the tensor to be reshaped.
- * * 1: An {@link OperandType::FLOAT32} scalar, specifying the positive
- * scaling factor for the exponent, beta.
+ * * 1: A scalar, specifying the positive scaling factor for the exponent,
+ * beta. If input0 is of {@link OperandType::TENSOR_FLOAT32} or
+ * {@link OperandType::TENSOR_QUANT8_ASYMM}, the scalar must be of
+ * {@link OperandType::FLOAT32}. If input0 is of {@link
+ * OperandType::TENSOR_FLOAT16}, then the scalar must be of {@link
+ * OperandType::FLOAT16}.
* * 2: An optional {@link OperandType::INT32} scalar, default to -1,
* specifying the dimension the activation would be performed on.
* Negative index is used to specify axis from the end (e.g. -1 for
@@ -2706,11 +2717,17 @@
* * 10: An {@link OperandType::INT32} scalar, only used when input7 is
* set to true, specifying the maximum number of detections when
* applying NMS algorithm for each single class.
- * * 11: An {@link OperandType::FLOAT32} scalar, score_threshold. Boxes
- * with scores lower than the threshold are filtered before sending
- * to the NMS algorithm.
- * * 12: An {@link OperandType::FLOAT32} scalar, specifying the IoU
- * threshold for hard NMS.
+ * * 11: A scalar, score_threshold. Boxes with scores lower than the
+ * threshold are filtered before sending to the NMS algorithm. The
+ * scalar must be of {@link OperandType::FLOAT16} if input0 is of
+ * {@link OperandType::TENSOR_FLOAT16} and of {@link
+ * OperandType::FLOAT32} if input0 is of {@link
+ * OperandType::TENSOR_FLOAT32}.
+ * * 12: A scalar, specifying the IoU threshold for hard NMS. The scalar
+ * must be of {@link OperandType::FLOAT16} if input0 is of {@link
+ * OperandType::TENSOR_FLOAT16} and of {@link
+ * OperandType::FLOAT32} if input0 is of {@link
+ * OperandType::TENSOR_FLOAT32}.
* * 13: An {@link OperandType::BOOL} scalar, set to true to include
* background class in the list of label map for the output, set
* to false to not include the background. When the background
@@ -3007,11 +3024,11 @@
* where channel_multiplier = depth_out / num_groups
*
* Supported tensor {@link OperandType} configurations:
- * * 32 bit Floating point :
- * * * {@link OperandType::TENSOR_FLOAT32} for input, filter, output, and bias.
+ * * 16 bit floating point:
+ * * * {@link OperandType::TENSOR_FLOAT16} for input, filter, output, and bias.
*
- * * 16 bit Floating point:
- * * {@link OperandType::TENSOR_FLOAT16} for input, filter, output, and bias.
+ * * 32 bit floating point:
+ * * * {@link OperandType::TENSOR_FLOAT32} for input, filter, output, and bias.
*
* * Quantized:
* * * {@link OperandType::TENSOR_QUANT8_ASYMM} for input, filter, and output.
@@ -3188,12 +3205,21 @@
*
* Inputs:
* * 0: An n-D tensor, specifying the tensor to be normalized.
- * * 1: An {@link OperandType::FLOAT32} scalar, specifying gamma, the
- * scale applied to the normalized tensor.
- * * 2: An {@link OperandType::FLOAT32} scalar, specifying beta, the
- * offset applied to the normalized tensor.
- * * 3: An {@link OperandType::FLOAT32} scalar, specifying epsilon, the
- * small value added to variance to avoid dividing by zero.
+ * * 1: A scalar, specifying gamma, the scale applied to the normalized
+ * tensor. The scalar must be of {@link OperandType::FLOAT16} if
+ * input0 is of {@link OperandType::TENSOR_FLOAT16} and of {@link
+ * OperandType::FLOAT32} if input0 is of {@link
+ * OperandType::TENSOR_FLOAT32}.
+ * * 2: A scalar, specifying beta, the offset applied to the normalized
+ * tensor. The scalar must be of {@link OperandType::FLOAT16} if
+ * input0 is of {@link OperandType::TENSOR_FLOAT16} and of {@link
+ * OperandType::FLOAT32} if input0 is of {@link
+ * OperandType::TENSOR_FLOAT32}.
+ * * 3: A scalar, specifying epsilon, the small value added to variance to
+ * avoid dividing by zero. The scalar must be of {@link OperandType::FLOAT16} if
+ * input0 is of {@link OperandType::TENSOR_FLOAT16} and of {@link
+ * OperandType::FLOAT32} if input0 is of {@link
+ * OperandType::TENSOR_FLOAT32}.
* * 4: An {@link OperandType::BOOL} scalar, set to true to specify
* NCHW data layout for input0 and output0. Set to false for NHWC.
*
@@ -3475,10 +3501,12 @@
* padding[i, 1] specifies the number of elements to be padded after
* the end of dimension i.
* * 2: An scalar specifying the value to use for padding input0.
+ * For input tensor of {@link OperandType::TENSOR_FLOAT16}, the
+ * pad value must be of {@link OperandType::FLOAT16}.
* For input tensor of {@link OperandType::TENSOR_FLOAT32}, the
- * pad value should be of {@link OperandType::FLOAT32}.
+ * pad value must be of {@link OperandType::FLOAT32}.
* For input tensor of {@link OperandType::TENSOR_QUANT8_ASYMM},
- * the pad value should be of {@link OperandType::INT32}. The
+ * the pad value must be of {@link OperandType::INT32}. The
* scale and zeroPoint are assumed to be the same as in input0.
*
* Outputs:
@@ -3627,25 +3655,25 @@
* weights.
* * 5: The recurrent-to-input weights.
* A 2-D tensor of type {@link OperandType::TENSOR_QUANT8_ASYMM}
- * and shape [outputSize, inputSize] specifying recurrent-to-input part
+ * and shape [outputSize, outputSize] specifying recurrent-to-input part
* of weights for fully-connected layer inside the LSTM cell.
* Quantization zero point and scale must be the same across all the
* weights.
* * 6: The recurrent-to-forget weights.
* A 2-D tensor of type {@link OperandType::TENSOR_QUANT8_ASYMM}
- * and shape [outputSize, inputSize] specifying recurrent-to-forget
+ * and shape [outputSize, outputSize] specifying recurrent-to-forget
* part of weights for fully-connected layer inside the LSTM cell.
* Quantization zero point and scale must be the same across all the
* weights.
* * 7: The recurrent-to-cell weights.
* A 2-D tensor of type {@link OperandType::TENSOR_QUANT8_ASYMM}
- * and shape [outputSize, inputSize] specifying recurrent-to-cell part
+ * and shape [outputSize, outputSize] specifying recurrent-to-cell part
* of weights for fully-connected layer inside the LSTM cell.
* Quantization zero point and scale must be the same across all the
* weights.
* * 8: The recurrent-to-output weights.
* A 2-D tensor of type {@link OperandType::TENSOR_QUANT8_ASYMM}
- * and shape [outputSize, inputSize] specifying recurrent-to-output
+ * and shape [outputSize, outputSize] specifying recurrent-to-output
* part of weights for fully-connected layer inside the LSTM cell.
* Quantization zero point and scale must be the same across all the
* weights.
@@ -4205,7 +4233,10 @@
* padding.
*
* Supported tensor {@link OperandCode} configurations:
- * * 32 bit Floating point :
+ * * 16 bit floating point:
+ * * * {@link OperandType::TENSOR_FLOAT16} for input, filter, output, and bias.
+ *
+ * * 32 bit floating point:
* * * {@link OperandType::TENSOR_FLOAT32} for input, filter, output, and bias.
*
* * Quantized:
@@ -4213,7 +4244,6 @@
* * * {@link OperandType::TENSOR_INT32} for bias (with scale set to
* * * input.scale * filter.scale).
*
- * Available since API level 29:
* * Quantized with symmetric per channel quantization for the filter:
* * * {@link OperandType::TENSOR_QUANT8_ASYMM} for input, and output.
* * * {@link OperandType::TENSOR_QUANT8_SYMM_PER_CHANNEL} for filter.
diff --git a/nfc/1.0/Android.bp b/nfc/1.0/Android.bp
index f821355..e0625d0 100644
--- a/nfc/1.0/Android.bp
+++ b/nfc/1.0/Android.bp
@@ -14,10 +14,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "NfcEvent",
- "NfcStatus",
- ],
gen_java: true,
gen_java_constants: true,
}
diff --git a/nfc/1.1/Android.bp b/nfc/1.1/Android.bp
index 9a1392e..bbf49b2 100644
--- a/nfc/1.1/Android.bp
+++ b/nfc/1.1/Android.bp
@@ -15,13 +15,6 @@
"android.hardware.nfc@1.0",
"android.hidl.base@1.0",
],
- types: [
- "Constant",
- "NfcConfig",
- "NfcEvent",
- "PresenceCheckAlgorithm",
- "ProtocolDiscoveryConfig",
- ],
gen_java: true,
}
diff --git a/nfc/1.2/Android.bp b/nfc/1.2/Android.bp
index c338e02..cfb8b85 100644
--- a/nfc/1.2/Android.bp
+++ b/nfc/1.2/Android.bp
@@ -15,9 +15,6 @@
"android.hardware.nfc@1.1",
"android.hidl.base@1.0",
],
- types: [
- "NfcConfig",
- ],
gen_java: true,
}
diff --git a/oemlock/1.0/Android.bp b/oemlock/1.0/Android.bp
index c4ad989..894188b 100644
--- a/oemlock/1.0/Android.bp
+++ b/oemlock/1.0/Android.bp
@@ -13,10 +13,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "OemLockSecureStatus",
- "OemLockStatus",
- ],
gen_java: true,
}
diff --git a/power/1.0/Android.bp b/power/1.0/Android.bp
index 92c9483..dbc0a36 100644
--- a/power/1.0/Android.bp
+++ b/power/1.0/Android.bp
@@ -13,13 +13,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "Feature",
- "PowerHint",
- "PowerStatePlatformSleepState",
- "PowerStateVoter",
- "Status",
- ],
gen_java: true,
}
diff --git a/power/1.1/Android.bp b/power/1.1/Android.bp
index d1d8021..de55396 100644
--- a/power/1.1/Android.bp
+++ b/power/1.1/Android.bp
@@ -14,10 +14,6 @@
"android.hardware.power@1.0",
"android.hidl.base@1.0",
],
- types: [
- "PowerStateSubsystem",
- "PowerStateSubsystemSleepState",
- ],
gen_java: true,
}
diff --git a/power/1.2/Android.bp b/power/1.2/Android.bp
index 0eb73e7..284e736 100644
--- a/power/1.2/Android.bp
+++ b/power/1.2/Android.bp
@@ -15,9 +15,6 @@
"android.hardware.power@1.1",
"android.hidl.base@1.0",
],
- types: [
- "PowerHint",
- ],
gen_java: true,
}
diff --git a/power/1.3/Android.bp b/power/1.3/Android.bp
index 1869b56..320f1e6 100644
--- a/power/1.3/Android.bp
+++ b/power/1.3/Android.bp
@@ -16,9 +16,6 @@
"android.hardware.power@1.2",
"android.hidl.base@1.0",
],
- types: [
- "PowerHint",
- ],
gen_java: true,
}
diff --git a/power/stats/1.0/Android.bp b/power/stats/1.0/Android.bp
index 9a956e4..9cf24cf 100644
--- a/power/stats/1.0/Android.bp
+++ b/power/stats/1.0/Android.bp
@@ -13,17 +13,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "EnergyData",
- "PowerEntityInfo",
- "PowerEntityStateInfo",
- "PowerEntityStateResidencyData",
- "PowerEntityStateResidencyResult",
- "PowerEntityStateSpace",
- "PowerEntityType",
- "RailInfo",
- "Status",
- ],
gen_java: false,
}
diff --git a/radio/1.0/Android.bp b/radio/1.0/Android.bp
index 72a3ca6..f023471 100644
--- a/radio/1.0/Android.bp
+++ b/radio/1.0/Android.bp
@@ -17,162 +17,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "ActivityStatsInfo",
- "ApnAuthType",
- "ApnTypes",
- "AppState",
- "AppStatus",
- "AppType",
- "Call",
- "CallForwardInfo",
- "CallForwardInfoStatus",
- "CallPresentation",
- "CallState",
- "CardState",
- "CardStatus",
- "Carrier",
- "CarrierMatchType",
- "CarrierRestrictions",
- "CdmaBroadcastSmsConfigInfo",
- "CdmaCallWaiting",
- "CdmaCallWaitingNumberPlan",
- "CdmaCallWaitingNumberPresentation",
- "CdmaCallWaitingNumberType",
- "CdmaDisplayInfoRecord",
- "CdmaInfoRecName",
- "CdmaInformationRecord",
- "CdmaInformationRecords",
- "CdmaLineControlInfoRecord",
- "CdmaNumberInfoRecord",
- "CdmaOtaProvisionStatus",
- "CdmaRedirectingNumberInfoRecord",
- "CdmaRedirectingReason",
- "CdmaRoamingType",
- "CdmaSignalInfoRecord",
- "CdmaSignalStrength",
- "CdmaSmsAck",
- "CdmaSmsAddress",
- "CdmaSmsDigitMode",
- "CdmaSmsErrorClass",
- "CdmaSmsMessage",
- "CdmaSmsNumberMode",
- "CdmaSmsNumberPlan",
- "CdmaSmsNumberType",
- "CdmaSmsSubaddress",
- "CdmaSmsSubaddressType",
- "CdmaSmsWriteArgs",
- "CdmaSmsWriteArgsStatus",
- "CdmaSubscriptionSource",
- "CdmaT53AudioControlInfoRecord",
- "CdmaT53ClirInfoRecord",
- "CellIdentity",
- "CellIdentityCdma",
- "CellIdentityGsm",
- "CellIdentityLte",
- "CellIdentityTdscdma",
- "CellIdentityWcdma",
- "CellInfo",
- "CellInfoCdma",
- "CellInfoGsm",
- "CellInfoLte",
- "CellInfoTdscdma",
- "CellInfoType",
- "CellInfoWcdma",
- "CfData",
- "ClipStatus",
- "Clir",
- "DataCallFailCause",
- "DataProfileId",
- "DataProfileInfo",
- "DataProfileInfoType",
- "DataRegStateResult",
- "DeviceStateType",
- "Dial",
- "EvdoSignalStrength",
- "GsmBroadcastSmsConfigInfo",
- "GsmSignalStrength",
- "GsmSmsMessage",
- "HardwareConfig",
- "HardwareConfigModem",
- "HardwareConfigSim",
- "HardwareConfigState",
- "HardwareConfigType",
- "IccIo",
- "IccIoResult",
- "ImsSmsMessage",
- "IndicationFilter",
- "LastCallFailCause",
- "LastCallFailCauseInfo",
- "LceDataInfo",
- "LceStatus",
- "LceStatusInfo",
- "LteSignalStrength",
- "MvnoType",
- "NeighboringCell",
- "NvItem",
- "NvWriteItem",
- "OperatorInfo",
- "OperatorStatus",
- "P2Constant",
- "PcoDataInfo",
- "PersoSubstate",
- "PhoneRestrictedState",
- "PinState",
- "PreferredNetworkType",
- "RadioAccessFamily",
- "RadioBandMode",
- "RadioCapability",
- "RadioCapabilityPhase",
- "RadioCapabilityStatus",
- "RadioCdmaSmsConst",
- "RadioConst",
- "RadioError",
- "RadioIndicationType",
- "RadioResponseInfo",
- "RadioResponseType",
- "RadioState",
- "RadioTechnology",
- "RadioTechnologyFamily",
- "RegState",
- "ResetNvType",
- "RestrictedState",
- "SapApduType",
- "SapConnectRsp",
- "SapDisconnectType",
- "SapResultCode",
- "SapStatus",
- "SapTransferProtocol",
- "SelectUiccSub",
- "SendSmsResult",
- "SetupDataCallResult",
- "SignalStrength",
- "SimApdu",
- "SimRefreshResult",
- "SimRefreshType",
- "SmsAcknowledgeFailCause",
- "SmsWriteArgs",
- "SmsWriteArgsStatus",
- "SrvccState",
- "SsInfoData",
- "SsRequestType",
- "SsServiceType",
- "SsTeleserviceType",
- "StkCcUnsolSsResult",
- "SubscriptionType",
- "SuppServiceClass",
- "SuppSvcNotification",
- "TdScdmaSignalStrength",
- "TimeStampType",
- "TtyMode",
- "UiccSubActStatus",
- "UssdModeType",
- "UusDcs",
- "UusInfo",
- "UusType",
- "VoiceRegStateResult",
- "WcdmaSignalStrength",
- ],
gen_java: true,
}
diff --git a/radio/1.1/Android.bp b/radio/1.1/Android.bp
index 5eecb31..4375d8c 100644
--- a/radio/1.1/Android.bp
+++ b/radio/1.1/Android.bp
@@ -17,23 +17,6 @@
"android.hardware.radio@1.0",
"android.hidl.base@1.0",
],
- types: [
- "CardPowerState",
- "EutranBands",
- "GeranBands",
- "ImsiEncryptionInfo",
- "KeepaliveRequest",
- "KeepaliveStatus",
- "KeepaliveStatusCode",
- "KeepaliveType",
- "NetworkScanRequest",
- "NetworkScanResult",
- "RadioAccessNetworks",
- "RadioAccessSpecifier",
- "ScanStatus",
- "ScanType",
- "UtranBands",
- ],
gen_java: true,
}
diff --git a/radio/1.2/Android.bp b/radio/1.2/Android.bp
index c90a03c..b7364a8 100644
--- a/radio/1.2/Android.bp
+++ b/radio/1.2/Android.bp
@@ -18,41 +18,6 @@
"android.hardware.radio@1.1",
"android.hidl.base@1.0",
],
- types: [
- "AccessNetwork",
- "AudioQuality",
- "Call",
- "CardStatus",
- "CellConnectionStatus",
- "CellIdentity",
- "CellIdentityCdma",
- "CellIdentityGsm",
- "CellIdentityLte",
- "CellIdentityOperatorNames",
- "CellIdentityTdscdma",
- "CellIdentityWcdma",
- "CellInfo",
- "CellInfoCdma",
- "CellInfoGsm",
- "CellInfoLte",
- "CellInfoTdscdma",
- "CellInfoWcdma",
- "DataRegStateResult",
- "DataRequestReason",
- "IncrementalResultsPeriodicityRange",
- "IndicationFilter",
- "LinkCapacityEstimate",
- "MaxSearchTimeRange",
- "NetworkScanRequest",
- "NetworkScanResult",
- "PhysicalChannelConfig",
- "RadioConst",
- "ScanIntervalRange",
- "SignalStrength",
- "TdscdmaSignalStrength",
- "VoiceRegStateResult",
- "WcdmaSignalStrength",
- ],
gen_java: true,
}
diff --git a/radio/1.3/Android.bp b/radio/1.3/Android.bp
index 63056cc..de2a3e5 100644
--- a/radio/1.3/Android.bp
+++ b/radio/1.3/Android.bp
@@ -18,9 +18,6 @@
"android.hardware.radio@1.2",
"android.hidl.base@1.0",
],
- types: [
- "RadioResponseInfoModem",
- ],
gen_java: true,
}
diff --git a/radio/1.3/IRadio.hal b/radio/1.3/IRadio.hal
index 95cf615..922b35d 100644
--- a/radio/1.3/IRadio.hal
+++ b/radio/1.3/IRadio.hal
@@ -49,8 +49,13 @@
vec<RadioAccessSpecifier> specifiers);
/**
- * Toggle logical modem on and off. The difference with setRadioPower is,
- * setRadioPower affects all logical modems while this controls just one.
+ * Toggle logical modem on/off. This is similar to @1.0::IRadio.setRadioPower(), however that
+ * does not enforce that radio power is toggled only for the corresponding radio and certain
+ * vendor implementations do it for all radios. This new API should affect only the modem for
+ * which it is called. A modem stack must be on/active only when both setRadioPower() and
+ * enableModem() are set to on for it.
+ *
+ * SIM must be read if available even if modem is off/inactive.
*
* @param serial Serial number of request.
* @param on True to turn on the logical modem, otherwise turn it off.
diff --git a/radio/1.3/vts/functional/radio_hidl_hal_api.cpp b/radio/1.3/vts/functional/radio_hidl_hal_api.cpp
index 6208c67..1bebae7 100644
--- a/radio/1.3/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.3/vts/functional/radio_hidl_hal_api.cpp
@@ -75,3 +75,36 @@
radioRsp_v1_3->rspInfo.error,
{RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::MODEM_ERR}));
}
+
+/*
+ * Test IRadio.setSystemSelectionChannels() for the response returned.
+ */
+TEST_F(RadioHidlTest_v1_3, setSystemSelectionChannels) {
+ serial = GetRandomSerialNumber();
+
+ RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
+ .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
+ .channels = {1, 2}};
+
+ Return<void> res = radio_v1_3->setSystemSelectionChannels(serial, true, {specifier});
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_3->rspInfo.type);
+ EXPECT_EQ(serial, radioRsp_v1_3->rspInfo.serial);
+ ALOGI("setSystemSelectionChannels, rspInfo.error = %s\n",
+ toString(radioRsp_v1_3->rspInfo.error).c_str());
+ ASSERT_TRUE(CheckAnyOfErrors(
+ radioRsp_v1_3->rspInfo.error,
+ {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::INTERNAL_ERR}));
+
+ if (radioRsp_v1_3->rspInfo.error == RadioError::NONE) {
+ Return<void> res = radio_v1_3->setSystemSelectionChannels(serial, false, {specifier});
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_3->rspInfo.type);
+ EXPECT_EQ(serial, radioRsp_v1_3->rspInfo.serial);
+ ALOGI("setSystemSelectionChannels, rspInfo.error = %s\n",
+ toString(radioRsp_v1_3->rspInfo.error).c_str());
+ EXPECT_EQ(RadioError::NONE, radioRsp_v1_3->rspInfo.error);
+ }
+}
\ No newline at end of file
diff --git a/radio/1.3/vts/functional/radio_response.cpp b/radio/1.3/vts/functional/radio_response.cpp
index 900794e..84a9890 100644
--- a/radio/1.3/vts/functional/radio_response.cpp
+++ b/radio/1.3/vts/functional/radio_response.cpp
@@ -769,12 +769,14 @@
/* 1.3 Api */
Return<void> RadioResponse_v1_3::setSystemSelectionChannelsResponse(const RadioResponseInfo& info) {
rspInfo = info;
+ parent_v1_3.notify(info.serial);
return Void();
}
Return<void> RadioResponse_v1_3::enableModemResponse(const RadioResponseInfo& info) {
rspInfo = info;
enableModemResponseToggle = !enableModemResponseToggle;
+ parent_v1_3.notify(info.serial);
return Void();
}
@@ -782,5 +784,6 @@
const bool enabled) {
rspInfo = info;
isModemEnabled = enabled;
+ parent_v1_3.notify(info.serial);
return Void();
}
diff --git a/radio/1.4/Android.bp b/radio/1.4/Android.bp
index e8b8777..9f5f2f9 100644
--- a/radio/1.4/Android.bp
+++ b/radio/1.4/Android.bp
@@ -20,38 +20,6 @@
"android.hidl.base@1.0",
"android.hidl.safe_union@1.0",
],
- types: [
- "AccessNetwork",
- "CardStatus",
- "CarrierRestrictionsWithPriority",
- "CellConfigLte",
- "CellIdentityNr",
- "CellInfo",
- "CellInfoLte",
- "CellInfoNr",
- "DataCallFailCause",
- "DataConnActiveStatus",
- "DataProfileInfo",
- "DataRegStateResult",
- "EmergencyCallRouting",
- "EmergencyNumber",
- "EmergencyNumberSource",
- "EmergencyServiceCategory",
- "FrequencyRange",
- "LteVopsInfo",
- "NetworkScanResult",
- "NrIndicators",
- "NrSignalStrength",
- "PdpProtocolType",
- "PhysicalChannelConfig",
- "RadioAccessFamily",
- "RadioCapability",
- "RadioFrequencyInfo",
- "RadioTechnology",
- "SetupDataCallResult",
- "SignalStrength",
- "SimLockMultiSimPolicy",
- ],
gen_java: true,
}
diff --git a/radio/1.4/types.hal b/radio/1.4/types.hal
index dc3bba0..393716b 100644
--- a/radio/1.4/types.hal
+++ b/radio/1.4/types.hal
@@ -64,6 +64,15 @@
UNKNOWN = 0,
};
+enum ApnTypes : @1.0::ApnTypes {
+ /**
+ * Due to the addition of this new value, the value ALL defined in 1.0::ApnTypes is now
+ * deprecated and should not be used.
+ */
+ MCX = 1 << 10, // APN type for Mission Critical Service
+ // Reference: 3GPP TS 22.280 V15.3.0
+};
+
/**
* Emergency number contains information of number, one or more service category(s), zero or more
* emergency uniform resource names, mobile country code (mcc), mobile network country (mnc) and
diff --git a/radio/1.4/vts/functional/radio_hidl_hal_api.cpp b/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
index 15a8acc..8e1dc3e 100644
--- a/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
@@ -563,3 +563,198 @@
RadioError::OP_NOT_ALLOWED_BEFORE_REG_TO_NW}));
}
}
+
+/*
+ * Test IRadio.getAllowedCarriers_1_4() for the response returned.
+ */
+TEST_F(RadioHidlTest_v1_4, getAllowedCarriers_1_4) {
+ serial = GetRandomSerialNumber();
+
+ radio_v1_4->getAllowedCarriers_1_4(serial);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_4->rspInfo.type);
+ EXPECT_EQ(serial, radioRsp_v1_4->rspInfo.serial);
+
+ ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
+ {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
+}
+
+/**
+ * Test IRadio.setAllowedCarriers_1_4() for the response returned.
+ */
+TEST_F(RadioHidlTest_v1_4, setAllowedCarriers_1_4) {
+ serial = GetRandomSerialNumber();
+ CarrierRestrictionsWithPriority carrierRestrictions;
+ memset(&carrierRestrictions, 0, sizeof(carrierRestrictions));
+ carrierRestrictions.allowedCarriers.resize(1);
+ carrierRestrictions.excludedCarriers.resize(0);
+ carrierRestrictions.allowedCarriers[0].mcc = hidl_string("123");
+ carrierRestrictions.allowedCarriers[0].mnc = hidl_string("456");
+ carrierRestrictions.allowedCarriers[0].matchType = CarrierMatchType::ALL;
+ carrierRestrictions.allowedCarriers[0].matchData = hidl_string();
+ carrierRestrictions.allowedCarriersPrioritized = true;
+ SimLockMultiSimPolicy multisimPolicy = SimLockMultiSimPolicy::NO_MULTISIM_POLICY;
+
+ radio_v1_4->setAllowedCarriers_1_4(serial, carrierRestrictions, multisimPolicy);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_4->rspInfo.type);
+ EXPECT_EQ(serial, radioRsp_v1_4->rspInfo.serial);
+
+ ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
+ {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
+
+ if (radioRsp_v1_4->rspInfo.error == RadioError::NONE) {
+ /* Verify the update of the SIM status. This might need some time */
+ if (cardStatus.base.base.cardState != CardState::ABSENT) {
+ updateSimCardStatus();
+ auto startTime = std::chrono::system_clock::now();
+ while (cardStatus.base.base.cardState != CardState::RESTRICTED &&
+ std::chrono::duration_cast<chrono::seconds>(std::chrono::system_clock::now() -
+ startTime)
+ .count() < 10) {
+ /* Set 2 seconds as interval to check card status */
+ sleep(2);
+ updateSimCardStatus();
+ }
+ EXPECT_EQ(CardState::RESTRICTED, cardStatus.base.base.cardState);
+ }
+
+ /* Verify that configuration was set correctly, retrieving it from the modem */
+ serial = GetRandomSerialNumber();
+
+ radio_v1_4->getAllowedCarriers_1_4(serial);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_4->rspInfo.type);
+ EXPECT_EQ(serial, radioRsp_v1_4->rspInfo.serial);
+ EXPECT_EQ(RadioError::NONE, radioRsp_v1_4->rspInfo.error);
+
+ EXPECT_EQ(1, radioRsp_v1_4->carrierRestrictionsResp.allowedCarriers.size());
+ EXPECT_EQ(0, radioRsp_v1_4->carrierRestrictionsResp.excludedCarriers.size());
+ ASSERT_TRUE(hidl_string("123") ==
+ radioRsp_v1_4->carrierRestrictionsResp.allowedCarriers[0].mcc);
+ ASSERT_TRUE(hidl_string("456") ==
+ radioRsp_v1_4->carrierRestrictionsResp.allowedCarriers[0].mnc);
+ EXPECT_EQ(CarrierMatchType::ALL,
+ radioRsp_v1_4->carrierRestrictionsResp.allowedCarriers[0].matchType);
+ ASSERT_TRUE(radioRsp_v1_4->carrierRestrictionsResp.allowedCarriersPrioritized);
+ EXPECT_EQ(SimLockMultiSimPolicy::NO_MULTISIM_POLICY, radioRsp_v1_4->multiSimPolicyResp);
+
+ sleep(10);
+
+ /**
+ * Another test case of the API to cover to allow carrier.
+ * If the API is supported, this is also used to reset to no carrier restriction
+ * status for cardStatus.
+ */
+ memset(&carrierRestrictions, 0, sizeof(carrierRestrictions));
+ carrierRestrictions.allowedCarriers.resize(0);
+ carrierRestrictions.excludedCarriers.resize(0);
+ carrierRestrictions.allowedCarriersPrioritized = false;
+
+ serial = GetRandomSerialNumber();
+ radio_v1_4->setAllowedCarriers_1_4(serial, carrierRestrictions, multisimPolicy);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_4->rspInfo.type);
+ EXPECT_EQ(serial, radioRsp_v1_4->rspInfo.serial);
+
+ EXPECT_EQ(RadioError::NONE, radioRsp_v1_4->rspInfo.error);
+
+ if (cardStatus.base.base.cardState != CardState::ABSENT) {
+ /* Resetting back to no carrier restriction needs some time */
+ updateSimCardStatus();
+ auto startTime = std::chrono::system_clock::now();
+ while (cardStatus.base.base.cardState == CardState::RESTRICTED &&
+ std::chrono::duration_cast<chrono::seconds>(std::chrono::system_clock::now() -
+ startTime)
+ .count() < 10) {
+ /* Set 2 seconds as interval to check card status */
+ sleep(2);
+ updateSimCardStatus();
+ }
+ EXPECT_NE(CardState::RESTRICTED, cardStatus.base.base.cardState);
+ sleep(10);
+ }
+ }
+}
+
+TEST_F(RadioHidlTest_v1_4, setDataProfile_1_4) {
+ serial = GetRandomSerialNumber();
+
+ // Create a dataProfileInfo
+ android::hardware::radio::V1_4::DataProfileInfo dataProfileInfo;
+ memset(&dataProfileInfo, 0, sizeof(dataProfileInfo));
+ dataProfileInfo.profileId = DataProfileId::DEFAULT;
+ dataProfileInfo.apn = hidl_string("internet");
+ dataProfileInfo.protocol = PdpProtocolType::IPV4V6;
+ dataProfileInfo.roamingProtocol = PdpProtocolType::IPV4V6;
+ dataProfileInfo.authType = ApnAuthType::NO_PAP_NO_CHAP;
+ dataProfileInfo.user = hidl_string("username");
+ dataProfileInfo.password = hidl_string("password");
+ dataProfileInfo.type = DataProfileInfoType::THREE_GPP;
+ dataProfileInfo.maxConnsTime = 300;
+ dataProfileInfo.maxConns = 20;
+ dataProfileInfo.waitTime = 0;
+ dataProfileInfo.enabled = true;
+ dataProfileInfo.supportedApnTypesBitmap = 320;
+ dataProfileInfo.bearerBitmap = 161543;
+ dataProfileInfo.mtu = 0;
+ dataProfileInfo.preferred = true;
+ dataProfileInfo.persistent = true;
+
+ // Create a dataProfileInfoList
+ android::hardware::hidl_vec<android::hardware::radio::V1_4::DataProfileInfo>
+ dataProfileInfoList = {dataProfileInfo};
+
+ radio_v1_4->setDataProfile_1_4(serial, dataProfileInfoList);
+
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_4->rspInfo.type);
+ EXPECT_EQ(serial, radioRsp_v1_4->rspInfo.serial);
+
+ if (cardStatus.base.base.cardState == CardState::ABSENT) {
+ ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
+ {RadioError::SIM_ABSENT, RadioError::RADIO_NOT_AVAILABLE}));
+ } else if (cardStatus.base.base.cardState == CardState::PRESENT) {
+ ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
+ {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE}));
+ }
+}
+
+TEST_F(RadioHidlTest_v1_4, setInitialAttachApn_1_4) {
+ serial = GetRandomSerialNumber();
+
+ // Create a dataProfileInfo
+ android::hardware::radio::V1_4::DataProfileInfo dataProfileInfo;
+ memset(&dataProfileInfo, 0, sizeof(dataProfileInfo));
+ dataProfileInfo.profileId = DataProfileId::DEFAULT;
+ dataProfileInfo.apn = hidl_string("internet");
+ dataProfileInfo.protocol = PdpProtocolType::IPV4V6;
+ dataProfileInfo.roamingProtocol = PdpProtocolType::IPV4V6;
+ dataProfileInfo.authType = ApnAuthType::NO_PAP_NO_CHAP;
+ dataProfileInfo.user = hidl_string("username");
+ dataProfileInfo.password = hidl_string("password");
+ dataProfileInfo.type = DataProfileInfoType::THREE_GPP;
+ dataProfileInfo.maxConnsTime = 300;
+ dataProfileInfo.maxConns = 20;
+ dataProfileInfo.waitTime = 0;
+ dataProfileInfo.enabled = true;
+ dataProfileInfo.supportedApnTypesBitmap = 320;
+ dataProfileInfo.bearerBitmap = 161543;
+ dataProfileInfo.mtu = 0;
+ dataProfileInfo.preferred = true;
+ dataProfileInfo.persistent = false;
+
+ radio_v1_4->setInitialAttachApn_1_4(serial, dataProfileInfo);
+
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_4->rspInfo.type);
+ EXPECT_EQ(serial, radioRsp_v1_4->rspInfo.serial);
+
+ if (cardStatus.base.base.cardState == CardState::ABSENT) {
+ ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
+ {RadioError::SIM_ABSENT, RadioError::RADIO_NOT_AVAILABLE}));
+ } else if (cardStatus.base.base.cardState == CardState::PRESENT) {
+ ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
+ {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE}));
+ }
+}
diff --git a/radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h b/radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h
index ed689c6..de7742c 100644
--- a/radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h
+++ b/radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h
@@ -67,6 +67,10 @@
// Data
::android::hardware::radio::V1_4::DataRegStateResult dataRegResp;
+ // SimLock status
+ ::android::hardware::radio::V1_4::CarrierRestrictionsWithPriority carrierRestrictionsResp;
+ ::android::hardware::radio::V1_4::SimLockMultiSimPolicy multiSimPolicyResp;
+
RadioResponse_v1_4(RadioHidlTest_v1_4& parent_v1_4);
virtual ~RadioResponse_v1_4() = default;
diff --git a/radio/1.4/vts/functional/radio_response.cpp b/radio/1.4/vts/functional/radio_response.cpp
index 6e9cd43..e7842a9 100644
--- a/radio/1.4/vts/functional/radio_response.cpp
+++ b/radio/1.4/vts/functional/radio_response.cpp
@@ -862,12 +862,18 @@
return Void();
}
-Return<void> RadioResponse_v1_4::setAllowedCarriersResponse_1_4(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_4::setAllowedCarriersResponse_1_4(const RadioResponseInfo& info) {
+ rspInfo = info;
+ parent_v1_4.notify(info.serial);
return Void();
}
Return<void> RadioResponse_v1_4::getAllowedCarriersResponse_1_4(
- const RadioResponseInfo& /*info*/, const CarrierRestrictionsWithPriority& /*carriers*/,
- SimLockMultiSimPolicy /*multiSimPolicy*/) {
+ const RadioResponseInfo& info, const CarrierRestrictionsWithPriority& carriers,
+ SimLockMultiSimPolicy multiSimPolicy) {
+ rspInfo = info;
+ carrierRestrictionsResp = carriers;
+ multiSimPolicyResp = multiSimPolicy;
+ parent_v1_4.notify(info.serial);
return Void();
}
diff --git a/radio/config/1.0/Android.bp b/radio/config/1.0/Android.bp
index c50e71c..7fb0ea1 100644
--- a/radio/config/1.0/Android.bp
+++ b/radio/config/1.0/Android.bp
@@ -16,10 +16,6 @@
"android.hardware.radio@1.0",
"android.hidl.base@1.0",
],
- types: [
- "SimSlotStatus",
- "SlotState",
- ],
gen_java: true,
}
diff --git a/radio/config/1.1/Android.bp b/radio/config/1.1/Android.bp
index 151a0a3..5c9ad7c 100644
--- a/radio/config/1.1/Android.bp
+++ b/radio/config/1.1/Android.bp
@@ -17,11 +17,6 @@
"android.hardware.radio@1.0",
"android.hidl.base@1.0",
],
- types: [
- "ModemInfo",
- "ModemsConfig",
- "PhoneCapability",
- ],
gen_java: true,
}
diff --git a/radio/config/1.1/vts/functional/radio_config_hidl_hal_api.cpp b/radio/config/1.1/vts/functional/radio_config_hidl_hal_api.cpp
index a1639d8..122ce58 100644
--- a/radio/config/1.1/vts/functional/radio_config_hidl_hal_api.cpp
+++ b/radio/config/1.1/vts/functional/radio_config_hidl_hal_api.cpp
@@ -69,3 +69,89 @@
ASSERT_TRUE(CheckAnyOfErrors(radioConfigRsp->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
}
+
+/*
+ * Test IRadioConfig.getPhoneCapability()
+ */
+TEST_F(RadioConfigHidlTest, getPhoneCapability) {
+ serial = GetRandomSerialNumber();
+ Return<void> res = radioConfig->getPhoneCapability(serial);
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, radioConfigRsp->rspInfo.type);
+ EXPECT_EQ(serial, radioConfigRsp->rspInfo.serial);
+ ALOGI("getPhoneCapability, rspInfo.error = %s\n",
+ toString(radioConfigRsp->rspInfo.error).c_str());
+
+ ASSERT_TRUE(CheckAnyOfErrors(
+ radioConfigRsp->rspInfo.error,
+ {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::INTERNAL_ERR}));
+
+ if (radioConfigRsp->rspInfo.error == RadioError ::NONE) {
+ // maxActiveData should be greater than or equal to maxActiveInternetData.
+ EXPECT_GE(radioConfigRsp->phoneCap.maxActiveData,
+ radioConfigRsp->phoneCap.maxActiveInternetData);
+ // maxActiveData and maxActiveInternetData should be 0 or positive numbers.
+ EXPECT_GE(radioConfigRsp->phoneCap.maxActiveInternetData, 0);
+ }
+}
+
+/*
+ * Test IRadioConfig.getPhoneCapability()
+ */
+TEST_F(RadioConfigHidlTest, setPreferredDataModem) {
+ serial = GetRandomSerialNumber();
+ Return<void> res = radioConfig->getPhoneCapability(serial);
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, radioConfigRsp->rspInfo.type);
+ EXPECT_EQ(serial, radioConfigRsp->rspInfo.serial);
+ ALOGI("getPhoneCapability, rspInfo.error = %s\n",
+ toString(radioConfigRsp->rspInfo.error).c_str());
+
+ ASSERT_TRUE(CheckAnyOfErrors(
+ radioConfigRsp->rspInfo.error,
+ {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::INTERNAL_ERR}));
+
+ if (radioConfigRsp->rspInfo.error != RadioError ::NONE) {
+ return;
+ }
+
+ if (radioConfigRsp->phoneCap.logicalModemList.size() == 0) {
+ return;
+ }
+
+ // We get phoneCapability. send setPreferredDataModem command
+ serial = GetRandomSerialNumber();
+ uint8_t modemId = radioConfigRsp->phoneCap.logicalModemList[0].modemId;
+ res = radioConfig->setPreferredDataModem(serial, modemId);
+
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, radioConfigRsp->rspInfo.type);
+ EXPECT_EQ(serial, radioConfigRsp->rspInfo.serial);
+ ALOGI("getModemsConfig, rspInfo.error = %s\n", toString(radioConfigRsp->rspInfo.error).c_str());
+
+ ASSERT_TRUE(CheckAnyOfErrors(
+ radioConfigRsp->rspInfo.error,
+ {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::INTERNAL_ERR}));
+}
+
+/*
+ * Test IRadioConfig.getPhoneCapability()
+ */
+TEST_F(RadioConfigHidlTest, setPreferredDataModem_invalidArgument) {
+ serial = GetRandomSerialNumber();
+ uint8_t modemId = -1;
+ Return<void> res = radioConfig->setPreferredDataModem(serial, modemId);
+
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, radioConfigRsp->rspInfo.type);
+ EXPECT_EQ(serial, radioConfigRsp->rspInfo.serial);
+ ALOGI("getModemsConfig, rspInfo.error = %s\n", toString(radioConfigRsp->rspInfo.error).c_str());
+
+ ASSERT_TRUE(CheckAnyOfErrors(radioConfigRsp->rspInfo.error,
+ {RadioError::INVALID_ARGUMENTS, RadioError::RADIO_NOT_AVAILABLE,
+ RadioError::INTERNAL_ERR}));
+}
diff --git a/radio/config/1.1/vts/functional/radio_config_hidl_hal_utils.h b/radio/config/1.1/vts/functional/radio_config_hidl_hal_utils.h
index 1747ce8..c980901 100644
--- a/radio/config/1.1/vts/functional/radio_config_hidl_hal_utils.h
+++ b/radio/config/1.1/vts/functional/radio_config_hidl_hal_utils.h
@@ -51,6 +51,7 @@
public:
RadioResponseInfo rspInfo;
+ PhoneCapability phoneCap;
RadioConfigResponse(RadioConfigHidlTest& parent);
virtual ~RadioConfigResponse() = default;
diff --git a/radio/config/1.1/vts/functional/radio_config_response.cpp b/radio/config/1.1/vts/functional/radio_config_response.cpp
index 8c9e4d7..ce3dfdf 100644
--- a/radio/config/1.1/vts/functional/radio_config_response.cpp
+++ b/radio/config/1.1/vts/functional/radio_config_response.cpp
@@ -31,7 +31,10 @@
}
Return<void> RadioConfigResponse::getPhoneCapabilityResponse(
- const RadioResponseInfo& /* info */, const PhoneCapability& /* phoneCapability */) {
+ const RadioResponseInfo& info, const PhoneCapability& phoneCapability) {
+ rspInfo = info;
+ phoneCap = phoneCapability;
+ parent.notify(info.serial);
return Void();
}
@@ -47,4 +50,4 @@
Return<void> RadioConfigResponse::setModemsConfigResponse(const RadioResponseInfo& /* info */) {
return Void();
-}
\ No newline at end of file
+}
diff --git a/radio/config/1.2/Android.bp b/radio/config/1.2/Android.bp
index 3e6a425..e69be40 100644
--- a/radio/config/1.2/Android.bp
+++ b/radio/config/1.2/Android.bp
@@ -17,9 +17,6 @@
"android.hardware.radio@1.0",
"android.hidl.base@1.0",
],
- types: [
- "SimSlotStatus",
- ],
gen_java: true,
}
diff --git a/renderscript/1.0/Android.bp b/renderscript/1.0/Android.bp
index 79b2ff7..1d7efad 100644
--- a/renderscript/1.0/Android.bp
+++ b/renderscript/1.0/Android.bp
@@ -15,23 +15,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "AllocationCubemapFace",
- "AllocationMipmapControl",
- "AllocationUsageType",
- "ContextFlags",
- "ContextType",
- "DataKind",
- "DataType",
- "ForEachStrategy",
- "MessageToClientType",
- "MetadataSignatureBitval",
- "SamplerValue",
- "ScriptCall",
- "ScriptIntrinsicID",
- "ThreadPriorities",
- "YuvFormat",
- ],
gen_java: false,
gen_java_constants: true,
}
diff --git a/secure_element/1.0/Android.bp b/secure_element/1.0/Android.bp
index e8081df..c6fa6a9 100644
--- a/secure_element/1.0/Android.bp
+++ b/secure_element/1.0/Android.bp
@@ -14,10 +14,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "LogicalChannelResponse",
- "SecureElementStatus",
- ],
gen_java: true,
}
diff --git a/sensors/1.0/Android.bp b/sensors/1.0/Android.bp
index 92c3c1b..3a41f9c 100644
--- a/sensors/1.0/Android.bp
+++ b/sensors/1.0/Android.bp
@@ -13,31 +13,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "AdditionalInfo",
- "AdditionalInfoType",
- "DynamicSensorInfo",
- "Event",
- "EventPayload",
- "HeartRate",
- "MetaData",
- "MetaDataEventType",
- "OperationMode",
- "RateLevel",
- "Result",
- "SensorFlagBits",
- "SensorFlagShift",
- "SensorInfo",
- "SensorStatus",
- "SensorType",
- "SensorsEventFormatOffset",
- "SharedMemFormat",
- "SharedMemInfo",
- "SharedMemType",
- "Uncal",
- "Vec3",
- "Vec4",
- ],
gen_java: false,
gen_java_constants: true,
}
diff --git a/sensors/2.0/Android.bp b/sensors/2.0/Android.bp
index 57d45ff..eead1d3 100644
--- a/sensors/2.0/Android.bp
+++ b/sensors/2.0/Android.bp
@@ -15,11 +15,6 @@
"android.hardware.sensors@1.0",
"android.hidl.base@1.0",
],
- types: [
- "EventQueueFlagBits",
- "SensorTimeout",
- "WakeLockQueueFlagBits",
- ],
gen_java: false,
}
diff --git a/soundtrigger/2.0/Android.bp b/soundtrigger/2.0/Android.bp
index 92f031a..b805be8 100644
--- a/soundtrigger/2.0/Android.bp
+++ b/soundtrigger/2.0/Android.bp
@@ -15,12 +15,6 @@
"android.hardware.audio.common@2.0",
"android.hidl.base@1.0",
],
- types: [
- "ConfidenceLevel",
- "PhraseRecognitionExtra",
- "RecognitionMode",
- "SoundModelType",
- ],
gen_java: false,
}
diff --git a/tests/bar/1.0/Android.bp b/tests/bar/1.0/Android.bp
index 45c84bc..a1b6b88 100644
--- a/tests/bar/1.0/Android.bp
+++ b/tests/bar/1.0/Android.bp
@@ -15,9 +15,6 @@
"android.hardware.tests.foo@1.0",
"android.hidl.base@1.0",
],
- types: [
- "Def",
- ],
gen_java: false,
}
diff --git a/tests/baz/1.0/Android.bp b/tests/baz/1.0/Android.bp
index edf8fe6..618f4f8 100644
--- a/tests/baz/1.0/Android.bp
+++ b/tests/baz/1.0/Android.bp
@@ -13,8 +13,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- ],
gen_java: true,
}
diff --git a/tests/extension/light/2.0/Android.bp b/tests/extension/light/2.0/Android.bp
index 58c8392..916af71 100644
--- a/tests/extension/light/2.0/Android.bp
+++ b/tests/extension/light/2.0/Android.bp
@@ -11,11 +11,6 @@
"android.hardware.light@2.0",
"android.hidl.base@1.0",
],
- types: [
- "Brightness",
- "Default",
- "LightState",
- ],
gen_java: true,
}
diff --git a/tests/foo/1.0/Android.bp b/tests/foo/1.0/Android.bp
index 769de2d..1c3b3c5 100644
--- a/tests/foo/1.0/Android.bp
+++ b/tests/foo/1.0/Android.bp
@@ -14,13 +14,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "Abc",
- "Def",
- "EnumIterators",
- "Outer",
- "Unrelated",
- ],
gen_java: false,
}
diff --git a/tests/trie/1.0/Android.bp b/tests/trie/1.0/Android.bp
index 870a350..0795f66 100644
--- a/tests/trie/1.0/Android.bp
+++ b/tests/trie/1.0/Android.bp
@@ -10,15 +10,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "A",
- "B",
- "E1",
- "E2",
- "S",
- "TrieEdge",
- "TrieNode",
- ],
gen_java: false,
}
diff --git a/tetheroffload/control/1.0/Android.bp b/tetheroffload/control/1.0/Android.bp
index 8e3fd27..dc2487b 100644
--- a/tetheroffload/control/1.0/Android.bp
+++ b/tetheroffload/control/1.0/Android.bp
@@ -14,12 +14,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "IPv4AddrPortPair",
- "NatTimeoutUpdate",
- "NetworkProtocol",
- "OffloadCallbackEvent",
- ],
gen_java: true,
}
diff --git a/thermal/1.0/Android.bp b/thermal/1.0/Android.bp
index e764e28..8428977 100644
--- a/thermal/1.0/Android.bp
+++ b/thermal/1.0/Android.bp
@@ -13,15 +13,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "CoolingDevice",
- "CoolingType",
- "CpuUsage",
- "Temperature",
- "TemperatureType",
- "ThermalStatus",
- "ThermalStatusCode",
- ],
gen_java: true,
gen_java_constants: true,
}
diff --git a/thermal/2.0/Android.bp b/thermal/2.0/Android.bp
index c513739..af23ee3 100644
--- a/thermal/2.0/Android.bp
+++ b/thermal/2.0/Android.bp
@@ -15,14 +15,6 @@
"android.hardware.thermal@1.0",
"android.hidl.base@1.0",
],
- types: [
- "CoolingDevice",
- "CoolingType",
- "Temperature",
- "TemperatureThreshold",
- "TemperatureType",
- "ThrottlingSeverity",
- ],
gen_java: true,
}
diff --git a/tv/cec/1.0/Android.bp b/tv/cec/1.0/Android.bp
index 2aa155e..7626dc0 100644
--- a/tv/cec/1.0/Android.bp
+++ b/tv/cec/1.0/Android.bp
@@ -14,20 +14,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "AbortReason",
- "CecDeviceType",
- "CecLogicalAddress",
- "CecMessage",
- "CecMessageType",
- "HdmiPortInfo",
- "HdmiPortType",
- "HotplugEvent",
- "MaxLength",
- "OptionKey",
- "Result",
- "SendMessageResult",
- ],
gen_java: true,
}
diff --git a/tv/cec/2.0/Android.bp b/tv/cec/2.0/Android.bp
index 998cb23..5a67fa5 100644
--- a/tv/cec/2.0/Android.bp
+++ b/tv/cec/2.0/Android.bp
@@ -15,32 +15,6 @@
"android.hidl.base@1.0",
"android.hidl.safe_union@1.0",
],
- types: [
- "AbortReason",
- "CecAllDeviceTypeValue",
- "CecDeviceFeature",
- "CecDeviceInfo",
- "CecDeviceType",
- "CecLogicalAddress",
- "CecMessage",
- "CecMessageType",
- "CecPowerState",
- "CecRcProfile",
- "CecRcProfile1",
- "CecRcProfileId",
- "CecRcProfileSource",
- "CecTopologyEvent",
- "CecTopologyEventType",
- "CecUICommandCodes",
- "CecVersion",
- "HdmiPortInfo",
- "HdmiPortType",
- "HotplugEvent",
- "MaxLength",
- "OptionKey",
- "Result",
- "SendMessageResult",
- ],
gen_java: true,
}
diff --git a/tv/input/1.0/Android.bp b/tv/input/1.0/Android.bp
index 1bf3930..a6c1959 100644
--- a/tv/input/1.0/Android.bp
+++ b/tv/input/1.0/Android.bp
@@ -15,15 +15,6 @@
"android.hardware.audio.common@2.0",
"android.hidl.base@1.0",
],
- types: [
- "CableConnectionStatus",
- "Result",
- "TvInputDeviceInfo",
- "TvInputEvent",
- "TvInputEventType",
- "TvInputType",
- "TvStreamConfig",
- ],
gen_java: false,
gen_java_constants: true,
}
diff --git a/update-makefiles.sh b/update-makefiles.sh
index 14c5b01..c58240f 100755
--- a/update-makefiles.sh
+++ b/update-makefiles.sh
@@ -13,9 +13,3 @@
do_makefiles_update \
"android.hardware:hardware/interfaces" \
"android.hidl:system/libhidl/transport"
-
-echo "Updating files at $ANDROID_BUILD_TOP/test/vts-testcase/hal"
-pushd $ANDROID_BUILD_TOP/test/vts-testcase/hal
-./script/update_makefiles.py
-popd
-
diff --git a/usb/1.0/Android.bp b/usb/1.0/Android.bp
index 6676fa5..a00b671 100644
--- a/usb/1.0/Android.bp
+++ b/usb/1.0/Android.bp
@@ -14,15 +14,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "PortDataRole",
- "PortMode",
- "PortPowerRole",
- "PortRole",
- "PortRoleType",
- "PortStatus",
- "Status",
- ],
gen_java: true,
gen_java_constants: true,
}
diff --git a/usb/1.1/Android.bp b/usb/1.1/Android.bp
index c398f94..fb2cc4e 100644
--- a/usb/1.1/Android.bp
+++ b/usb/1.1/Android.bp
@@ -15,10 +15,6 @@
"android.hardware.usb@1.0",
"android.hidl.base@1.0",
],
- types: [
- "PortMode_1_1",
- "PortStatus_1_1",
- ],
gen_java: true,
gen_java_constants: true,
}
diff --git a/usb/1.2/Android.bp b/usb/1.2/Android.bp
index 55ffad0..5206754 100644
--- a/usb/1.2/Android.bp
+++ b/usb/1.2/Android.bp
@@ -16,13 +16,6 @@
"android.hardware.usb@1.1",
"android.hidl.base@1.0",
],
- types: [
- "ContaminantDetectionStatus",
- "ContaminantProtectionMode",
- "ContaminantProtectionStatus",
- "PortStatus",
- "Status",
- ],
gen_java: true,
gen_java_constants: true,
}
diff --git a/usb/gadget/1.0/Android.bp b/usb/gadget/1.0/Android.bp
index f38002f..7ee432b 100644
--- a/usb/gadget/1.0/Android.bp
+++ b/usb/gadget/1.0/Android.bp
@@ -14,10 +14,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "GadgetFunction",
- "Status",
- ],
gen_java: true,
}
diff --git a/vibrator/1.0/Android.bp b/vibrator/1.0/Android.bp
index 6913c88..acc97d4 100644
--- a/vibrator/1.0/Android.bp
+++ b/vibrator/1.0/Android.bp
@@ -13,11 +13,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "Effect",
- "EffectStrength",
- "Status",
- ],
gen_java: true,
gen_java_constants: true,
}
diff --git a/vibrator/1.1/Android.bp b/vibrator/1.1/Android.bp
index 810797b..2055e5a 100644
--- a/vibrator/1.1/Android.bp
+++ b/vibrator/1.1/Android.bp
@@ -14,9 +14,6 @@
"android.hardware.vibrator@1.0",
"android.hidl.base@1.0",
],
- types: [
- "Effect_1_1",
- ],
gen_java: true,
gen_java_constants: true,
}
diff --git a/vibrator/1.2/Android.bp b/vibrator/1.2/Android.bp
index 88192c1..481adee 100644
--- a/vibrator/1.2/Android.bp
+++ b/vibrator/1.2/Android.bp
@@ -15,9 +15,6 @@
"android.hardware.vibrator@1.1",
"android.hidl.base@1.0",
],
- types: [
- "Effect",
- ],
gen_java: true,
}
diff --git a/weaver/1.0/Android.bp b/weaver/1.0/Android.bp
index e088a16..7f93b10 100644
--- a/weaver/1.0/Android.bp
+++ b/weaver/1.0/Android.bp
@@ -13,12 +13,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "WeaverConfig",
- "WeaverReadResponse",
- "WeaverReadStatus",
- "WeaverStatus",
- ],
gen_java: true,
}
diff --git a/wifi/1.0/Android.bp b/wifi/1.0/Android.bp
index 096fb6c..c5ee1bb 100644
--- a/wifi/1.0/Android.bp
+++ b/wifi/1.0/Android.bp
@@ -25,90 +25,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "IfaceType",
- "NanBandIndex",
- "NanBandSpecificConfig",
- "NanCapabilities",
- "NanCipherSuiteType",
- "NanClusterEventInd",
- "NanClusterEventType",
- "NanConfigRequest",
- "NanDataPathChannelCfg",
- "NanDataPathConfirmInd",
- "NanDataPathRequestInd",
- "NanDataPathSecurityConfig",
- "NanDataPathSecurityType",
- "NanDebugConfig",
- "NanDiscoveryCommonConfig",
- "NanEnableRequest",
- "NanFollowupReceivedInd",
- "NanInitiateDataPathRequest",
- "NanMatchAlg",
- "NanMatchInd",
- "NanParamSizeLimits",
- "NanPublishRequest",
- "NanPublishType",
- "NanRangingIndication",
- "NanRespondToDataPathIndicationRequest",
- "NanSrfType",
- "NanStatusType",
- "NanSubscribeRequest",
- "NanSubscribeType",
- "NanTransmitFollowupRequest",
- "NanTxType",
- "RttBw",
- "RttCapabilities",
- "RttConfig",
- "RttLciInformation",
- "RttLcrInformation",
- "RttMotionPattern",
- "RttPeerType",
- "RttPreamble",
- "RttResponder",
- "RttResult",
- "RttStatus",
- "RttType",
- "StaApfPacketFilterCapabilities",
- "StaBackgroundScanBucketEventReportSchemeMask",
- "StaBackgroundScanBucketParameters",
- "StaBackgroundScanCapabilities",
- "StaBackgroundScanParameters",
- "StaLinkLayerIfacePacketStats",
- "StaLinkLayerIfaceStats",
- "StaLinkLayerRadioStats",
- "StaLinkLayerStats",
- "StaRoamingCapabilities",
- "StaRoamingConfig",
- "StaRoamingState",
- "StaScanData",
- "StaScanDataFlagMask",
- "StaScanLimits",
- "StaScanResult",
- "WifiBand",
- "WifiChannelInfo",
- "WifiChannelWidthInMhz",
- "WifiDebugHostWakeReasonRxIcmpPacketDetails",
- "WifiDebugHostWakeReasonRxMulticastPacketDetails",
- "WifiDebugHostWakeReasonRxPacketDetails",
- "WifiDebugHostWakeReasonStats",
- "WifiDebugPacketFateFrameInfo",
- "WifiDebugPacketFateFrameType",
- "WifiDebugRingBufferFlags",
- "WifiDebugRingBufferStatus",
- "WifiDebugRingBufferVerboseLevel",
- "WifiDebugRxPacketFate",
- "WifiDebugRxPacketFateReport",
- "WifiDebugTxPacketFate",
- "WifiDebugTxPacketFateReport",
- "WifiInformationElement",
- "WifiNanStatus",
- "WifiRateInfo",
- "WifiRateNss",
- "WifiRatePreamble",
- "WifiStatus",
- "WifiStatusCode",
- ],
gen_java: true,
gen_java_constants: true,
}
diff --git a/wifi/1.2/Android.bp b/wifi/1.2/Android.bp
index c144f22..1863eaf 100644
--- a/wifi/1.2/Android.bp
+++ b/wifi/1.2/Android.bp
@@ -20,12 +20,6 @@
"android.hardware.wifi@1.1",
"android.hidl.base@1.0",
],
- types: [
- "NanConfigRequestSupplemental",
- "NanDataPathChannelInfo",
- "NanDataPathConfirmInd",
- "NanDataPathScheduleUpdateInd",
- ],
gen_java: true,
}
diff --git a/wifi/1.3/Android.bp b/wifi/1.3/Android.bp
index 8af1dc4..401c7a6 100644
--- a/wifi/1.3/Android.bp
+++ b/wifi/1.3/Android.bp
@@ -18,11 +18,6 @@
"android.hardware.wifi@1.2",
"android.hidl.base@1.0",
],
- types: [
- "StaLinkLayerRadioStats",
- "StaLinkLayerStats",
- "WifiChannelStats",
- ],
gen_java: true,
}
diff --git a/wifi/1.3/default/tests/runtests.sh b/wifi/1.3/default/tests/runtests.sh
index eefc697..6bce3ef 100755
--- a/wifi/1.3/default/tests/runtests.sh
+++ b/wifi/1.3/default/tests/runtests.sh
@@ -23,4 +23,4 @@
$ANDROID_BUILD_TOP/build/soong/soong_ui.bash --make-mode android.hardware.wifi@1.0-service-tests
adb root
adb sync data
-adb shell /data/nativetest64/android.hardware.wifi@1.0-service-tests/android.hardware.wifi@1.0-service-tests
+adb shell /data/nativetest64/vendor/android.hardware.wifi@1.0-service-tests/android.hardware.wifi@1.0-service-tests
diff --git a/wifi/1.3/default/wifi_chip.cpp b/wifi/1.3/default/wifi_chip.cpp
index 906f14a..727aac5 100644
--- a/wifi/1.3/default/wifi_chip.cpp
+++ b/wifi/1.3/default/wifi_chip.cpp
@@ -86,16 +86,15 @@
}
std::array<char, PROPERTY_VALUE_MAX> buffer;
- std::string propName = "wifi.interface." + std::to_string(idx);
- auto res = property_get(propName.c_str(), buffer.data(), nullptr);
- if (res > 0) return buffer.data();
-
if (idx == 0 || idx == 1) {
const char* altPropName =
(idx == 0) ? "wifi.interface" : "wifi.concurrent.interface";
- res = property_get(altPropName, buffer.data(), nullptr);
+ auto res = property_get(altPropName, buffer.data(), nullptr);
if (res > 0) return buffer.data();
}
+ std::string propName = "wifi.interface." + std::to_string(idx);
+ auto res = property_get(propName.c_str(), buffer.data(), nullptr);
+ if (res > 0) return buffer.data();
return "wlan" + std::to_string(idx);
}
diff --git a/wifi/1.3/default/wifi_legacy_hal.cpp b/wifi/1.3/default/wifi_legacy_hal.cpp
index 2b90f92..5aa98c4 100644
--- a/wifi/1.3/default/wifi_legacy_hal.cpp
+++ b/wifi/1.3/default/wifi_legacy_hal.cpp
@@ -424,6 +424,8 @@
return WIFI_SUCCESS;
}
+bool WifiLegacyHal::isStarted() { return is_started_; }
+
std::pair<wifi_error, std::string> WifiLegacyHal::getDriverVersion(
const std::string& iface_name) {
std::array<char, kMaxVersionStringLength> buffer;
diff --git a/wifi/1.3/default/wifi_legacy_hal.h b/wifi/1.3/default/wifi_legacy_hal.h
index d6f05ae..70a919f 100644
--- a/wifi/1.3/default/wifi_legacy_hal.h
+++ b/wifi/1.3/default/wifi_legacy_hal.h
@@ -181,6 +181,8 @@
// using a predefined timeout.
virtual wifi_error stop(std::unique_lock<std::recursive_mutex>* lock,
const std::function<void()>& on_complete_callback);
+ // Checks if legacy HAL has successfully started
+ bool isStarted();
// Wrappers for all the functions in the legacy HAL function table.
std::pair<wifi_error, std::string> getDriverVersion(
const std::string& iface_name);
diff --git a/wifi/hostapd/1.0/Android.bp b/wifi/hostapd/1.0/Android.bp
index a17e153..9ee976e 100644
--- a/wifi/hostapd/1.0/Android.bp
+++ b/wifi/hostapd/1.0/Android.bp
@@ -14,10 +14,6 @@
"android.hardware.wifi.supplicant@1.0",
"android.hidl.base@1.0",
],
- types: [
- "HostapdStatus",
- "HostapdStatusCode",
- ],
gen_java: true,
}
diff --git a/wifi/offload/1.0/Android.bp b/wifi/offload/1.0/Android.bp
index c6c0e7a..1a9ae73 100644
--- a/wifi/offload/1.0/Android.bp
+++ b/wifi/offload/1.0/Android.bp
@@ -14,20 +14,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "Capability",
- "LogRecord",
- "NetworkInfo",
- "OffloadStatus",
- "OffloadStatusCode",
- "RecordName",
- "ScanFilter",
- "ScanParam",
- "ScanRecord",
- "ScanResult",
- "ScanStats",
- "SecurityMode",
- ],
gen_java: false,
}
diff --git a/wifi/supplicant/1.0/Android.bp b/wifi/supplicant/1.0/Android.bp
index fc7ce55..c99706d 100644
--- a/wifi/supplicant/1.0/Android.bp
+++ b/wifi/supplicant/1.0/Android.bp
@@ -24,13 +24,6 @@
interfaces: [
"android.hidl.base@1.0",
],
- types: [
- "IfaceType",
- "P2pGroupCapabilityMask",
- "SupplicantStatus",
- "SupplicantStatusCode",
- "WpsConfigMethods",
- ],
gen_java: true,
}
diff --git a/wifi/supplicant/1.2/Android.bp b/wifi/supplicant/1.2/Android.bp
index a0fc2b1..c685022 100644
--- a/wifi/supplicant/1.2/Android.bp
+++ b/wifi/supplicant/1.2/Android.bp
@@ -19,12 +19,6 @@
"android.hardware.wifi.supplicant@1.1",
"android.hidl.base@1.0",
],
- types: [
- "DppAkm",
- "DppFailureCode",
- "DppNetRole",
- "DppProgressCode",
- ],
gen_java: true,
}