Searched refs:sensor (Results 1 - 24 of 24) sorted by relevance

/packages/services/Car/service/src/com/android/car/hal/
H A DSensorBase.java21 * Abstraction for a sensor, whether it be a physical on-board sensor of a vehicle, or a logical
22 * data element which wants to be represented as sensor-like to higher-level entities
29 boolean requestSensorStart(int sensor, int rate); argument
30 void requestSensorStop(int sensor); argument
H A DSensorHalServiceBase.java34 * It is wholly based on subscription and there is no explicit API for polling, but each sensor
36 * It is ok to report sensor data {@link SensorListener#onSensorData(CarSensorEvent)} inside
61 int sensor = getTokenForProperty(halProperty);
62 boolean mapped = sensor != SENSOR_TYPE_INVALID;
66 (mapped ? (" mapped to " + sensor) : " ignored"));
70 mSensorToPropConfig.append(sensor, halProperty);
113 Log.e(TAG, "requesting to start sensor " + sensorType + ", but VHAL config not found");
138 Log.e(TAG, "sensor type not available 0x" + toHexString(sensorType));
153 // sensor provider.
161 * Returns a unique token to be used to map this property to a higher-level sensor
[all...]
H A DSensorHalService.java51 * Listener for monitoring sensor event. Only sensor service will implement this.
135 int sensor = mManagerToHalPropIdMap.getManagerPropId(halProperty.prop);
136 if (sensor != SENSOR_TYPE_INVALID
139 return sensor;
187 throw new RuntimeException("no sensor defined for property 0x" + toHexString(property));
189 // Handle the valid sensor
323 /* Invalid sensor type. */
/packages/apps/Camera2/src/com/android/camera/one/v2/common/
H A DZoomedCropRegion.java39 Rect sensor = mSensorArrayArea;
40 int xCenter = sensor.width() / 2;
41 int yCenter = sensor.height() / 2;
42 int xDelta = (int) (0.5f * sensor.width() / zoom);
43 int yDelta = (int) (0.5f * sensor.height() / zoom);
/packages/apps/Camera2/src/com/android/camera/hardware/
H A DHeadingSensor.java27 * A virtual sensor that reports device heading based on information
28 * provided by accelerometer sensor or magnetic sensor.
38 /** Device sensor manager. */
47 /** Magnetic sensor data. */
53 * Constructs a heading sensor.
79 // Get events from the accelerometer and magnetic sensor.
106 int type = event.sensor.getType();
113 Log.w(TAG, String.format("Unexpected sensor type %s", event.sensor
130 onAccuracyChanged(Sensor sensor, int accuracy) argument
[all...]
/packages/services/Car/tools/
H A Dupdate-obd2-sensors.py35 def addSensor(self, sensor):
36 """Add a new sensor to the list."""
37 if not hasattr(sensor, 'id'):
39 sensor.id = self.id
40 self.sensors.append(sensor)
43 """Complete the list, adding well-known sensor information."""
55 """A formatter object that does processing on sensor data."""
63 def sensor(self, theSensor, theSensors): member in class:SensorPolicy
64 """Produce output for a sensor."""
68 """Prefix string before any sensor dat
105 def sensor(self, theSensor, theSensors): member in class:JavaSensorPolicy
155 def sensor(self, theSensor, theSensors): member in class:PythonSensorPolicy
168 def sensor(self, theSensor, theSensors): member in class:IntDefSensorPolicy
[all...]
/packages/apps/Dialer/java/com/android/incallui/answer/impl/classifier/
H A DProximityClassifier.java25 * A classifier which looks at the proximity sensor during the gesture. It calculates the percentage
26 * the proximity sensor showing the near state during the whole gesture
44 if (event.sensor.getType() == Sensor.TYPE_PROXIMITY) {
45 update(event.values[0] < event.sensor.getMaximumRange(), event.timestamp);
72 * @param near is the sensor showing the near state right now
H A DFalsingManager.java29 * When the phone is locked, listens to touch, sensor and phone events and sends them to
103 public void onAccuracyChanged(Sensor sensor, int accuracy) {} argument
/packages/apps/Dialer/java/com/android/incallui/answerproximitysensor/
H A DPseudoProximityWakeLock.java29 * PseudoScreenState} to fake a black screen when the proximity sensor is near.
75 boolean near = sensorEvent.values[0] < sensorEvent.sensor.getMaximumRange();
84 public void onAccuracyChanged(Sensor sensor, int i) {} argument
/packages/services/Car/car-lib/src/android/car/diagnostic/
H A DCarDiagnosticEvent.java118 * id: the integer identifier of the sensor;
119 * value: the integer value of the sensor;
121 * id: the integer identifier of the sensor;
122 * value: the floating-point value of the sensor;
222 /** Adds an integer-valued sensor to the frame being built */
228 /** Adds a float-valued sensor to the frame being built */
397 * Returns the value of the given integer sensor, if present in this frame.
401 @android.car.diagnostic.IntegerSensorIndex.SensorIndex int sensor, int defaultValue) {
402 return intValues.get(sensor, defaultValue);
406 * Returns the value of the given float sensor, i
400 getSystemIntegerSensor( @ndroid.car.diagnostic.IntegerSensorIndex.SensorIndex int sensor, int defaultValue) argument
409 getSystemFloatSensor( @ndroid.car.diagnostic.FloatSensorIndex.SensorIndex int sensor, float defaultValue) argument
418 getVendorIntegerSensor(int sensor, int defaultValue) argument
426 getVendorFloatSensor(int sensor, float defaultValue) argument
434 getSystemIntegerSensor( @ndroid.car.diagnostic.IntegerSensorIndex.SensorIndex int sensor) argument
445 getSystemFloatSensor( @ndroid.car.diagnostic.FloatSensorIndex.SensorIndex int sensor) argument
456 getVendorIntegerSensor(int sensor) argument
466 getVendorFloatSensor(int sensor) argument
[all...]
/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/
H A DCarSensorManagerTest.java82 for (int sensor: supportedSensors) {
83 if (sensor == CarSensorManager.SENSOR_TYPE_DRIVING_STATUS) {
/packages/services/Car/service/src/com/android/car/
H A DCarSensorService.java64 * Abstraction for logical sensor which is not physical sensor but presented as sensor to
68 * is state change for the given sensor after {@link SensorHalServiceBase#init()}
92 * When set, sensor service sets its own dispatching rate limit.
100 /** lock to access sensor structures */
106 /** key: sensor type. */
109 /** key: sensor type. */
138 // This triggers sensor hal init as well.
181 Log.w(CarLog.TAG_SENSOR, "Default daynight set as sensor no
830 addSensor(int sensor) argument
834 removeSensor(int sensor) argument
[all...]
/packages/services/Car/car-lib/src/android/car/hardware/
H A DCarSensorManager.java48 * API for monitoring car sensor data.
54 * This sensor represents vehicle speed in m/s.
82 * around. For this sensor, rate in {@link #registerListener(OnSensorChangedListener, int, int)}
95 * Day/night sensor. Sensor data is intValues[0].
141 * Set to true when ABS is active. This sensor is event driven.
146 * Set to true when traction control is active. This sensor is event driven.
152 * Sensor type bigger than this is invalid. Always update this after adding a new sensor.
161 * So the sensor supported in this range can vary depending on car models / manufacturers.
163 * different cars. Additionally 3rd party apps trying to access sensor in this range will get
190 /** Read sensor i
395 doUnregisterListenerLocked(OnSensorChangedListener listener, Integer sensor) argument
420 registerOrUpdateSensorListener(int sensor, int rate) argument
[all...]
/packages/apps/Camera2/src/com/android/camera/one/v2/
H A DAutoFocusHelper.java116 /** Compute 3A regions for a sensor-referenced touch coordinate.
124 * @param sensorOrientation sensor orientation as defined by
133 // Compute the output MeteringRectangle in sensor space.
135 // Crop region itself is specified in sensor coordinates.
137 // Normalized coordinates, now rotated into sensor space.
159 * Return AF region(s) for a sensor-referenced touch coordinate.
175 * Return AE region(s) for a sensor-referenced touch coordinate.
191 * [Gcam mode only]: Return AE region(s) for a sensor-referenced touch coordinate.
207 * Calculates sensor crop region for a zoom level (zoom >= 1.0).
212 Rect sensor
[all...]
/packages/services/Car/car-support-lib/src/android/support/car/hardware/
H A DCarSensorManagerEmbedded.java49 for (Integer sensor : mManager.getSupportedSensors()) {
50 sensorsSet.add(sensor);
203 OnSensorChangedListenerProxy(OnSensorChangedListener listener, int sensor, argument
206 this.sensors.add(sensor);
H A DCarSensorsProxy.java126 int type = event.sensor.getType();
146 Log.w(TAG, "Unexpected sensor event type: " + type);
154 public void onAccuracyChanged(Sensor sensor, int accuracy) {}
226 for (int sensor : mSupportedSensors) {
227 if (sensor == sensorType) {
369 Log.w(TAG, "[getSensorEvent]: Unsupported sensor type:" + sensorType);
/packages/apps/DevCamera/src/com/android/devcamera/
H A DGyroOperations.java41 public void onAccuracyChanged(Sensor sensor, int accuracy) {
/packages/apps/Dialer/java/com/android/incallui/
H A DAccelerometerListener.java49 // mPendingOrientation is the latest orientation computed based on the sensor value.
86 public void onAccuracyChanged(Sensor sensor, int accuracy) {
149 // If some values are exactly zero, then likely the sensor is not powered up yet.
H A DInCallActivityCommon.java721 ProximitySensor sensor = InCallPresenter.getInstance().getProximitySensor();
722 if (sensor != null) {
723 sensor.onDialpadVisible(show);
/packages/apps/Gallery2/src/com/android/gallery3d/app/
H A DEyePosition.java91 Log.w(TAG, "no sensor available");
184 public void onAccuracyChanged(Sensor sensor, int accuracy) { argument
189 switch (event.sensor.getType()) {
/packages/services/Car/tests/android_support_car_api_test/src/com/android/support/car/apitest/
H A DCarSensorManagerTest.java85 for (int sensor: supportedSensors) {
86 if (sensor == CarSensorManager.SENSOR_TYPE_DRIVING_STATUS) {
126 builder.append("android.support sensor has name:" + supportCarSensorType.getName() +
127 " while android.car sensor has name:" + androidCarSensorType.getName() +
133 assertTrue("android Car sensor has additional types defined:" + androidCarSensorTypeToField,
160 builder.append("android.support sensor rate has name:" +
162 " while android.car sensor rate has name:" +
168 assertTrue("android Car sensor has additional rates defined:" + androidCarSensorRateToField,
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/sensor/
H A DSensorsTestFragment.java17 package com.google.android.car.kitchensink.sensor;
71 Log.v(TAG, "New car sensor event: " + event);
128 for (Integer sensor : supportedSensors) {
129 if ((sensor == CarSensorManager.SENSOR_TYPE_LOCATION
130 || sensor == CarSensorManager.SENSOR_TYPE_GPS_SATELLITE)
134 mSensorManager.addListener(mOnSensorChangedListener, sensor,
/packages/services/Car/tests/carservice_test/src/com/android/car/test/
H A DCarSensorManagerTest.java81 // Start the HAL layer and set up the sensor manager service
86 * Test single sensor availability entry point
109 * Test sensor enumeration entry point
118 // Unfortunately, we don't have a definitive range for legal sensor values,
120 // will need to be updated if/when new sensor types are allowed.
125 for (int sensor : supportedSensors) {
126 if (candidate == sensor) {
128 Log.i(TAG, "Sensor type " + sensor + " is supported.");
133 // Make sure the individual query on a sensor type is consistent
137 // Here we simply ensure that one specific expected sensor i
[all...]
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/
H A DKitchenSinkActivity.java50 import com.google.android.car.kitchensink.sensor.SensorsTestFragment;

Completed in 440 milliseconds