Home
last modified time | relevance | path

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

1234

/frameworks/native/libs/gui/
DSensor.cpp38 Sensor::Sensor() in Sensor() function in android::Sensor
46 Sensor::Sensor(struct sensor_t const* hwSensor, int halVersion) in Sensor() function in android::Sensor
277 Sensor::~Sensor() in ~Sensor()
281 const String8& Sensor::getName() const { in getName()
285 const String8& Sensor::getVendor() const { in getVendor()
289 int32_t Sensor::getHandle() const { in getHandle()
293 int32_t Sensor::getType() const { in getType()
297 float Sensor::getMinValue() const { in getMinValue()
301 float Sensor::getMaxValue() const { in getMaxValue()
305 float Sensor::getResolution() const { in getResolution()
[all …]
/frameworks/base/native/android/
Dsensor.cpp34 using android::Sensor;
62 Sensor const* const* l; in ASensorManager_getSensorList()
77 Sensor const* const* sensorList; in ASensorManager_getDefaultSensorEx()
115 static_cast<Sensor const*>(sensor)); in ASensorEventQueue_enableSensor()
121 static_cast<Sensor const*>(sensor)); in ASensorEventQueue_disableSensor()
128 static_cast<Sensor const*>(sensor), us2ns(usec)); in ASensorEventQueue_setEventRate()
163 return static_cast<Sensor const*>(sensor)->getName().string(); in ASensor_getName()
168 return static_cast<Sensor const*>(sensor)->getVendor().string(); in ASensor_getVendor()
173 return static_cast<Sensor const*>(sensor)->getType(); in ASensor_getType()
178 return static_cast<Sensor const*>(sensor)->getResolution(); in ASensor_getResolution()
[all …]
/frameworks/base/core/java/android/hardware/
DSystemSensorManager.java46 Sensor sensor, int index); in nativeGetSensorAtIndex()
54 private final ArrayList<Sensor> mFullSensorsList = new ArrayList<>();
55 private final SparseArray<Sensor> mHandleToSensor = new SparseArray<>();
85 Sensor sensor = new Sensor(); in SystemSensorManager()
95 protected List<Sensor> getFullSensorList() { in getFullSensorList()
102 protected boolean registerListenerImpl(SensorEventListener listener, Sensor sensor, in registerListenerImpl()
109 if (sensor.getReportingMode() == Sensor.REPORTING_MODE_ONE_SHOT) { in registerListenerImpl()
144 protected void unregisterListenerImpl(SensorEventListener listener, Sensor sensor) { in unregisterListenerImpl()
146 if (sensor != null && sensor.getReportingMode() == Sensor.REPORTING_MODE_ONE_SHOT) { in unregisterListenerImpl()
169 protected boolean requestTriggerSensorImpl(TriggerEventListener listener, Sensor sensor) { in requestTriggerSensorImpl()
[all …]
DSensorManager.java88 private final SparseArray<List<Sensor>> mSensorListByType =
89 new SparseArray<List<Sensor>>();
377 protected abstract List<Sensor> getFullSensorList(); in getFullSensorList()
409 public List<Sensor> getSensorList(int type) { in getSensorList()
411 List<Sensor> list; in getSensorList()
412 final List<Sensor> fullList = getFullSensorList(); in getSensorList()
416 if (type == Sensor.TYPE_ALL) { in getSensorList()
419 list = new ArrayList<Sensor>(); in getSensorList()
420 for (Sensor i : fullList) { in getSensorList()
447 public Sensor getDefaultSensor(int type) { in getDefaultSensor()
[all …]
DLegacySensorManager.java71 final List<Sensor> fullList = mSensorManager.getFullSensorList(); in getSensors()
72 for (Sensor i : fullList) { in getSensors()
74 case Sensor.TYPE_ACCELEROMETER: in getSensors()
77 case Sensor.TYPE_MAGNETIC_FIELD: in getSensors()
80 case Sensor.TYPE_ORIENTATION: in getSensors()
95 Sensor.TYPE_ACCELEROMETER, listener, sensors, rate) || result; in registerListener()
97 Sensor.TYPE_MAGNETIC_FIELD, listener, sensors, rate) || result; in registerListener()
99 Sensor.TYPE_ORIENTATION, listener, sensors, rate) || result; in registerListener()
101 Sensor.TYPE_ORIENTATION, listener, sensors, rate) || result; in registerListener()
103 Sensor.TYPE_TEMPERATURE, listener, sensors, rate) || result; in registerListener()
[all …]
/frameworks/base/docs/html/sdk/api_diff/20/
DmissingSinces.txt31 NO DOC BLOCK: android.hardware.Sensor Method getStringType()
63 NO DOC BLOCK: android.hardware.Sensor Field STRING_TYPE_ACCELEROMETER
64 NO DOC BLOCK: android.hardware.Sensor Field STRING_TYPE_AMBIENT_TEMPERATURE
65 NO DOC BLOCK: android.hardware.Sensor Field STRING_TYPE_GAME_ROTATION_VECTOR
66 NO DOC BLOCK: android.hardware.Sensor Field STRING_TYPE_GEOMAGNETIC_ROTATION_VECTOR
67 NO DOC BLOCK: android.hardware.Sensor Field STRING_TYPE_GRAVITY
68 NO DOC BLOCK: android.hardware.Sensor Field STRING_TYPE_GYROSCOPE
69 NO DOC BLOCK: android.hardware.Sensor Field STRING_TYPE_GYROSCOPE_UNCALIBRATED
70 NO DOC BLOCK: android.hardware.Sensor Field STRING_TYPE_HEART_RATE
71 NO DOC BLOCK: android.hardware.Sensor Field STRING_TYPE_LIGHT
[all …]
/frameworks/base/core/java/com/android/internal/os/
DSensorPowerCalculator.java18 import android.hardware.Sensor;
26 private final List<Sensor> mSensors;
30 mSensors = sensorManager.getSensorList(Sensor.TYPE_ALL); in SensorPowerCalculator()
38 final SparseArray<? extends BatteryStats.Uid.Sensor> sensorStats = u.getSensorStats(); in calculateApp()
41 final BatteryStats.Uid.Sensor sensor = sensorStats.valueAt(ise); in calculateApp()
46 case BatteryStats.Uid.Sensor.GPS: in calculateApp()
53 final Sensor s = mSensors.get(i); in calculateApp()
/frameworks/native/include/gui/
DSensor.h44 class Sensor : public ASensor, public LightFlattenable<Sensor>
55 Sensor();
56 Sensor(struct sensor_t const* hwSensor, int halVersion = 0);
57 ~Sensor();
DSensorManager.h46 class Sensor; variable
107 ssize_t getSensorList(Sensor const* const** list) const;
108 Sensor const* getDefaultSensor(int type);
124 mutable Sensor const** mSensorList;
125 mutable Vector<Sensor> mSensors;
DSensorEventQueue.h45 class Sensor; variable
70 status_t enableSensor(Sensor const* sensor) const;
71 status_t disableSensor(Sensor const* sensor) const;
72 status_t setEventRate(Sensor const* sensor, nsecs_t ns) const;
/frameworks/base/docs/html/guide/topics/sensors/
Dsensors_position.jd9 <li><a href="#sensors-pos-gamerot">Using the Game Rotation Vector Sensor</a></li>
10 <li><a href="#sensors-pos-geomrot">Using the Geomagnetic Rotation Vector Sensor</a></li>
11 <li><a href="#sensors-pos-orient">Using the Orientation Sensor</a></li>
12 <li><a href="#sensors-pos-mag">Using the Geomagnetic Field Sensor</a></li>
13 <li><a href="#sensors-pos-prox">Using the Proximity Sensor</a></li>
17 <li>{@link android.hardware.Sensor}</li>
74 href="{@docRoot}guide/topics/sensors/sensors_overview.html#sensors-coords">Sensor Coordinate
82 <th scope="col" style="white-space:nowrap">Sensor</th>
83 <th scope="col" style="white-space:nowrap">Sensor event data</th>
88 <td rowspan="3">{@link android.hardware.Sensor#TYPE_GAME_ROTATION_VECTOR}</td>
[all …]
Dsensors_overview.jd17 <li><a href="#sensors-identify">Identifying Sensors and Sensor Capabilities</a></li>
18 <li><a href="#sensors-monitor">Monitoring Sensor Events</a></li>
19 <li><a href="#sensors-configs">Handling Different Sensor Configurations</a></li>
20 <li><a href="#sensors-coords">Sensor Coordinate System</a></li>
25 <li>{@link android.hardware.Sensor}</li>
116 <strong>Table 1.</strong> Sensor types supported by the Android platform.</p>
119 <th scope="col" style="white-space:nowrap">Sensor</th>
125 <td>{@link android.hardware.Sensor#TYPE_ACCELEROMETER}</td>
132 <td>{@link android.hardware.Sensor#TYPE_AMBIENT_TEMPERATURE}</td>
137 <td>{@link android.hardware.Sensor#TYPE_GRAVITY}</td>
[all …]
Dsensors_motion.jd11 <li><a href="#sensors-motion-grav">Using the Gravity Sensor</a></li>
14 <li><a href="#sensors-motion-rotate">Using the Rotation Vector Sensor</a></li>
15 <li><a href="#sensors-motion-significant">Using the Significant Motion Sensor</a></li>
16 <li><a href="#sensors-motion-stepcounter">Using the Step Counter Sensor</a></li>
17 <li><a href="#sensors-motion-stepdetector">Using the Step Detector Sensor</a></li>
21 <li>{@link android.hardware.Sensor}</li>
80 <th scope="col" style="white-space:nowrap">Sensor</th>
81 <th scope="col" style="white-space:nowrap">Sensor event data</th>
86 <td rowspan="3">{@link android.hardware.Sensor#TYPE_ACCELEROMETER}</td>
100 <td rowspan="3">{@link android.hardware.Sensor#TYPE_GRAVITY}</td>
[all …]
Dsensors_environment.jd12 <li><a href="#sensors-using-humid">Using the Humidity Sensor</a></li>
56 <th scope="col" style="white-space:nowrap">Sensor</th>
57 <th scope="col" style="white-space:nowrap">Sensor event data</th>
62 <td>{@link android.hardware.Sensor#TYPE_AMBIENT_TEMPERATURE}</td>
68 <td>{@link android.hardware.Sensor#TYPE_LIGHT}</td>
74 <td>{@link android.hardware.Sensor#TYPE_PRESSURE}</td>
80 <td>{@link android.hardware.Sensor#TYPE_RELATIVE_HUMIDITY}</td>
86 <td>{@link android.hardware.Sensor#TYPE_TEMPERATURE}</td>
110 private Sensor mPressure;
120 mPressure = mSensorManager.getDefaultSensor(Sensor.TYPE_PRESSURE);
[all …]
/frameworks/base/core/java/android/view/
DOrientationEventListener.java20 import android.hardware.Sensor;
38 private Sensor mSensor;
71 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); in OrientationEventListener()
139 mOldListener.onSensorChanged(Sensor.TYPE_ACCELEROMETER, event.values); in onSensorChanged()
147 public void onAccuracyChanged(Sensor sensor, int accuracy) { in onAccuracyChanged()
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/
DMotionSensor.java22 import android.hardware.Sensor;
37 private Sensor mSensor = null;
56 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_LINEAR_ACCELERATION); in onPrepare()
68 public final void onAccuracyChanged(Sensor sensor, int accuracy) { in onAccuracyChanged()
/frameworks/native/services/sensorservice/tests/
Dsensorservicetest.cpp47 if (buffer[i].type == Sensor::TYPE_ACCELEROMETER) { in receiver()
67 Sensor const* const* list; in main()
74 Sensor const* accelerometer = mgr.getDefaultSensor(Sensor::TYPE_ACCELEROMETER); in main()
/frameworks/rs/java/tests/Balls/src/com/example/android/rs/balls/
DBalls.java41 import android.hardware.Sensor;
62 if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) { in onSensorChanged()
70 public void onAccuracyChanged(Sensor sensor, int accuracy) { in onAccuracyChanged()
88 mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), in onResume()
/frameworks/native/services/sensorservice/
DSensorFusion.h42 Sensor mAcc;
43 Sensor mMag;
44 Sensor mGyro;
DSensorService.h129 virtual Vector<Sensor> getSensorList(const String16& opPackageName);
335 Sensor getSensorFromHandle(int handle) const;
339 Sensor registerSensor(SensorInterface* sensor);
340 Sensor registerVirtualSensor(SensorInterface* sensor);
347 static bool canAccessSensor(const Sensor& sensor, const char* operation,
387 Vector<Sensor> mSensorList;
388 Vector<Sensor> mUserSensorListDebug;
389 Vector<Sensor> mUserSensorList;
DRotationVectorSensor.cpp63 Sensor RotationVectorSensor::getSensor() const { in getSensor()
74 Sensor sensor(&hwSensor); in getSensor()
112 Sensor GyroDriftSensor::getSensor() const { in getSensor()
123 Sensor sensor(&hwSensor); in getSensor()
DSensorFusion.cpp31 Sensor uncalibratedGyro; in ANDROID_SINGLETON_STATIC_INSTANCE()
36 mAcc = Sensor(list + i); in ANDROID_SINGLETON_STATIC_INSTANCE()
39 mMag = Sensor(list + i); in ANDROID_SINGLETON_STATIC_INSTANCE()
42 mGyro = Sensor(list + i); in ANDROID_SINGLETON_STATIC_INSTANCE()
45 uncalibratedGyro = Sensor(list + i); in ANDROID_SINGLETON_STATIC_INSTANCE()
DSensorInterface.h55 virtual Sensor getSensor() const = 0;
65 Sensor mSensor;
80 virtual Sensor getSensor() const;
/frameworks/base/tests/RenderScriptTests/ModelViewer/src/com/android/modelviewer/
DSimpleModelView.java24 import android.hardware.Sensor;
41 private Sensor mRotationVectorSensor;
57 Sensor.TYPE_ROTATION_VECTOR); in SimpleModelView()
174 if (event.sensor.getType() == Sensor.TYPE_ROTATION_VECTOR) { in onSensorChanged()
188 public void onAccuracyChanged(Sensor sensor, int accuracy) { in onAccuracyChanged()
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/samples/simplecamera/
DMotionSensorWTime.java22 import android.hardware.Sensor;
39 private Sensor mSensor = null;
62 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_LINEAR_ACCELERATION); in onPrepare()
74 public final void onAccuracyChanged(Sensor sensor, int accuracy) { in onAccuracyChanged()

1234