/external/robolectric/src/test/java/com/xtremelabs/robolectric/shadows/ |
SensorManagerTest.java | 4 import android.hardware.Sensor; 45 Sensor sensor = sensorManager.getDefaultSensor(SensorManager.SENSOR_ACCELEROMETER); local 46 sensorManager.registerListener(listener, sensor, SensorManager.SENSOR_DELAY_NORMAL); 74 public void onAccuracyChanged(Sensor sensor, int accuracy) {
|
/frameworks/base/core/java/android/hardware/ |
SensorEventListener2.java | 26 * sensor events. Flush Complete Events are sent ONLY to the application that has 31 * @param sensor The {@link android.hardware.Sensor Sensor} on which flush was called. 35 public void onFlushCompleted(Sensor sensor);
|
SensorManager.java | 29 * SensorManager lets you access the device's {@link android.hardware.Sensor 42 * Note: Don't use this mechanism with a Trigger Sensor, have a look 43 * at {@link TriggerEventListener}. {@link Sensor#TYPE_SIGNIFICANT_MOTION} 44 * is an example of a trigger sensor. 49 * private final Sensor mAccelerometer; 53 * mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); 66 * public void onAccuracyChanged(Sensor sensor, int accuracy) { 76 * @see Sensor 86 private final SparseArray<List<Sensor>> mSensorListByType [all...] |
SensorEventListener.java | 21 * sensor values have changed. 26 * Called when sensor values have changed. 28 * for details on possible sensor types. 42 * Called when the accuracy of the registered sensor has changed. 47 * @param accuracy The new accuracy of this sensor, one of 50 public void onAccuracyChanged(Sensor sensor, int accuracy);
|
/hardware/ti/omap4-aah/camera/ |
SensorListener.cpp | 20 * This file listens and propogates sensor events to CameraHal. 47 if (sen_events[i].type == android::Sensor::TYPE_ACCELEROMETER) { 80 } else if (sen_events[i].type == android::Sensor::TYPE_GYROSCOPE) { 153 CAMHAL_LOGEA("Couldn't create sensor looper thread"); 158 ret = mSensorLooperThread->run("sensor looper thread", android::PRIORITY_URGENT_DISPLAY); 195 android::Sensor const* sensor; member in class:Ti::Camera::android 203 sensor = mgr.getDefaultSensor(android::Sensor::TYPE_ACCELEROMETER); 204 if(sensor) { 218 android::Sensor const* sensor; member in class:Ti::Camera::android [all...] |
/docs/source.android.com/src/devices/sensors/ |
hal-interface.jd | 27 <p>The HAL interface, declared in <a href="{@docRoot}devices/reference/sensors_8h.html">sensors.h</a>, represents the interface between the Android <a href="sensor-stack.html#framework">framework</a> and the hardware-specific software. A HAL implementation must define each 31 <li><code>activate</code> - Starts or stops a sensor. </li> 32 <li><code>batch</code> - Sets a sensor?s parameters such as sampling frequency and maximum 35 given sensor. </li> 36 <li><code>flush</code> - Flushes the FIFO of the specified sensor and reports a flush complete 38 <li><code>poll</code> - Returns available sensor events. </li> 58 <p>If several sensors share the same sensor type and wake-up property, the first 59 one in the list is called the ?default? sensor. It is the one returned by 62 <h2 id="activate_sensor_true_false">activate(sensor, true/false)</h2> 65 <p>Activates or deactivates a sensor.</p [all...] |
suspend-mode.jd | 46 latest event from each on-change sensor: the last event <a href="batching.html#precautions_to_take_when_batching_non-wake-up_on-change_sensors">must be saved </a>outside of the FIFO so it cannot be lost.</p> 58 reported. That is, the sensor must wake the SoC up and deliver the events 68 <p>Up to KitKat, whether a sensor was a wake-up or a non-wake-up sensor was 69 dictated by the sensor type: most were non-wake-up sensors, with the exception 70 of the <a href="sensor-types.html#proximity">proximity</a> sensor and the <a href="sensor-types.html#significant_motion">significant motion detector</a>.</p> 71 <p>Starting in L, whether a given sensor is a wake-up sensor or not is specifie [all...] |
power-use.jd | 28 <p>Some sensor types are defined as being low power. Low-power sensors must 30 they should not require the SoC to be running. Here are some low-power sensor 40 width="20" height="20" alt="Low power sensor" />) icon in the <a 41 href="sensor-types.html#composite_sensor_type_summary">Composite sensor type 43 <p>These sensor types cannot be implemented at high power as their primary benefit 45 periods, possibly 24/7. It is better to not implement a low-power sensor at all 48 <p>Composite low-power sensor types, such as the step detector, must have their 57 of the SoC being asleep, so that periodic spikes in power from the sensor chips 59 <p>For one-shot wake-up sensors, the power is measured while the sensor doesn? [all...] |
sensor-stack.jd | 1 page.title=Sensor stack 27 <p>The figure below represents the Android sensor stack. Each component 29 sensors can bypass the sensor hub when it is present. Control flows from the 32 <img src="images/sensor_layers.png" alt="Layers and owners of the Android sensor stack" /> 33 <p class="img-caption"><strong>Figure 1.</strong> Layers of the Android sensor stack and their respective owners</p> 37 sensor.</p> 38 <p>When registering to a sensor, the application specifies its preferred sampling 50 framework level, only a single application could access each sensor at any 53 <li> When a first application registers to a sensor, the framework sends a request 54 to the HAL to activate the sensor. </li [all...] |
/cts/tests/tests/hardware/src/android/hardware/cts/helpers/sensorverification/ |
FrequencyVerification.java | 21 import android.hardware.Sensor; 31 * A {@link ISensorVerification} which verifies that the sensor frequency are within the expected 62 * Get the default {@link FrequencyVerification} for a sensor. 65 * @return the verification or null if the verification does not apply to the sensor. 68 Sensor sensor = environment.getSensor(); local 69 if (sensor.getReportingMode() != Sensor.REPORTING_MODE_CONTINUOUS) { 75 sensor.getName(), 76 sensor.getMinDelay() [all...] |
/frameworks/native/libs/gui/ |
Sensor.cpp | 28 #include <gui/Sensor.h> 35 Sensor::Sensor() 43 Sensor::Sensor(struct sensor_t const* hwSensor, int halVersion) 71 ALOGE("Sensor maxDelay overflow error %s %" PRId64, mName.string(), 83 // Set reportingMode for all android defined sensor types, set wake-up flag only for proximity 84 // sensor, significant motion, tilt, pick_up gesture, wake gesture and glance gesture on older 219 // This is an OEM defined sensor on an older HAL. Use minDelay to determine the 220 // reporting mode of the sensor [all...] |
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/ |
MagneticFieldMeasurementTestActivity.java | 22 import android.hardware.Sensor; 37 * These test cases require calibration of the sensor before performing the verifications. 54 * This test verifies that the Norm of the sensor data is close to the expected reference value. 55 * The units of the reference value are dependent on the type of sensor. 56 * This test is used to verify that the data reported by the sensor is close to the expected 59 * The test takes a sample from the sensor under test and calculates the Euclidean Norm of the 63 * The test is susceptible to errors when the Sensor under test is uncalibrated, or the units in 69 * - the sensor type and sensor handle that caused the failure 71 * - the values sampled from the sensor [all...] |
SensorSynchronizationTestActivity.java | 10 import android.hardware.Sensor; 21 * Test cross-sensor timestamp alignment by detecting major change in each 22 * sensor and comparing timestamps of that change. 48 mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), 51 mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD), 54 mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE), 64 Assert.assertTrue("No sensor events collected", numberOfCollectedEvents > 2); 75 if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) { 83 } else if (event.sensor.getType() == Sensor.TYPE_MAGNETIC_FIELD) [all...] |
BatchingTestActivity.java | 22 import android.hardware.Sensor; 35 * If a sensor supports the batching mode, FifoReservedEventCount for that sensor should be greater 56 Sensor.TYPE_STEP_COUNTER, 64 Sensor.TYPE_STEP_COUNTER, 72 Sensor.TYPE_STEP_DETECTOR, 80 Sensor.TYPE_STEP_DETECTOR, 88 Sensor.TYPE_PROXIMITY, 96 Sensor.TYPE_PROXIMITY, 104 Sensor.TYPE_LIGHT [all...] |
/packages/apps/Dialer/src/com/android/dialer/ |
ProximitySensorManager.java | 20 import android.hardware.Sensor; 28 * Manages the proximity sensor and notifies a listener when enabled. 32 * Listener of the state of the proximity sensor. 34 * This interface abstracts two possible states for the proximity sensor, near and far. 36 * The actual meaning of these states depends on the actual sensor. 39 /** Called when the proximity sensor transitions from the far to the near state. */ 41 /** Called when the proximity sensor transitions from the near to the far state. */ 53 * sensor. 58 * The listener to the state of the sensor. 60 * Contains most of the logic concerning tracking of the sensor [all...] |
/frameworks/native/services/sensorservice/ |
SensorService.cpp | 60 * - what about a gyro-corrected magnetic-field sensor? 61 * - run mag sensor from time to time to force calibration 62 * - gravity sensor length is wrong (=> drift in linear-acc sensor) 115 // build the sensor list returned to users 119 Sensor aSensor; 142 // the orientation sensor and remove the HAL provided one. 151 // debugging sensor list 155 // counts for each sensor. 200 Sensor SensorService::registerSensor(SensorInterface* s 218 Sensor sensor = registerSensor(s); local 364 SensorInterface* sensor = mSensorMap.valueFor(handle); local 590 SensorInterface* sensor = mSensorMap.valueFor(handle); local 599 SensorInterface* sensor = mSensorMap.valueFor(handle); local 616 Sensor sensor = initialSensorList[i]; local 648 SensorInterface* sensor = mSensorMap.valueFor( handle ); local 795 SensorInterface* sensor = mSensorMap.valueFor(handle); local 864 SensorInterface* sensor = mSensorMap.valueFor(handle); local 1517 const Sensor& sensor = mService->getSensorFromHandle(mSensorInfo.keyAt(i)); local [all...] |
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/ |
MotionSensor.java | 17 // Make values from a motion sensor (e.g., accelerometer) available as filter outputs. 22 import android.hardware.Sensor; 37 private Sensor mSensor = null; 56 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_LINEAR_ACCELERATION); 57 // TODO: currently, the type of sensor is hardcoded. Should be able to set the sensor 68 public final void onAccuracyChanged(Sensor sensor, int accuracy) { 69 // (Do we need to do something when sensor accuracy changes?)
|
/hardware/intel/common/utils/ituxd/src/com/intel/thermal/ |
ThermalSensor.java | 28 * The ThermalSensor class describes the attributes of a Thermal Sensor. This 29 * class implements methods that retrieve temperature sensor information from 38 private String mSensorName; /* name of the sensor */ 45 private int mSensorState; /* Thermal state of the sensor */ 46 private int mCurrTemp; /* Holds the latest temperature of the sensor */ 47 private int mSensorSysfsIndx; /* Index of this sensor in the sysfs */ 48 private boolean mIsSensorActive = false; /* Whether this sensor is active */ 110 * This function sets the sensor path to the given String value. If the 114 * If sensor path is "none", sensor temp is not read via any sysf [all...] |
/hardware/ti/omap4xxx/camera/ |
SensorListener.cpp | 20 * This file listens and propogates sensor events to CameraHal. 49 if (sen_events[i].type == Sensor::TYPE_ACCELEROMETER) { 82 } else if (sen_events[i].type == Sensor::TYPE_GYROSCOPE) { 155 CAMHAL_LOGEA("Couldn't create sensor looper thread"); 160 ret = mSensorLooperThread->run("sensor looper thread", PRIORITY_URGENT_DISPLAY); 197 Sensor const* sensor; local 205 sensor = mgr.getDefaultSensor(Sensor::TYPE_ACCELEROMETER); 206 CAMHAL_LOGDB("orientation = %p (%s)", sensor, sensor->getName().string()) 216 Sensor const* sensor; local [all...] |
/frameworks/base/docs/html/sdk/api_diff/20/changes/ |
android.hardware.Sensor.html | 10 android.hardware.Sensor 74 Class android.hardware.<A HREF="../../../../reference/android/hardware/Sensor.html" target="_top"><font size="+2"><code>Sensor</code></font></A> 86 <A NAME="android.hardware.Sensor.getStringType_added()"></A> 87 <nobr><code>String</code> <A HREF="../../../../reference/android/hardware/Sensor.html#getStringType()" target="_top"><code>getStringType</code></A>()</nobr> 102 <A NAME="android.hardware.Sensor.STRING_TYPE_ACCELEROMETER"></A> 103 <nobr><code>String</code> <A HREF="../../../../reference/android/hardware/Sensor.html#STRING_TYPE_ACCELEROMETER" target="_top"><code>STRING_TYPE_ACCELEROMETER</code></A></nobr> 109 <A NAME="android.hardware.Sensor.STRING_TYPE_AMBIENT_TEMPERATURE"></A> 110 <nobr><code>String</code> <A HREF="../../../../reference/android/hardware/Sensor.html#STRING_TYPE_AMBIENT_TEMPERATURE" target="_top"><code>STRING_TYPE_AMBIENT_TEMPERATURE</code></A></nobr> 116 <A NAME="android.hardware.Sensor.STRING_TYPE_GAME_ROTATION_VECTOR"></A [all...] |
/frameworks/base/docs/html/guide/topics/sensors/ |
sensors_environment.jd | 12 <li><a href="#sensors-using-humid">Using the Humidity Sensor</a></li> 40 the light sensor, which most device manufacturers use to control screen brightness, environment 42 verify at runtime whether an environment sensor exists before you attempt to acquire data from 45 <p>Unlike most motion sensors and position sensors, which return a multi-dimensional array of sensor 46 values for each {@link android.hardware.SensorEvent}, environment sensors return a single sensor 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 [all...] |
sensors_motion.jd | 11 <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> 64 device position, but they can be used with other sensors, such as the geomagnetic field sensor, to 69 <p>All of the motion sensors return multi-dimensional arrays of sensor values for each {@link 70 android.hardware.SensorEvent}. For example, during a single sensor event the accelerometer returns 80 <th scope="col" style="white-space:nowrap">Sensor</th [all...] |
/cts/apps/CtsVerifier/ |
proguard.flags | 9 # ensure we keep public sensor test methods, these are needed at runtime 19 -dontwarn android.hardware.Sensor
|
/frameworks/base/docs/html/sdk/api_diff/20/ |
missingSinces.txt | 31 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_LIGH [all...] |
/pdk/apps/CameraITS/tests/scene0/ |
test_metadata.py | 41 print " Manual sensor:", its.caps.manual_sensor(props) 44 print " Sensor fusion:", its.caps.sensor_fusion(props) 55 check('md.has_key("android.sensor.frameDuration")') 56 check('md["android.sensor.frameDuration"] is not None') 57 check('md.has_key("android.sensor.rollingShutterSkew")') 58 check('md["android.sensor.rollingShutterSkew"] is not None') 59 check('md["android.sensor.frameDuration"] > ' 60 'md["android.sensor.rollingShutterSkew"] > 0') 63 check('props.has_key("android.sensor.info.timestampSource")') 64 check('props["android.sensor.info.timestampSource"] is not None' [all...] |