Home
last modified time | relevance | path

Searched refs:Sensor (Results 1 – 25 of 37) sorted by relevance

12

/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
DSystemStateHelperTest.java42 import android.hardware.Sensor;
77 @Mock Sensor mGravitySensor;
78 @Mock Sensor mProxSensor;
92 when(mGravitySensor.getType()).thenReturn(Sensor.TYPE_GRAVITY); in setUp()
93 when(mProxSensor.getType()).thenReturn(Sensor.TYPE_PROXIMITY); in setUp()
95 when(mSensorManager.getDefaultSensor(Sensor.TYPE_GRAVITY)).thenReturn(mGravitySensor); in setUp()
96 when(mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY)).thenReturn(mProxSensor); in setUp()
286 Sensor sensor = invocation.getArgument(1); in testDeviceOnEarCorrectlyDetected()
287 if (sensor.getType() == Sensor.TYPE_GRAVITY) { in testDeviceOnEarCorrectlyDetected()
289 new float[]{1.0f, 9.0f, 1.0f}, Sensor.TYPE_GRAVITY)); in testDeviceOnEarCorrectlyDetected()
[all …]
/packages/apps/Car/Cluster/DirectRenderingCluster/src/android/car/cluster/sensors/
DSensors.java37 private static List<Sensor<?>> sSensors = new ArrayList<>();
38 private Map<Integer, List<Sensor<?>>> mSensorsByPropertyId = new HashMap<>();
49 public static final Sensor<Float> SENSOR_FUEL = registerSensor(
54 public static final Sensor<Float> SENSOR_FUEL_CAPACITY = registerSensor(
59 public static final Sensor<Float> SENSOR_RPM = registerSensor(
64 public static final Sensor<Float> SENSOR_FUEL_RANGE = registerSensor(
69 public static final Sensor<Float> SENSOR_SPEED = registerSensor(
74 public static final Sensor<Gear> SENSOR_GEAR = registerSensor(
92 private static <T> Sensor<T> registerSensor(String propertyName, int propertyId, int areaId, in registerSensor()
94 Sensor<T> sensor = new Sensor<>(propertyName, propertyId, areaId, expectedPropertyType, in registerSensor()
[all …]
DSensor.java33 public class Sensor<T> { class
52 Sensor(String name, int propertyId, int areaId, int expectedPropertyType, in Sensor() method in Sensor
/packages/apps/Car/Cluster/ClusterOsDouble/src/com/android/car/cluster/sensors/
DSensors.java34 private static final List<Sensor<?>> sSensors = new ArrayList<>();
35 private final SparseArray<Sensor<?>> mSensorByPropertyId = new SparseArray<>();
46 public static final Sensor<Float> SENSOR_FUEL = registerSensor(
51 public static final Sensor<Float> SENSOR_FUEL_CAPACITY = registerSensor(
56 public static final Sensor<Float> SENSOR_RPM = registerSensor(
61 public static final Sensor<Float> SENSOR_FUEL_RANGE = registerSensor(
66 public static final Sensor<Float> SENSOR_SPEED = registerSensor(
71 public static final Sensor<Gear> SENSOR_GEAR = registerSensor(
92 private static <T> Sensor<T> registerSensor(String propertyName, int propertyId, int areaId, in registerSensor()
94 Sensor<T> sensor = new Sensor<>(propertyName, propertyId, areaId, expectedPropertyType, in registerSensor()
[all …]
DSensor.java33 public class Sensor<T> { class
52 Sensor(String name, int propertyId, int areaId, int expectedPropertyType, in Sensor() method in Sensor
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/sensor/
DLocationListeners.java20 import android.hardware.Sensor;
51 private final Sensor mSensor;
116 public void onAccuracyChanged(Sensor sensor, int accuracy) { in onAccuracyChanged()
129 mSensors.add(new SensorHelper(mSensorMgr, Sensor.TYPE_ACCELEROMETER, in LocationListeners()
131 mSensors.add(new SensorHelper(mSensorMgr, Sensor.TYPE_GYROSCOPE, in LocationListeners()
133 mSensors.add(new SensorHelper(mSensorMgr, Sensor.TYPE_MAGNETIC_FIELD, in LocationListeners()
135 mSensors.add(new SensorHelper(mSensorMgr, Sensor.TYPE_ACCELEROMETER_UNCALIBRATED, in LocationListeners()
137 mSensors.add(new SensorHelper(mSensorMgr, Sensor.TYPE_GYROSCOPE_UNCALIBRATED, in LocationListeners()
139 mSensors.add(new SensorHelper(mSensorMgr, Sensor.TYPE_ACCELEROMETER_LIMITED_AXES, in LocationListeners()
141 mSensors.add(new SensorHelper(mSensorMgr, Sensor.TYPE_GYROSCOPE_LIMITED_AXES, in LocationListeners()
[all …]
/packages/apps/Camera2/src/com/android/camera/hardware/
DHeadingSensor.java21 import android.hardware.Sensor;
41 private final Sensor mAccelerometerSensor;
43 private final Sensor mMagneticSensor;
60 mAccelerometerSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); in HeadingSensor()
61 mMagneticSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD); in HeadingSensor()
108 if (type == Sensor.TYPE_ACCELEROMETER) { in onSensorChanged()
110 } else if (type == Sensor.TYPE_MAGNETIC_FIELD) { in onSensorChanged()
130 public void onAccuracyChanged(Sensor sensor, int accuracy) { in onAccuracyChanged()
/packages/modules/Uwb/service/java/com/android/server/uwb/correction/pose/
DIntegPoseSource.java25 import android.hardware.Sensor;
66 private final Sensor mRotationSensor;
67 private final Sensor mAccelSensor;
88 mRotationSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR); in IntegPoseSource()
93 mAccelSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_LINEAR_ACCELERATION); in IntegPoseSource()
124 if (event.sensor.getType() == Sensor.TYPE_LINEAR_ACCELERATION) { in onSensorChanged()
155 } else if (event.sensor.getType() == Sensor.TYPE_ROTATION_VECTOR) { in onSensorChanged()
170 public void onAccuracyChanged(Sensor sensor, int accuracy) { in onAccuracyChanged()
DSixDofPoseSource.java21 import android.hardware.Sensor;
49 private final Sensor mSensor;
66 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_POSE_6DOF); in SixDofPoseSource()
96 if (event.sensor.getType() == Sensor.TYPE_POSE_6DOF) { in onSensorChanged()
121 public void onAccuracyChanged(Sensor sensor, int accuracy) { in onAccuracyChanged()
DRotationPoseSource.java21 import android.hardware.Sensor;
47 private final Sensor mSensor;
67 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR); in RotationPoseSource()
95 if (event.sensor.getType() == Sensor.TYPE_ROTATION_VECTOR) { in onSensorChanged()
111 public void onAccuracyChanged(Sensor sensor, int accuracy) { in onAccuracyChanged()
DGyroPoseSource.java19 import android.hardware.Sensor;
52 private final Sensor mSensor;
73 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE); in GyroPoseSource()
108 if (event.sensor.getType() == Sensor.TYPE_GYROSCOPE) { in onSensorChanged()
138 public void onAccuracyChanged(Sensor sensor, int accuracy) { in onAccuracyChanged()
/packages/services/Telecomm/src/com/android/server/telecom/
DSystemStateHelper.java26 import android.hardware.Sensor;
194 Sensor grav = sm.getDefaultSensor(Sensor.TYPE_GRAVITY); in isDeviceAtEar()
195 Sensor proximity = sm.getDefaultSensor(Sensor.TYPE_PROXIMITY); in isDeviceAtEar()
212 if (event.sensor.getType() == Sensor.TYPE_GRAVITY) { in isDeviceAtEar()
223 } else if (event.sensor.getType() == Sensor.TYPE_PROXIMITY) { in isDeviceAtEar()
235 public void onAccuracyChanged(Sensor sensor, int accuracy) { in isDeviceAtEar()
/packages/apps/Car/Cluster/ClusterOsDouble/src/com/android/car/cluster/view/
DClusterViewModel.java42 import com.android.car.cluster.sensors.Sensor;
81 private Map<Sensor<?>, MutableLiveData<?>> mSensorLiveDatas = new ArrayMap<>();
133 Sensor<?> sensorId = Sensors.getInstance()
143 Sensor<?> sensorId = Sensors.getInstance().getSensorForPropertyId(propId);
150 private <T> void setSensorValue(Sensor<T> id, CarPropertyValue<?> value) {
210 public <T> LiveData<T> getSensor(@NonNull Sensor<T> sensor) { in getSensor()
222 public <T> T getSensorValue(@NonNull Sensor<T> sensor) { in getSensorValue()
337 private <T> MutableLiveData<T> getSensorMutableLiveData(Sensor<T> sensor) {
/packages/apps/Car/Cluster/DirectRenderingCluster/src/android/car/cluster/
DClusterViewModel.java27 import android.car.cluster.sensors.Sensor;
77 private Map<Sensor<?>, MutableLiveData<?>> mSensorLiveDatas = new HashMap<>();
135 for (Sensor<?> sensorId : Sensors.getInstance()
146 for (Sensor<?> sensorId : Sensors.getInstance().getSensorsForPropertyId(
155 private <T> void setSensorValue(Sensor<T> id, CarPropertyValue<?> value) {
215 public <T> LiveData<T> getSensor(@NonNull Sensor<T> sensor) { in getSensor()
226 public <T> T getSensorValue(@NonNull Sensor<T> sensor) { in getSensorValue()
347 private <T> MutableLiveData<T> getSensorMutableLiveData(Sensor<T> sensor) {
/packages/apps/Dialer/java/com/android/incallui/answerproximitysensor/
DPseudoProximityWakeLock.java20 import android.hardware.Sensor;
35 private final Sensor proximitySensor;
45 context.getSystemService(SensorManager.class).getDefaultSensor(Sensor.TYPE_PROXIMITY); in PseudoProximityWakeLock()
84 public void onAccuracyChanged(Sensor sensor, int i) {}
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/safetycenter/ui/
DInteractionLogger.kt50 var navigationSensor: Sensor = Sensor.UNKNOWN
104 fun recordForSensor(action: Action, sensor: Sensor) { in recordForSensor()
115 sensor: Sensor = Sensor.UNKNOWN, in writeAtom()
136 (if (sensor != Sensor.UNKNOWN) sensor else navigationSensor).statsLogValue, in writeAtom()
401 enum class Sensor(val statsLogValue: Int) { in fromUserId() class
411 fun fromIntent(intent: Intent): Sensor { in fromUserId()
/packages/apps/Dialer/java/com/android/incallui/answer/impl/classifier/
DFalsingManager.java20 import android.hardware.Sensor;
36 Sensor.TYPE_PROXIMITY,
104 public void onAccuracyChanged(Sensor sensor, int accuracy) {} in onAccuracyChanged()
137 Sensor s = sensorManager.getDefaultSensor(sensorType); in registerSensors()
/packages/apps/Dialer/java/com/android/incallui/
DAccelerometerListener.java20 import android.hardware.Sensor;
46 private Sensor sensor;
86 public void onAccuracyChanged(Sensor sensor, int accuracy) {
93 sensor = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); in AccelerometerListener()
/packages/apps/Settings/tests/robotests/src/com/android/settings/gestures/
DDoubleTwistPreferenceControllerTest.java29 import android.hardware.Sensor;
80 final List<Sensor> sensorList = new ArrayList<>(); in isAvailable_hasSensor_shouldReturnTrue()
81 sensorList.add(mock(Sensor.class)); in isAvailable_hasSensor_shouldReturnTrue()
99 final List<Sensor> sensorList = new ArrayList<>(); in isAvailable_differentSensor_shouldReturnFalse()
100 sensorList.add(mock(Sensor.class)); in isAvailable_differentSensor_shouldReturnFalse()
/packages/apps/Gallery2/src/com/android/gallery3d/app/
DEyePosition.java20 import android.hardware.Sensor;
65 private Sensor mSensor;
184 public void onAccuracyChanged(Sensor sensor, int accuracy) { in onAccuracyChanged()
190 case Sensor.TYPE_GYROSCOPE: { in onSensorChanged()
195 case Sensor.TYPE_ACCELEROMETER: { in onSensorChanged()
/packages/apps/DevCamera/src/com/android/devcamera/
DGyroOperations.java18 import android.hardware.Sensor;
41 public void onAccuracyChanged(Sensor sensor, int accuracy) {
50 …r.registerListener(mSensorEventListener, mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE), S… in startListening()
/packages/apps/Settings/src/com/android/settings/gestures/
DDoubleTwistPreferenceController.java22 import android.hardware.Sensor;
61 for (Sensor s : sensorManager.getSensorList(Sensor.TYPE_ALL)) { in isGestureAvailable()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/privacy/
DPrivacyToggle.java25 import android.hardware.SensorPrivacyManager.Sensors.Sensor;
90 @Sensor
103 String permissionsGroupName, @Sensor int sensor, int[] appOps, in PrivacyToggle()
/packages/modules/AdServices/sdksandbox/tests/manual-test-apps/SdkSandboxCodeProvider/src/com/android/sdksandboxcode_1/
DActivityHandler.java30 import android.hardware.Sensor;
62 private final Sensor mGyroSensor;
73 mGyroSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE); in ActivityHandler()
241 public void onAccuracyChanged(Sensor sensor, int accuracy) {} in onAccuracyChanged()
/packages/apps/Settings/src/com/android/settings/display/
DLiftToWakePreferenceController.java19 import android.hardware.Sensor;
41 return sensors != null && sensors.getDefaultSensor(Sensor.TYPE_WAKE_GESTURE) != null; in isAvailable()

12