Move the Diagnostics API classes to android.car.diagnostic
Bug: 64024685
Test: build, flash + runtest CarDiagnosticManagerTest
Change-Id: I73e079be8910e550ae52f78162680d585949d022
diff --git a/car-lib/api/system-current.txt b/car-lib/api/system-current.txt
index fe2794b..65a1ec1 100644
--- a/car-lib/api/system-current.txt
+++ b/car-lib/api/system-current.txt
@@ -353,14 +353,14 @@
}
-package android.car.hardware {
+package android.car.diagnostic {
public class CarDiagnosticEvent implements android.os.Parcelable {
ctor public CarDiagnosticEvent(android.os.Parcel);
method public int describeContents();
method public java.lang.Integer getFuelSystemStatus();
method public java.lang.Integer getFuelType();
- method public android.car.hardware.CarDiagnosticEvent.CommonIgnitionMonitors getIgnitionMonitors();
+ method public android.car.diagnostic.CarDiagnosticEvent.CommonIgnitionMonitors getIgnitionMonitors();
method public java.lang.Integer getSecondaryAirStatus();
method public float getSystemFloatSensor(int, float);
method public java.lang.Float getSystemFloatSensor(int);
@@ -374,37 +374,37 @@
method public boolean isLiveFrame();
method public void writeToJson(android.util.JsonWriter) throws java.io.IOException;
method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator<android.car.hardware.CarDiagnosticEvent> CREATOR;
+ field public static final android.os.Parcelable.Creator<android.car.diagnostic.CarDiagnosticEvent> CREATOR;
field public final java.lang.String dtc;
field public final int frameType;
field public final long timestamp;
}
public static class CarDiagnosticEvent.Builder {
- method public android.car.hardware.CarDiagnosticEvent.Builder atTimestamp(long);
- method public android.car.hardware.CarDiagnosticEvent build();
- method public static android.car.hardware.CarDiagnosticEvent.Builder newFreezeFrameBuilder();
- method public static android.car.hardware.CarDiagnosticEvent.Builder newLiveFrameBuilder();
- method public android.car.hardware.CarDiagnosticEvent.Builder withDtc(java.lang.String);
- method public android.car.hardware.CarDiagnosticEvent.Builder withFloatValue(int, float);
- method public android.car.hardware.CarDiagnosticEvent.Builder withIntValue(int, int);
+ method public android.car.diagnostic.CarDiagnosticEvent.Builder atTimestamp(long);
+ method public android.car.diagnostic.CarDiagnosticEvent build();
+ method public static android.car.diagnostic.CarDiagnosticEvent.Builder newFreezeFrameBuilder();
+ method public static android.car.diagnostic.CarDiagnosticEvent.Builder newLiveFrameBuilder();
+ method public android.car.diagnostic.CarDiagnosticEvent.Builder withDtc(java.lang.String);
+ method public android.car.diagnostic.CarDiagnosticEvent.Builder withFloatValue(int, float);
+ method public android.car.diagnostic.CarDiagnosticEvent.Builder withIntValue(int, int);
}
public static class CarDiagnosticEvent.CommonIgnitionMonitors {
- method public android.car.hardware.CarDiagnosticEvent.CompressionIgnitionMonitors asCompressionIgnitionMonitors();
- method public android.car.hardware.CarDiagnosticEvent.SparkIgnitionMonitors asSparkIgnitionMonitors();
- field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor components;
- field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor fuelSystem;
- field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor misfire;
+ method public android.car.diagnostic.CarDiagnosticEvent.CompressionIgnitionMonitors asCompressionIgnitionMonitors();
+ method public android.car.diagnostic.CarDiagnosticEvent.SparkIgnitionMonitors asSparkIgnitionMonitors();
+ field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor components;
+ field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor fuelSystem;
+ field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor misfire;
}
- public static final class CarDiagnosticEvent.CompressionIgnitionMonitors extends android.car.hardware.CarDiagnosticEvent.CommonIgnitionMonitors {
- field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor EGROrVVT;
- field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor NMHCCatalyst;
- field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor NOxSCR;
- field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor PMFilter;
- field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor boostPressure;
- field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor exhaustGasSensor;
+ public static final class CarDiagnosticEvent.CompressionIgnitionMonitors extends android.car.diagnostic.CarDiagnosticEvent.CommonIgnitionMonitors {
+ field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor EGROrVVT;
+ field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor NMHCCatalyst;
+ field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor NOxSCR;
+ field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor PMFilter;
+ field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor boostPressure;
+ field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor exhaustGasSensor;
}
public static final class CarDiagnosticEvent.FuelSystemStatus {
@@ -463,29 +463,29 @@
public static abstract class CarDiagnosticEvent.SecondaryAirStatus.Status implements java.lang.annotation.Annotation {
}
- public static final class CarDiagnosticEvent.SparkIgnitionMonitors extends android.car.hardware.CarDiagnosticEvent.CommonIgnitionMonitors {
- field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor ACRefrigerant;
- field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor EGR;
- field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor catalyst;
- field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor evaporativeSystem;
- field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor heatedCatalyst;
- field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor oxygenSensor;
- field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor oxygenSensorHeater;
- field public final android.car.hardware.CarDiagnosticEvent.IgnitionMonitor secondaryAirSystem;
+ public static final class CarDiagnosticEvent.SparkIgnitionMonitors extends android.car.diagnostic.CarDiagnosticEvent.CommonIgnitionMonitors {
+ field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor ACRefrigerant;
+ field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor EGR;
+ field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor catalyst;
+ field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor evaporativeSystem;
+ field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor heatedCatalyst;
+ field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor oxygenSensor;
+ field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor oxygenSensorHeater;
+ field public final android.car.diagnostic.CarDiagnosticEvent.IgnitionMonitor secondaryAirSystem;
}
public final class CarDiagnosticManager {
method public boolean clearFreezeFrames(long...) throws android.car.CarNotConnectedException;
- method public android.car.hardware.CarDiagnosticEvent getFreezeFrame(long) throws android.car.CarNotConnectedException;
+ method public android.car.diagnostic.CarDiagnosticEvent getFreezeFrame(long) throws android.car.CarNotConnectedException;
method public long[] getFreezeFrameTimestamps() throws android.car.CarNotConnectedException;
- method public android.car.hardware.CarDiagnosticEvent getLatestLiveFrame() throws android.car.CarNotConnectedException;
+ method public android.car.diagnostic.CarDiagnosticEvent getLatestLiveFrame() throws android.car.CarNotConnectedException;
method public boolean isClearFreezeFramesSupported() throws android.car.CarNotConnectedException;
method public boolean isFreezeFrameNotificationSupported() throws android.car.CarNotConnectedException;
method public boolean isGetFreezeFrameSupported() throws android.car.CarNotConnectedException;
method public boolean isLiveFrameSupported() throws android.car.CarNotConnectedException;
method public void onCarDisconnected();
- method public boolean registerListener(android.car.hardware.CarDiagnosticManager.OnDiagnosticEventListener, int, int) throws android.car.CarNotConnectedException, java.lang.IllegalArgumentException;
- method public void unregisterListener(android.car.hardware.CarDiagnosticManager.OnDiagnosticEventListener);
+ method public boolean registerListener(android.car.diagnostic.CarDiagnosticManager.OnDiagnosticEventListener, int, int) throws android.car.CarNotConnectedException, java.lang.IllegalArgumentException;
+ method public void unregisterListener(android.car.diagnostic.CarDiagnosticManager.OnDiagnosticEventListener);
field public static final int FRAME_TYPE_FREEZE = 1; // 0x1
field public static final int FRAME_TYPE_LIVE = 0; // 0x0
}
@@ -494,9 +494,126 @@
}
public static abstract interface CarDiagnosticManager.OnDiagnosticEventListener {
- method public abstract void onDiagnosticEvent(android.car.hardware.CarDiagnosticEvent);
+ method public abstract void onDiagnosticEvent(android.car.diagnostic.CarDiagnosticEvent);
}
+ public final class FloatSensorIndex {
+ field public static final int ABSOLUTE_EVAPORATION_SYSTEM_VAPOR_PRESSURE = 58; // 0x3a
+ field public static final int ABSOLUTE_LOAD_VALUE = 48; // 0x30
+ field public static final int ABSOLUTE_THROTTLE_POSITION_B = 51; // 0x33
+ field public static final int ABSOLUTE_THROTTLE_POSITION_C = 52; // 0x34
+ field public static final int ACCELERATOR_PEDAL_POSITION_D = 53; // 0x35
+ field public static final int ACCELERATOR_PEDAL_POSITION_E = 54; // 0x36
+ field public static final int ACCELERATOR_PEDAL_POSITION_F = 55; // 0x37
+ field public static final int CALCULATED_ENGINE_LOAD = 0; // 0x0
+ field public static final int CATALYST_TEMPERATURE_BANK1_SENSOR1 = 44; // 0x2c
+ field public static final int CATALYST_TEMPERATURE_BANK1_SENSOR2 = 46; // 0x2e
+ field public static final int CATALYST_TEMPERATURE_BANK2_SENSOR1 = 45; // 0x2d
+ field public static final int CATALYST_TEMPERATURE_BANK2_SENSOR2 = 47; // 0x2f
+ field public static final int COMMANDED_EVAPORATIVE_PURGE = 41; // 0x29
+ field public static final int COMMANDED_EXHAUST_GAS_RECIRCULATION = 39; // 0x27
+ field public static final int COMMANDED_THROTTLE_ACTUATOR = 56; // 0x38
+ field public static final int ENGINE_COOLANT_TEMPERATURE = 1; // 0x1
+ field public static final int ENGINE_FUEL_RATE = 70; // 0x46
+ field public static final int ENGINE_RPM = 8; // 0x8
+ field public static final int ETHANOL_FUEL_PERCENTAGE = 57; // 0x39
+ field public static final int EVAPORATION_SYSTEM_VAPOR_PRESSURE = 43; // 0x2b
+ field public static final int EXHAUST_GAS_RECIRCULATION_ERROR = 40; // 0x28
+ field public static final int FUEL_AIR_COMMANDED_EQUIVALENCE_RATIO = 49; // 0x31
+ field public static final int FUEL_INJECTION_TIMING = 69; // 0x45
+ field public static final int FUEL_PRESSURE = 6; // 0x6
+ field public static final int FUEL_RAIL_GAUGE_PRESSURE = 38; // 0x26
+ field public static final int FUEL_RAIL_PRESSURE = 37; // 0x25
+ field public static final int FUEL_TANK_LEVEL_INPUT = 42; // 0x2a
+ field public static final int HYBRID_BATTERY_PACK_REMAINING_LIFE = 68; // 0x44
+ field public static final int INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 7; // 0x7
+ field public static final int LAST_SYSTEM = 70; // 0x46
+ field public static final int LONG_TERM_FUEL_TRIM_BANK1 = 3; // 0x3
+ field public static final int LONG_TERM_FUEL_TRIM_BANK2 = 5; // 0x5
+ field public static final int LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 63; // 0x3f
+ field public static final int LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 64; // 0x40
+ field public static final int LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 65; // 0x41
+ field public static final int LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 66; // 0x42
+ field public static final int MAF_AIR_FLOW_RATE = 11; // 0xb
+ field public static final int OXYGEN_SENSOR1_FUEL_AIR_EQUIVALENCE_RATIO = 15; // 0xf
+ field public static final int OXYGEN_SENSOR1_SHORT_TERM_FUEL_TRIM = 14; // 0xe
+ field public static final int OXYGEN_SENSOR1_VOLTAGE = 13; // 0xd
+ field public static final int OXYGEN_SENSOR2_FUEL_AIR_EQUIVALENCE_RATIO = 18; // 0x12
+ field public static final int OXYGEN_SENSOR2_SHORT_TERM_FUEL_TRIM = 17; // 0x11
+ field public static final int OXYGEN_SENSOR2_VOLTAGE = 16; // 0x10
+ field public static final int OXYGEN_SENSOR3_FUEL_AIR_EQUIVALENCE_RATIO = 21; // 0x15
+ field public static final int OXYGEN_SENSOR3_SHORT_TERM_FUEL_TRIM = 20; // 0x14
+ field public static final int OXYGEN_SENSOR3_VOLTAGE = 19; // 0x13
+ field public static final int OXYGEN_SENSOR4_FUEL_AIR_EQUIVALENCE_RATIO = 24; // 0x18
+ field public static final int OXYGEN_SENSOR4_SHORT_TERM_FUEL_TRIM = 23; // 0x17
+ field public static final int OXYGEN_SENSOR4_VOLTAGE = 22; // 0x16
+ field public static final int OXYGEN_SENSOR5_FUEL_AIR_EQUIVALENCE_RATIO = 27; // 0x1b
+ field public static final int OXYGEN_SENSOR5_SHORT_TERM_FUEL_TRIM = 26; // 0x1a
+ field public static final int OXYGEN_SENSOR5_VOLTAGE = 25; // 0x19
+ field public static final int OXYGEN_SENSOR6_FUEL_AIR_EQUIVALENCE_RATIO = 30; // 0x1e
+ field public static final int OXYGEN_SENSOR6_SHORT_TERM_FUEL_TRIM = 29; // 0x1d
+ field public static final int OXYGEN_SENSOR6_VOLTAGE = 28; // 0x1c
+ field public static final int OXYGEN_SENSOR7_FUEL_AIR_EQUIVALENCE_RATIO = 33; // 0x21
+ field public static final int OXYGEN_SENSOR7_SHORT_TERM_FUEL_TRIM = 32; // 0x20
+ field public static final int OXYGEN_SENSOR7_VOLTAGE = 31; // 0x1f
+ field public static final int OXYGEN_SENSOR8_FUEL_AIR_EQUIVALENCE_RATIO = 36; // 0x24
+ field public static final int OXYGEN_SENSOR8_SHORT_TERM_FUEL_TRIM = 35; // 0x23
+ field public static final int OXYGEN_SENSOR8_VOLTAGE = 34; // 0x22
+ field public static final int RELATIVE_ACCELERATOR_PEDAL_POSITION = 67; // 0x43
+ field public static final int RELATIVE_THROTTLE_POSITION = 50; // 0x32
+ field public static final int SHORT_TERM_FUEL_TRIM_BANK1 = 2; // 0x2
+ field public static final int SHORT_TERM_FUEL_TRIM_BANK2 = 4; // 0x4
+ field public static final int SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 59; // 0x3b
+ field public static final int SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 60; // 0x3c
+ field public static final int SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 61; // 0x3d
+ field public static final int SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 62; // 0x3e
+ field public static final int THROTTLE_POSITION = 12; // 0xc
+ field public static final int TIMING_ADVANCE = 10; // 0xa
+ field public static final int VEHICLE_SPEED = 9; // 0x9
+ field public static final int VENDOR_START = 71; // 0x47
+ }
+
+ public final class IntegerSensorIndex {
+ field public static final int ABSOLUTE_BAROMETRIC_PRESSURE = 11; // 0xb
+ field public static final int AMBIENT_AIR_TEMPERATURE = 13; // 0xd
+ field public static final int COMMANDED_SECONDARY_AIR_STATUS = 5; // 0x5
+ field public static final int CONTROL_MODULE_VOLTAGE = 12; // 0xc
+ field public static final int DISTANCE_TRAVELED_SINCE_CODES_CLEARED = 10; // 0xa
+ field public static final int DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON = 8; // 0x8
+ field public static final int DRIVER_DEMAND_PERCENT_TORQUE = 24; // 0x18
+ field public static final int ENGINE_ACTUAL_PERCENT_TORQUE = 25; // 0x19
+ field public static final int ENGINE_OIL_TEMPERATURE = 23; // 0x17
+ field public static final int ENGINE_PERCENT_TORQUE_DATA_IDLE = 27; // 0x1b
+ field public static final int ENGINE_PERCENT_TORQUE_DATA_POINT1 = 28; // 0x1c
+ field public static final int ENGINE_PERCENT_TORQUE_DATA_POINT2 = 29; // 0x1d
+ field public static final int ENGINE_PERCENT_TORQUE_DATA_POINT3 = 30; // 0x1e
+ field public static final int ENGINE_PERCENT_TORQUE_DATA_POINT4 = 31; // 0x1f
+ field public static final int ENGINE_REFERENCE_PERCENT_TORQUE = 26; // 0x1a
+ field public static final int FUEL_RAIL_ABSOLUTE_PRESSURE = 22; // 0x16
+ field public static final int FUEL_SYSTEM_STATUS = 0; // 0x0
+ field public static final int FUEL_TYPE = 21; // 0x15
+ field public static final int IGNITION_MONITORS_SUPPORTED = 2; // 0x2
+ field public static final int IGNITION_SPECIFIC_MONITORS = 3; // 0x3
+ field public static final int INTAKE_AIR_TEMPERATURE = 4; // 0x4
+ field public static final int LAST_SYSTEM = 31; // 0x1f
+ field public static final int MALFUNCTION_INDICATOR_LIGHT_ON = 1; // 0x1
+ field public static final int MAX_AIR_FLOW_RATE_FROM_MASS_AIR_FLOW_SENSOR = 20; // 0x14
+ field public static final int MAX_FUEL_AIR_EQUIVALENCE_RATIO = 16; // 0x10
+ field public static final int MAX_INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 19; // 0x13
+ field public static final int MAX_OXYGEN_SENSOR_CURRENT = 18; // 0x12
+ field public static final int MAX_OXYGEN_SENSOR_VOLTAGE = 17; // 0x11
+ field public static final int NUM_OXYGEN_SENSORS_PRESENT = 6; // 0x6
+ field public static final int RUNTIME_SINCE_ENGINE_START = 7; // 0x7
+ field public static final int TIME_SINCE_TROUBLE_CODES_CLEARED = 15; // 0xf
+ field public static final int TIME_WITH_MALFUNCTION_LIGHT_ON = 14; // 0xe
+ field public static final int VENDOR_START = 32; // 0x20
+ field public static final int WARMUPS_SINCE_CODES_CLEARED = 9; // 0x9
+ }
+
+}
+
+package android.car.hardware {
+
public class CarPropertyConfig<T> implements android.os.Parcelable {
method public int describeContents();
method public int getAreaCount();
@@ -645,119 +762,6 @@
method public abstract void onErrorEvent(int, int);
}
- public final class FloatSensorIndex {
- field public static final int ABSOLUTE_EVAPORATION_SYSTEM_VAPOR_PRESSURE = 58; // 0x3a
- field public static final int ABSOLUTE_LOAD_VALUE = 48; // 0x30
- field public static final int ABSOLUTE_THROTTLE_POSITION_B = 51; // 0x33
- field public static final int ABSOLUTE_THROTTLE_POSITION_C = 52; // 0x34
- field public static final int ACCELERATOR_PEDAL_POSITION_D = 53; // 0x35
- field public static final int ACCELERATOR_PEDAL_POSITION_E = 54; // 0x36
- field public static final int ACCELERATOR_PEDAL_POSITION_F = 55; // 0x37
- field public static final int CALCULATED_ENGINE_LOAD = 0; // 0x0
- field public static final int CATALYST_TEMPERATURE_BANK1_SENSOR1 = 44; // 0x2c
- field public static final int CATALYST_TEMPERATURE_BANK1_SENSOR2 = 46; // 0x2e
- field public static final int CATALYST_TEMPERATURE_BANK2_SENSOR1 = 45; // 0x2d
- field public static final int CATALYST_TEMPERATURE_BANK2_SENSOR2 = 47; // 0x2f
- field public static final int COMMANDED_EVAPORATIVE_PURGE = 41; // 0x29
- field public static final int COMMANDED_EXHAUST_GAS_RECIRCULATION = 39; // 0x27
- field public static final int COMMANDED_THROTTLE_ACTUATOR = 56; // 0x38
- field public static final int ENGINE_COOLANT_TEMPERATURE = 1; // 0x1
- field public static final int ENGINE_FUEL_RATE = 70; // 0x46
- field public static final int ENGINE_RPM = 8; // 0x8
- field public static final int ETHANOL_FUEL_PERCENTAGE = 57; // 0x39
- field public static final int EVAPORATION_SYSTEM_VAPOR_PRESSURE = 43; // 0x2b
- field public static final int EXHAUST_GAS_RECIRCULATION_ERROR = 40; // 0x28
- field public static final int FUEL_AIR_COMMANDED_EQUIVALENCE_RATIO = 49; // 0x31
- field public static final int FUEL_INJECTION_TIMING = 69; // 0x45
- field public static final int FUEL_PRESSURE = 6; // 0x6
- field public static final int FUEL_RAIL_GAUGE_PRESSURE = 38; // 0x26
- field public static final int FUEL_RAIL_PRESSURE = 37; // 0x25
- field public static final int FUEL_TANK_LEVEL_INPUT = 42; // 0x2a
- field public static final int HYBRID_BATTERY_PACK_REMAINING_LIFE = 68; // 0x44
- field public static final int INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 7; // 0x7
- field public static final int LAST_SYSTEM = 70; // 0x46
- field public static final int LONG_TERM_FUEL_TRIM_BANK1 = 3; // 0x3
- field public static final int LONG_TERM_FUEL_TRIM_BANK2 = 5; // 0x5
- field public static final int LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 63; // 0x3f
- field public static final int LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 64; // 0x40
- field public static final int LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 65; // 0x41
- field public static final int LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 66; // 0x42
- field public static final int MAF_AIR_FLOW_RATE = 11; // 0xb
- field public static final int OXYGEN_SENSOR1_FUEL_AIR_EQUIVALENCE_RATIO = 15; // 0xf
- field public static final int OXYGEN_SENSOR1_SHORT_TERM_FUEL_TRIM = 14; // 0xe
- field public static final int OXYGEN_SENSOR1_VOLTAGE = 13; // 0xd
- field public static final int OXYGEN_SENSOR2_FUEL_AIR_EQUIVALENCE_RATIO = 18; // 0x12
- field public static final int OXYGEN_SENSOR2_SHORT_TERM_FUEL_TRIM = 17; // 0x11
- field public static final int OXYGEN_SENSOR2_VOLTAGE = 16; // 0x10
- field public static final int OXYGEN_SENSOR3_FUEL_AIR_EQUIVALENCE_RATIO = 21; // 0x15
- field public static final int OXYGEN_SENSOR3_SHORT_TERM_FUEL_TRIM = 20; // 0x14
- field public static final int OXYGEN_SENSOR3_VOLTAGE = 19; // 0x13
- field public static final int OXYGEN_SENSOR4_FUEL_AIR_EQUIVALENCE_RATIO = 24; // 0x18
- field public static final int OXYGEN_SENSOR4_SHORT_TERM_FUEL_TRIM = 23; // 0x17
- field public static final int OXYGEN_SENSOR4_VOLTAGE = 22; // 0x16
- field public static final int OXYGEN_SENSOR5_FUEL_AIR_EQUIVALENCE_RATIO = 27; // 0x1b
- field public static final int OXYGEN_SENSOR5_SHORT_TERM_FUEL_TRIM = 26; // 0x1a
- field public static final int OXYGEN_SENSOR5_VOLTAGE = 25; // 0x19
- field public static final int OXYGEN_SENSOR6_FUEL_AIR_EQUIVALENCE_RATIO = 30; // 0x1e
- field public static final int OXYGEN_SENSOR6_SHORT_TERM_FUEL_TRIM = 29; // 0x1d
- field public static final int OXYGEN_SENSOR6_VOLTAGE = 28; // 0x1c
- field public static final int OXYGEN_SENSOR7_FUEL_AIR_EQUIVALENCE_RATIO = 33; // 0x21
- field public static final int OXYGEN_SENSOR7_SHORT_TERM_FUEL_TRIM = 32; // 0x20
- field public static final int OXYGEN_SENSOR7_VOLTAGE = 31; // 0x1f
- field public static final int OXYGEN_SENSOR8_FUEL_AIR_EQUIVALENCE_RATIO = 36; // 0x24
- field public static final int OXYGEN_SENSOR8_SHORT_TERM_FUEL_TRIM = 35; // 0x23
- field public static final int OXYGEN_SENSOR8_VOLTAGE = 34; // 0x22
- field public static final int RELATIVE_ACCELERATOR_PEDAL_POSITION = 67; // 0x43
- field public static final int RELATIVE_THROTTLE_POSITION = 50; // 0x32
- field public static final int SHORT_TERM_FUEL_TRIM_BANK1 = 2; // 0x2
- field public static final int SHORT_TERM_FUEL_TRIM_BANK2 = 4; // 0x4
- field public static final int SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 59; // 0x3b
- field public static final int SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 60; // 0x3c
- field public static final int SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 61; // 0x3d
- field public static final int SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 62; // 0x3e
- field public static final int THROTTLE_POSITION = 12; // 0xc
- field public static final int TIMING_ADVANCE = 10; // 0xa
- field public static final int VEHICLE_SPEED = 9; // 0x9
- field public static final int VENDOR_START = 71; // 0x47
- }
-
- public final class IntegerSensorIndex {
- field public static final int ABSOLUTE_BAROMETRIC_PRESSURE = 11; // 0xb
- field public static final int AMBIENT_AIR_TEMPERATURE = 13; // 0xd
- field public static final int COMMANDED_SECONDARY_AIR_STATUS = 5; // 0x5
- field public static final int CONTROL_MODULE_VOLTAGE = 12; // 0xc
- field public static final int DISTANCE_TRAVELED_SINCE_CODES_CLEARED = 10; // 0xa
- field public static final int DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON = 8; // 0x8
- field public static final int DRIVER_DEMAND_PERCENT_TORQUE = 24; // 0x18
- field public static final int ENGINE_ACTUAL_PERCENT_TORQUE = 25; // 0x19
- field public static final int ENGINE_OIL_TEMPERATURE = 23; // 0x17
- field public static final int ENGINE_PERCENT_TORQUE_DATA_IDLE = 27; // 0x1b
- field public static final int ENGINE_PERCENT_TORQUE_DATA_POINT1 = 28; // 0x1c
- field public static final int ENGINE_PERCENT_TORQUE_DATA_POINT2 = 29; // 0x1d
- field public static final int ENGINE_PERCENT_TORQUE_DATA_POINT3 = 30; // 0x1e
- field public static final int ENGINE_PERCENT_TORQUE_DATA_POINT4 = 31; // 0x1f
- field public static final int ENGINE_REFERENCE_PERCENT_TORQUE = 26; // 0x1a
- field public static final int FUEL_RAIL_ABSOLUTE_PRESSURE = 22; // 0x16
- field public static final int FUEL_SYSTEM_STATUS = 0; // 0x0
- field public static final int FUEL_TYPE = 21; // 0x15
- field public static final int IGNITION_MONITORS_SUPPORTED = 2; // 0x2
- field public static final int IGNITION_SPECIFIC_MONITORS = 3; // 0x3
- field public static final int INTAKE_AIR_TEMPERATURE = 4; // 0x4
- field public static final int LAST_SYSTEM = 31; // 0x1f
- field public static final int MALFUNCTION_INDICATOR_LIGHT_ON = 1; // 0x1
- field public static final int MAX_AIR_FLOW_RATE_FROM_MASS_AIR_FLOW_SENSOR = 20; // 0x14
- field public static final int MAX_FUEL_AIR_EQUIVALENCE_RATIO = 16; // 0x10
- field public static final int MAX_INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 19; // 0x13
- field public static final int MAX_OXYGEN_SENSOR_CURRENT = 18; // 0x12
- field public static final int MAX_OXYGEN_SENSOR_VOLTAGE = 17; // 0x11
- field public static final int NUM_OXYGEN_SENSORS_PRESENT = 6; // 0x6
- field public static final int RUNTIME_SINCE_ENGINE_START = 7; // 0x7
- field public static final int TIME_SINCE_TROUBLE_CODES_CLEARED = 15; // 0xf
- field public static final int TIME_WITH_MALFUNCTION_LIGHT_ON = 14; // 0xe
- field public static final int VENDOR_START = 32; // 0x20
- field public static final int WARMUPS_SINCE_CODES_CLEARED = 9; // 0x9
- }
-
}
package android.car.hardware.cabin {
diff --git a/car-lib/src/android/car/Car.java b/car-lib/src/android/car/Car.java
index 706f7aa..10d5d03 100644
--- a/car-lib/src/android/car/Car.java
+++ b/car-lib/src/android/car/Car.java
@@ -22,7 +22,7 @@
import android.car.annotation.FutureFeature;
import android.car.cluster.CarInstrumentClusterManager;
import android.car.content.pm.CarPackageManager;
-import android.car.hardware.CarDiagnosticManager;
+import android.car.diagnostic.CarDiagnosticManager;
import android.car.hardware.CarSensorManager;
import android.car.hardware.CarVendorExtensionManager;
import android.car.hardware.cabin.CarCabinManager;
diff --git a/car-lib/src/android/car/hardware/CarDiagnosticEvent.aidl b/car-lib/src/android/car/diagnostic/CarDiagnosticEvent.aidl
similarity index 95%
rename from car-lib/src/android/car/hardware/CarDiagnosticEvent.aidl
rename to car-lib/src/android/car/diagnostic/CarDiagnosticEvent.aidl
index 73b184e..cd9b9a7 100644
--- a/car-lib/src/android/car/hardware/CarDiagnosticEvent.aidl
+++ b/car-lib/src/android/car/diagnostic/CarDiagnosticEvent.aidl
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-package android.car.hardware;
+package android.car.diagnostic;
parcelable CarDiagnosticEvent;
diff --git a/car-lib/src/android/car/hardware/CarDiagnosticEvent.java b/car-lib/src/android/car/diagnostic/CarDiagnosticEvent.java
similarity index 86%
rename from car-lib/src/android/car/hardware/CarDiagnosticEvent.java
rename to car-lib/src/android/car/diagnostic/CarDiagnosticEvent.java
index a065b3b..e8ec2b5 100644
--- a/car-lib/src/android/car/hardware/CarDiagnosticEvent.java
+++ b/car-lib/src/android/car/diagnostic/CarDiagnosticEvent.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.car.hardware;
+package android.car.diagnostic;
import android.annotation.IntDef;
import android.annotation.Nullable;
@@ -253,13 +253,13 @@
SparseArray<Float> newFloatValues = floatValues.clone();
for (int i = 0; i < intValues.size(); ++i) {
int key = intValues.keyAt(i);
- if (key >= IntegerSensorIndex.LAST_SYSTEM) {
+ if (key >= android.car.diagnostic.IntegerSensorIndex.LAST_SYSTEM) {
newIntValues.delete(key);
}
}
for (int i = 0; i < floatValues.size(); ++i) {
int key = floatValues.keyAt(i);
- if (key >= FloatSensorIndex.LAST_SYSTEM) {
+ if (key >= android.car.diagnostic.FloatSensorIndex.LAST_SYSTEM) {
newFloatValues.delete(key);
}
}
@@ -398,7 +398,7 @@
* Returns defaultValue otherwise.
*/
public int getSystemIntegerSensor(
- @IntegerSensorIndex.SensorIndex int sensor, int defaultValue) {
+ @android.car.diagnostic.IntegerSensorIndex.SensorIndex int sensor, int defaultValue) {
return intValues.get(sensor, defaultValue);
}
@@ -407,7 +407,7 @@
* Returns defaultValue otherwise.
*/
public float getSystemFloatSensor(
- @FloatSensorIndex.SensorIndex int sensor, float defaultValue) {
+ @android.car.diagnostic.FloatSensorIndex.SensorIndex int sensor, float defaultValue) {
return floatValues.get(sensor, defaultValue);
}
@@ -432,7 +432,7 @@
* Returns null otherwise.
*/
public @Nullable Integer getSystemIntegerSensor(
- @IntegerSensorIndex.SensorIndex int sensor) {
+ @android.car.diagnostic.IntegerSensorIndex.SensorIndex int sensor) {
int index = intValues.indexOfKey(sensor);
if (index < 0) return null;
return intValues.valueAt(index);
@@ -443,7 +443,7 @@
* Returns null otherwise.
*/
public @Nullable Float getSystemFloatSensor(
- @FloatSensorIndex.SensorIndex int sensor) {
+ @android.car.diagnostic.FloatSensorIndex.SensorIndex int sensor) {
int index = floatValues.indexOfKey(sensor);
if (index < 0) return null;
return floatValues.valueAt(index);
@@ -471,7 +471,7 @@
/**
* Represents possible states of the fuel system; see {@link
- * IntegerSensorIndex#FUEL_SYSTEM_STATUS}
+ * android.car.diagnostic.IntegerSensorIndex#FUEL_SYSTEM_STATUS}
*/
public static final class FuelSystemStatus {
private FuelSystemStatus() {}
@@ -496,7 +496,7 @@
/**
* Represents possible states of the secondary air system; see {@link
- * IntegerSensorIndex#COMMANDED_SECONDARY_AIR_STATUS}
+ * android.car.diagnostic.IntegerSensorIndex#COMMANDED_SECONDARY_AIR_STATUS}
*/
public static final class SecondaryAirStatus {
private SecondaryAirStatus() {}
@@ -519,7 +519,7 @@
/**
* Represents possible types of fuel; see {@link
- * IntegerSensorIndex#FUEL_TYPE}
+ * android.car.diagnostic.IntegerSensorIndex#FUEL_TYPE}
*/
public static final class FuelType {
private FuelType() {}
@@ -581,13 +581,7 @@
}
/**
-<<<<<<< HEAD
* Represents the state of an ignition monitor on a vehicle.
-=======
- * Represents possible states of the ignition monitors on the vehicle; see {@link
- * IntegerSensorIndex#IGNITION_MONITORS_SUPPORTED} see {@link
- * IntegerSensorIndex#IGNITION_SPECIFIC_MONITORS}
->>>>>>> 49cfe37f... Remove the CarDiagnosticSensorIndices class as it merely acted as a hollow namespace
*/
public static final class IgnitionMonitor {
public final boolean available;
@@ -625,14 +619,20 @@
public final IgnitionMonitor fuelSystem;
public final IgnitionMonitor misfire;
- static final int COMPONENTS_AVAILABLE = 0x1 << 0;
- static final int COMPONENTS_INCOMPLETE = 0x1 << 1;
+ /** @hide */
+ public static final int COMPONENTS_AVAILABLE = 0x1 << 0;
+ /** @hide */
+ public static final int COMPONENTS_INCOMPLETE = 0x1 << 1;
- static final int FUEL_SYSTEM_AVAILABLE = 0x1 << 2;
- static final int FUEL_SYSTEM_INCOMPLETE = 0x1 << 3;
+ /** @hide */
+ public static final int FUEL_SYSTEM_AVAILABLE = 0x1 << 2;
+ /** @hide */
+ public static final int FUEL_SYSTEM_INCOMPLETE = 0x1 << 3;
- static final int MISFIRE_AVAILABLE = 0x1 << 4;
- static final int MISFIRE_INCOMPLETE = 0x1 << 5;
+ /** @hide */
+ public static final int MISFIRE_AVAILABLE = 0x1 << 4;
+ /** @hide */
+ public static final int MISFIRE_INCOMPLETE = 0x1 << 5;
static final IgnitionMonitor.Decoder COMPONENTS_DECODER =
new IgnitionMonitor.Decoder(COMPONENTS_AVAILABLE, COMPONENTS_INCOMPLETE);
@@ -684,29 +684,45 @@
public final IgnitionMonitor heatedCatalyst;
public final IgnitionMonitor catalyst;
- static final int EGR_AVAILABLE = 0x1 << 6;
- static final int EGR_INCOMPLETE = 0x1 << 7;
+ /** @hide */
+ public static final int EGR_AVAILABLE = 0x1 << 6;
+ /** @hide */
+ public static final int EGR_INCOMPLETE = 0x1 << 7;
- static final int OXYGEN_SENSOR_HEATER_AVAILABLE = 0x1 << 8;
- static final int OXYGEN_SENSOR_HEATER_INCOMPLETE = 0x1 << 9;
+ /** @hide */
+ public static final int OXYGEN_SENSOR_HEATER_AVAILABLE = 0x1 << 8;
+ /** @hide */
+ public static final int OXYGEN_SENSOR_HEATER_INCOMPLETE = 0x1 << 9;
- static final int OXYGEN_SENSOR_AVAILABLE = 0x1 << 10;
- static final int OXYGEN_SENSOR_INCOMPLETE = 0x1 << 11;
+ /** @hide */
+ public static final int OXYGEN_SENSOR_AVAILABLE = 0x1 << 10;
+ /** @hide */
+ public static final int OXYGEN_SENSOR_INCOMPLETE = 0x1 << 11;
- static final int AC_REFRIGERANT_AVAILABLE = 0x1 << 12;
- static final int AC_REFRIGERANT_INCOMPLETE = 0x1 << 13;
+ /** @hide */
+ public static final int AC_REFRIGERANT_AVAILABLE = 0x1 << 12;
+ /** @hide */
+ public static final int AC_REFRIGERANT_INCOMPLETE = 0x1 << 13;
- static final int SECONDARY_AIR_SYSTEM_AVAILABLE = 0x1 << 14;
- static final int SECONDARY_AIR_SYSTEM_INCOMPLETE = 0x1 << 15;
+ /** @hide */
+ public static final int SECONDARY_AIR_SYSTEM_AVAILABLE = 0x1 << 14;
+ /** @hide */
+ public static final int SECONDARY_AIR_SYSTEM_INCOMPLETE = 0x1 << 15;
- static final int EVAPORATIVE_SYSTEM_AVAILABLE = 0x1 << 16;
- static final int EVAPORATIVE_SYSTEM_INCOMPLETE = 0x1 << 17;
+ /** @hide */
+ public static final int EVAPORATIVE_SYSTEM_AVAILABLE = 0x1 << 16;
+ /** @hide */
+ public static final int EVAPORATIVE_SYSTEM_INCOMPLETE = 0x1 << 17;
- static final int HEATED_CATALYST_AVAILABLE = 0x1 << 18;
- static final int HEATED_CATALYST_INCOMPLETE = 0x1 << 19;
+ /** @hide */
+ public static final int HEATED_CATALYST_AVAILABLE = 0x1 << 18;
+ /** @hide */
+ public static final int HEATED_CATALYST_INCOMPLETE = 0x1 << 19;
- static final int CATALYST_AVAILABLE = 0x1 << 20;
- static final int CATALYST_INCOMPLETE = 0x1 << 21;
+ /** @hide */
+ public static final int CATALYST_AVAILABLE = 0x1 << 20;
+ /** @hide */
+ public static final int CATALYST_INCOMPLETE = 0x1 << 21;
static final IgnitionMonitor.Decoder EGR_DECODER =
new IgnitionMonitor.Decoder(EGR_AVAILABLE, EGR_INCOMPLETE);
@@ -761,23 +777,35 @@
public final IgnitionMonitor NOxSCR;
public final IgnitionMonitor NMHCCatalyst;
- static final int EGR_OR_VVT_AVAILABLE = 0x1 << 6;
- static final int EGR_OR_VVT_INCOMPLETE = 0x1 << 7;
+ /** @hide */
+ public static final int EGR_OR_VVT_AVAILABLE = 0x1 << 6;
+ /** @hide */
+ public static final int EGR_OR_VVT_INCOMPLETE = 0x1 << 7;
- static final int PM_FILTER_AVAILABLE = 0x1 << 8;
- static final int PM_FILTER_INCOMPLETE = 0x1 << 9;
+ /** @hide */
+ public static final int PM_FILTER_AVAILABLE = 0x1 << 8;
+ /** @hide */
+ public static final int PM_FILTER_INCOMPLETE = 0x1 << 9;
- static final int EXHAUST_GAS_SENSOR_AVAILABLE = 0x1 << 10;
- static final int EXHAUST_GAS_SENSOR_INCOMPLETE = 0x1 << 11;
+ /** @hide */
+ public static final int EXHAUST_GAS_SENSOR_AVAILABLE = 0x1 << 10;
+ /** @hide */
+ public static final int EXHAUST_GAS_SENSOR_INCOMPLETE = 0x1 << 11;
- static final int BOOST_PRESSURE_AVAILABLE = 0x1 << 12;
- static final int BOOST_PRESSURE_INCOMPLETE = 0x1 << 13;
+ /** @hide */
+ public static final int BOOST_PRESSURE_AVAILABLE = 0x1 << 12;
+ /** @hide */
+ public static final int BOOST_PRESSURE_INCOMPLETE = 0x1 << 13;
- static final int NOx_SCR_AVAILABLE = 0x1 << 14;
- static final int NOx_SCR_INCOMPLETE = 0x1 << 15;
+ /** @hide */
+ public static final int NOx_SCR_AVAILABLE = 0x1 << 14;
+ /** @hide */
+ public static final int NOx_SCR_INCOMPLETE = 0x1 << 15;
- static final int NMHC_CATALYST_AVAILABLE = 0x1 << 16;
- static final int NMHC_CATALYST_INCOMPLETE = 0x1 << 17;
+ /** @hide */
+ public static final int NMHC_CATALYST_AVAILABLE = 0x1 << 16;
+ /** @hide */
+ public static final int NMHC_CATALYST_INCOMPLETE = 0x1 << 17;
static final IgnitionMonitor.Decoder EGR_OR_VVT_DECODER =
new IgnitionMonitor.Decoder(EGR_OR_VVT_AVAILABLE, EGR_OR_VVT_INCOMPLETE);
@@ -815,7 +843,7 @@
* Returns null otherwise.
*/
public @Nullable @FuelSystemStatus.Status Integer getFuelSystemStatus() {
- return getSystemIntegerSensor(IntegerSensorIndex.FUEL_SYSTEM_STATUS);
+ return getSystemIntegerSensor(android.car.diagnostic.IntegerSensorIndex.FUEL_SYSTEM_STATUS);
}
/**
@@ -823,7 +851,7 @@
* Returns null otherwise.
*/
public @Nullable @SecondaryAirStatus.Status Integer getSecondaryAirStatus() {
- return getSystemIntegerSensor(IntegerSensorIndex.COMMANDED_SECONDARY_AIR_STATUS);
+ return getSystemIntegerSensor(android.car.diagnostic.IntegerSensorIndex.COMMANDED_SECONDARY_AIR_STATUS);
}
/**
@@ -832,9 +860,9 @@
*/
public @Nullable CommonIgnitionMonitors getIgnitionMonitors() {
Integer ignitionMonitorsType =
- getSystemIntegerSensor(IntegerSensorIndex.IGNITION_MONITORS_SUPPORTED);
+ getSystemIntegerSensor(android.car.diagnostic.IntegerSensorIndex.IGNITION_MONITORS_SUPPORTED);
Integer ignitionMonitorsBitmask =
- getSystemIntegerSensor(IntegerSensorIndex.IGNITION_SPECIFIC_MONITORS);
+ getSystemIntegerSensor(android.car.diagnostic.IntegerSensorIndex.IGNITION_SPECIFIC_MONITORS);
if (null == ignitionMonitorsType) return null;
if (null == ignitionMonitorsBitmask) return null;
switch (ignitionMonitorsType) {
@@ -852,6 +880,6 @@
* Returns null otherwise.
*/
public @Nullable @FuelType.Type Integer getFuelType() {
- return getSystemIntegerSensor(IntegerSensorIndex.FUEL_TYPE);
+ return getSystemIntegerSensor(android.car.diagnostic.IntegerSensorIndex.FUEL_TYPE);
}
}
diff --git a/car-lib/src/android/car/hardware/CarDiagnosticManager.java b/car-lib/src/android/car/diagnostic/CarDiagnosticManager.java
similarity index 97%
rename from car-lib/src/android/car/hardware/CarDiagnosticManager.java
rename to car-lib/src/android/car/diagnostic/CarDiagnosticManager.java
index 8949a7b..84cdd3e 100644
--- a/car-lib/src/android/car/hardware/CarDiagnosticManager.java
+++ b/car-lib/src/android/car/diagnostic/CarDiagnosticManager.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.car.hardware;
+package android.car.diagnostic;
import android.annotation.IntDef;
import android.annotation.Nullable;
@@ -24,6 +24,7 @@
import android.car.CarLibLog;
import android.car.CarManagerBase;
import android.car.CarNotConnectedException;
+import android.car.diagnostic.ICarDiagnosticEventListener.Stub;
import android.content.Context;
import android.os.Handler;
import android.os.IBinder;
@@ -221,7 +222,8 @@
* null if no live frame has been recorded by the vehicle.
* @throws CarNotConnectedException
*/
- public @Nullable CarDiagnosticEvent getLatestLiveFrame() throws CarNotConnectedException {
+ public @Nullable
+ CarDiagnosticEvent getLatestLiveFrame() throws CarNotConnectedException {
try {
return mService.getLatestLiveFrame();
} catch (IllegalStateException e) {
@@ -263,7 +265,8 @@
* even if it was initially obtained via a call to getFreezeFrameTimestamps().
* @throws CarNotConnectedException
*/
- public @Nullable CarDiagnosticEvent getFreezeFrame(long timestamp)
+ public @Nullable
+ CarDiagnosticEvent getFreezeFrame(long timestamp)
throws CarNotConnectedException {
try {
return mService.getFreezeFrame(timestamp);
@@ -363,7 +366,7 @@
}
private static class CarDiagnosticEventListenerToService
- extends ICarDiagnosticEventListener.Stub {
+ extends Stub {
private final WeakReference<CarDiagnosticManager> mManager;
public CarDiagnosticEventListenerToService(CarDiagnosticManager manager) {
diff --git a/car-lib/src/android/car/hardware/FloatSensorIndex.java b/car-lib/src/android/car/diagnostic/FloatSensorIndex.java
similarity index 99%
rename from car-lib/src/android/car/hardware/FloatSensorIndex.java
rename to car-lib/src/android/car/diagnostic/FloatSensorIndex.java
index 18d54d7..6ec7e8c 100644
--- a/car-lib/src/android/car/hardware/FloatSensorIndex.java
+++ b/car-lib/src/android/car/diagnostic/FloatSensorIndex.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.car.hardware;
+package android.car.diagnostic;
import android.annotation.IntDef;
import android.annotation.SystemApi;
diff --git a/car-lib/src/android/car/hardware/ICarDiagnostic.aidl b/car-lib/src/android/car/diagnostic/ICarDiagnostic.aidl
similarity index 93%
rename from car-lib/src/android/car/hardware/ICarDiagnostic.aidl
rename to car-lib/src/android/car/diagnostic/ICarDiagnostic.aidl
index ccddab3..3d1808f 100644
--- a/car-lib/src/android/car/hardware/ICarDiagnostic.aidl
+++ b/car-lib/src/android/car/diagnostic/ICarDiagnostic.aidl
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-package android.car.hardware;
+package android.car.diagnostic;
-import android.car.hardware.CarDiagnosticEvent;
-import android.car.hardware.ICarDiagnosticEventListener;
+import android.car.diagnostic.CarDiagnosticEvent;
+import android.car.diagnostic.ICarDiagnosticEventListener;
/** @hide */
interface ICarDiagnostic {
diff --git a/car-lib/src/android/car/hardware/ICarDiagnosticEventListener.aidl b/car-lib/src/android/car/diagnostic/ICarDiagnosticEventListener.aidl
similarity index 89%
rename from car-lib/src/android/car/hardware/ICarDiagnosticEventListener.aidl
rename to car-lib/src/android/car/diagnostic/ICarDiagnosticEventListener.aidl
index 3c9a189..89070aa 100644
--- a/car-lib/src/android/car/hardware/ICarDiagnosticEventListener.aidl
+++ b/car-lib/src/android/car/diagnostic/ICarDiagnosticEventListener.aidl
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-package android.car.hardware;
+package android.car.diagnostic;
-import android.car.hardware.CarDiagnosticEvent;
+import android.car.diagnostic.CarDiagnosticEvent;
/**
* @hide
diff --git a/car-lib/src/android/car/hardware/IntegerSensorIndex.java b/car-lib/src/android/car/diagnostic/IntegerSensorIndex.java
similarity index 99%
rename from car-lib/src/android/car/hardware/IntegerSensorIndex.java
rename to car-lib/src/android/car/diagnostic/IntegerSensorIndex.java
index 70ed849..15291f7 100644
--- a/car-lib/src/android/car/hardware/IntegerSensorIndex.java
+++ b/car-lib/src/android/car/diagnostic/IntegerSensorIndex.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.car.hardware;
+package android.car.diagnostic;
import android.annotation.IntDef;
import android.annotation.SystemApi;
diff --git a/service/src/com/android/car/CarDiagnosticService.java b/service/src/com/android/car/CarDiagnosticService.java
index a4afc35..809439c 100644
--- a/service/src/com/android/car/CarDiagnosticService.java
+++ b/service/src/com/android/car/CarDiagnosticService.java
@@ -19,11 +19,10 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.car.Car;
-import android.car.annotation.FutureFeature;
-import android.car.hardware.CarDiagnosticEvent;
-import android.car.hardware.CarDiagnosticManager;
-import android.car.hardware.ICarDiagnostic;
-import android.car.hardware.ICarDiagnosticEventListener;
+import android.car.diagnostic.CarDiagnosticEvent;
+import android.car.diagnostic.CarDiagnosticManager;
+import android.car.diagnostic.ICarDiagnostic;
+import android.car.diagnostic.ICarDiagnosticEventListener;
import android.content.Context;
import android.os.IBinder;
import android.os.RemoteException;
@@ -35,7 +34,6 @@
import com.android.car.hal.DiagnosticHalService;
import com.android.internal.annotations.GuardedBy;
import java.io.PrintWriter;
-import java.util.ArrayList;
import java.util.Arrays;
import java.util.ConcurrentModificationException;
import java.util.HashMap;
diff --git a/service/src/com/android/car/hal/DiagnosticHalService.java b/service/src/com/android/car/hal/DiagnosticHalService.java
index 36cebf1..9096135 100644
--- a/service/src/com/android/car/hal/DiagnosticHalService.java
+++ b/service/src/com/android/car/hal/DiagnosticHalService.java
@@ -17,9 +17,8 @@
package com.android.car.hal;
import android.annotation.Nullable;
-import android.car.annotation.FutureFeature;
-import android.car.hardware.CarDiagnosticEvent;
-import android.car.hardware.CarDiagnosticManager;
+import android.car.diagnostic.CarDiagnosticEvent;
+import android.car.diagnostic.CarDiagnosticManager;
import android.car.hardware.CarSensorManager;
import android.hardware.automotive.vehicle.V2_0.VehiclePropConfig;
import android.hardware.automotive.vehicle.V2_0.VehiclePropValue;
@@ -33,10 +32,7 @@
import com.android.car.CarServiceUtils;
import com.android.car.vehiclehal.VehiclePropValueBuilder;
import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Arrays;
import java.util.BitSet;
-import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArraySet;
diff --git a/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/DiagnosticJsonConverter.java b/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/DiagnosticJsonConverter.java
index 0d630cd..85d4fc8 100644
--- a/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/DiagnosticJsonConverter.java
+++ b/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/DiagnosticJsonConverter.java
@@ -15,7 +15,7 @@
*/
package com.google.android.car.diagnosticverifier;
-import android.car.hardware.CarDiagnosticEvent;
+import android.car.diagnostic.CarDiagnosticEvent;
import android.util.JsonReader;
import com.android.car.vehiclehal.DiagnosticJson;
diff --git a/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/DiagnosticVerifier.java b/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/DiagnosticVerifier.java
index 8f547b1..1b6e447 100644
--- a/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/DiagnosticVerifier.java
+++ b/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/DiagnosticVerifier.java
@@ -15,7 +15,7 @@
*/
package com.google.android.car.diagnosticverifier;
-import android.car.hardware.CarDiagnosticEvent;
+import android.car.diagnostic.CarDiagnosticEvent;
import android.util.JsonWriter;
import android.util.Log;
diff --git a/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/MainActivity.java b/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/MainActivity.java
index 2916e23..75db2ed 100644
--- a/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/MainActivity.java
+++ b/tests/CarDiagnosticVerifier/src/com/google/android/car/diagnosticverifier/MainActivity.java
@@ -18,8 +18,8 @@
import android.app.Activity;
import android.car.Car;
import android.car.CarNotConnectedException;
-import android.car.hardware.CarDiagnosticEvent;
-import android.car.hardware.CarDiagnosticManager;
+import android.car.diagnostic.CarDiagnosticEvent;
+import android.car.diagnostic.CarDiagnosticManager;
import android.car.hardware.CarSensorManager;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
diff --git a/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/diagnostic/DiagnosticTestFragment.java b/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/diagnostic/DiagnosticTestFragment.java
index 71deee8..b024bfd 100644
--- a/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/diagnostic/DiagnosticTestFragment.java
+++ b/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/diagnostic/DiagnosticTestFragment.java
@@ -18,12 +18,11 @@
import android.annotation.Nullable;
import android.car.Car;
-import android.car.hardware.CarDiagnosticEvent;
-import android.car.hardware.CarDiagnosticManager;
-import android.car.hardware.CarDiagnosticManager.OnDiagnosticEventListener;
+import android.car.diagnostic.CarDiagnosticEvent;
+import android.car.diagnostic.CarDiagnosticManager;
+import android.car.diagnostic.CarDiagnosticManager.OnDiagnosticEventListener;
import android.graphics.Color;
import android.os.Bundle;
-import android.os.Handler;
import android.support.car.hardware.CarSensorManager;
import android.support.v4.app.Fragment;
import android.util.Log;
diff --git a/tests/android_car_api_test/src/android/car/apitest/CarDiagnosticManagerTest.java b/tests/android_car_api_test/src/android/car/apitest/CarDiagnosticManagerTest.java
index 21fb5e0..8783341 100644
--- a/tests/android_car_api_test/src/android/car/apitest/CarDiagnosticManagerTest.java
+++ b/tests/android_car_api_test/src/android/car/apitest/CarDiagnosticManagerTest.java
@@ -17,8 +17,8 @@
package android.car.apitest;
import android.car.Car;
-import android.car.hardware.CarDiagnosticEvent;
-import android.car.hardware.CarDiagnosticManager;
+import android.car.diagnostic.CarDiagnosticEvent;
+import android.car.diagnostic.CarDiagnosticManager;
import android.content.ComponentName;
import android.content.ServiceConnection;
import android.os.IBinder;
diff --git a/tests/carservice_test/src/com/android/car/test/CarDiagnosticManagerTest.java b/tests/carservice_test/src/com/android/car/test/CarDiagnosticManagerTest.java
index dfdc9df..7f18204 100644
--- a/tests/carservice_test/src/com/android/car/test/CarDiagnosticManagerTest.java
+++ b/tests/carservice_test/src/com/android/car/test/CarDiagnosticManagerTest.java
@@ -19,16 +19,16 @@
import static java.lang.Integer.toHexString;
import android.car.Car;
-import android.car.hardware.CarDiagnosticEvent;
-import android.car.hardware.CarDiagnosticEvent.FuelSystemStatus;
-import android.car.hardware.CarDiagnosticEvent.FuelType;
-import android.car.hardware.CarDiagnosticEvent.CommonIgnitionMonitors;
-import android.car.hardware.CarDiagnosticEvent.CompressionIgnitionMonitors;
-import android.car.hardware.CarDiagnosticEvent.SparkIgnitionMonitors;
-import android.car.hardware.CarDiagnosticEvent.SecondaryAirStatus;
-import android.car.hardware.CarDiagnosticManager;
-import android.car.hardware.FloatSensorIndex;
-import android.car.hardware.IntegerSensorIndex;
+import android.car.diagnostic.CarDiagnosticEvent;
+import android.car.diagnostic.CarDiagnosticEvent.FuelSystemStatus;
+import android.car.diagnostic.CarDiagnosticEvent.FuelType;
+import android.car.diagnostic.CarDiagnosticEvent.CommonIgnitionMonitors;
+import android.car.diagnostic.CarDiagnosticEvent.CompressionIgnitionMonitors;
+import android.car.diagnostic.CarDiagnosticEvent.SparkIgnitionMonitors;
+import android.car.diagnostic.CarDiagnosticEvent.SecondaryAirStatus;
+import android.car.diagnostic.CarDiagnosticManager;
+import android.car.diagnostic.FloatSensorIndex;
+import android.car.diagnostic.IntegerSensorIndex;
import android.hardware.automotive.vehicle.V2_0.VehiclePropValue;
import android.hardware.automotive.vehicle.V2_1.VehicleProperty;
import android.os.SystemClock;
@@ -36,7 +36,6 @@
import android.util.JsonReader;
import android.util.JsonWriter;
import android.util.Log;
-import com.android.car.internal.FeatureConfiguration;
import com.android.car.vehiclehal.DiagnosticEventBuilder;
import com.android.car.vehiclehal.DiagnosticJson;
import com.android.car.vehiclehal.VehiclePropValueBuilder;
diff --git a/tools/update-obd2-sensors.py b/tools/update-obd2-sensors.py
index 6528b16..e161258 100755
--- a/tools/update-obd2-sensors.py
+++ b/tools/update-obd2-sensors.py
@@ -126,7 +126,7 @@
" * limitations under the License.\n" + \
"*/\n" + \
"\n" + \
-"package android.car.hardware;\n" + \
+"package android.car.diagnostic;\n" + \
"\n" + \
"import android.annotation.IntDef;\n" + \
"import android.annotation.SystemApi;\n" + \
@@ -281,9 +281,9 @@
import os
if len(sys.argv) != 4:
- print('syntax: update-obd2-sensors.py <path/to/types.hal> <path/to/*SensorIndices.java> <path/to/diagnostic_sensors.py>')
+ print('syntax: update-obd2-sensors.py <path/to/types.hal> <path/to/android.car.diagnostic> <path/to/diagnostic_sensors.py>')
print('This script will parse types.hal, and use the resulting', end='')
- print('parse tree to generate CarDiagnosticSensorIndices.java.')
+ print('parse tree to generate Java and Python lists of sensor identifiers.')
sys.exit(1)
load(sys.argv[1])
generateJava(sys.argv[2])