/external/robolectric/v1/src/test/java/com/xtremelabs/robolectric/shadows/ |
SensorManagerTest.java | 7 import android.hardware.SensorManager; 21 private SensorManager sensorManager; 26 sensorManager = (SensorManager) Robolectric.application.getSystemService(Context.SENSOR_SERVICE); 27 shadow = shadowOf(sensorManager); 32 sensorManager = null; 45 Sensor sensor = sensorManager.getDefaultSensor(SensorManager.SENSOR_ACCELEROMETER); 46 sensorManager.registerListener(listener, sensor, SensorManager.SENSOR_DELAY_NORMAL) [all...] |
/cts/tests/tests/hardware/src/android/hardware/cts/helpers/sensoroperations/ |
TestSensorOperation.java | 77 void execute(TestSensorManager sensorManager, TestSensorEventListener listener) 237 public void execute(TestSensorManager sensorManager, TestSensorEventListener listener) 240 CountDownLatch latch = sensorManager.registerListener(listener, eventCount); 243 sensorManager.unregisterListener(); 265 public void execute(TestSensorManager sensorManager, TestSensorEventListener listener) 268 sensorManager.registerListener(listener); 272 CountDownLatch flushLatch1 = sensorManager.requestFlush(); 301 CountDownLatch flushLatch2 = sensorManager.requestFlush(); 320 CountDownLatch flushLatch3 = sensorManager.requestFlush(); 333 sensorManager.unregisterListener() [all...] |
/frameworks/base/core/java/com/android/internal/os/ |
SensorPowerCalculator.java | 19 import android.hardware.SensorManager; 29 public SensorPowerCalculator(PowerProfile profile, SensorManager sensorManager) { 30 mSensors = sensorManager.getSensorList(Sensor.TYPE_ALL);
|
/external/webrtc/webrtc/examples/androidapp/src/org/appspot/apprtc/ |
AppRTCProximitySensor.java | 20 import android.hardware.SensorManager; 42 private final SensorManager sensorManager; 55 sensorManager = ((SensorManager) context.getSystemService( 70 sensorManager.registerListener( 71 this, proximitySensor, SensorManager.SENSOR_DELAY_NORMAL); 82 sensorManager.unregisterListener(this, proximitySensor); 95 if (accuracy == SensorManager.SENSOR_STATUS_UNRELIABLE) { 135 proximitySensor = sensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY) [all...] |
/packages/apps/Camera2/src/com/android/camera/hardware/ |
HeadingSensor.java | 24 import android.hardware.SensorManager; 39 private final SensorManager mSensorManager; 55 * @param sensorManager A {#link android.hardware.SensorManager} that 58 public HeadingSensor(SensorManager sensorManager) { 59 mSensorManager = sensorManager; 82 SensorManager.SENSOR_DELAY_NORMAL); 86 SensorManager.SENSOR_DELAY_NORMAL); 120 SensorManager.getRotationMatrix(mRotationMatrix, null, mGData, mMData) [all...] |
/packages/apps/DevCamera/src/com/android/devcamera/ |
GyroOperations.java | 21 import android.hardware.SensorManager; 32 private SensorManager mSensorManager; 45 public GyroOperations(SensorManager sensorManager) { 46 mSensorManager = sensorManager; 50 mSensorManager.registerListener(mSensorEventListener, mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE), SensorManager.SENSOR_DELAY_FASTEST);
|
/frameworks/native/libs/gui/ |
SensorManager.cpp | 32 #include <gui/SensorManager.h> 39 android::Mutex android::SensorManager::sLock; 40 std::map<String16, SensorManager*> android::SensorManager::sPackageInstances; 42 SensorManager& SensorManager::getInstanceForPackage(const String16& packageName) { 44 SensorManager* sensorManager; 45 std::map<String16, SensorManager*>::iterator iterator = 49 sensorManager = iterator->second [all...] |
/cts/tests/tests/hardware/src/android/hardware/cts/helpers/ |
TestSensorEnvironment.java | 21 import android.hardware.SensorManager; 285 if (mSamplingPeriodUs == SensorManager.SENSOR_DELAY_FASTEST) { 304 && mSamplingPeriodUs != SensorManager.SENSOR_DELAY_FASTEST; 310 * The flags SensorManager.SENSOR_DELAY_[GAME|UI|NORMAL] are not supported since the CDD does 383 SensorManager sensorManager = 384 (SensorManager) context.getSystemService(Context.SENSOR_SERVICE); 385 if (sensorManager == null) { 389 Sensor sensor = sensorManager.getDefaultSensor(sensorType); 445 * {@link SensorManager#SENSOR_DELAY_GAME}, {@link SensorManager#SENSOR_DELAY_UI}, o [all...] |
/cts/tools/cts-device-info/src/com/android/cts/deviceinfo/ |
SensorDeviceInfo.java | 20 import android.hardware.SensorManager; 58 SensorManager sensorManager = (SensorManager) 60 List<Sensor> sensors = sensorManager.getSensorList(Sensor.TYPE_ALL);
|
/development/ndk/platforms/android-9/samples/native-activity/jni/ |
main.c | 47 ASensorManager* sensorManager; 244 engine.sensorManager = ASensorManager_getInstance(); 245 engine.accelerometerSensor = ASensorManager_getDefaultSensor(engine.sensorManager, 247 engine.sensorEventQueue = ASensorManager_createEventQueue(engine.sensorManager,
|
/external/webrtc/webrtc/modules/audio_processing/test/android/apmtest/jni/ |
main.c | 47 ASensorManager* sensorManager; 244 engine.sensorManager = ASensorManager_getInstance(); 245 engine.accelerometerSensor = ASensorManager_getDefaultSensor(engine.sensorManager, 247 engine.sensorEventQueue = ASensorManager_createEventQueue(engine.sensorManager,
|
/frameworks/base/services/core/java/com/android/server/ |
GestureLauncherService.java | 30 import android.hardware.SensorManager; 174 SensorManager sensorManager = (SensorManager) mContext.getSystemService( 176 sensorManager.unregisterListener(mGestureListener); 189 SensorManager sensorManager = (SensorManager) mContext.getSystemService( 197 mCameraLaunchSensor = sensorManager.getDefaultSensor( 206 mRegistered = sensorManager.registerListener(mGestureListener [all...] |
/frameworks/base/core/jni/ |
android_hardware_SensorManager.cpp | 16 #define LOG_TAG "SensorManager" 28 #include <gui/SensorManager.h> 161 return (jlong) &SensorManager::getInstanceForPackage(String16(opPackageNameUtf.c_str())); 210 nativeGetSensorAtIndex(JNIEnv *env, jclass clazz, jlong sensorManager, jobject sensor, jint index) 212 SensorManager* mgr = reinterpret_cast<SensorManager*>(sensorManager); 224 nativeGetDynamicSensors(JNIEnv *env, jclass clazz, jlong sensorManager, jobject sensorList) { 226 SensorManager* mgr = reinterpret_cast<SensorManager*>(sensorManager) [all...] |
/frameworks/base/services/core/java/com/android/server/power/ |
WirelessChargerDetector.java | 22 import android.hardware.SensorManager; 96 private static final double MIN_GRAVITY = SensorManager.GRAVITY_EARTH - 1.0f; 97 private static final double MAX_GRAVITY = SensorManager.GRAVITY_EARTH + 1.0f; 101 private final SensorManager mSensorManager; 143 public WirelessChargerDetector(SensorManager sensorManager, 145 mSensorManager = sensorManager; 149 mGravitySensor = sensorManager.getDefaultSensor(Sensor.TYPE_GRAVITY);
|
/developers/build/prebuilts/gradle/BatchStepSensor/Application/src/main/java/com/example/android/batchstepsensor/ |
BatchStepSensorFragment.java | 24 import android.hardware.SensorManager; 254 SensorManager sensorManager = 255 (SensorManager) getActivity().getSystemService(Activity.SENSOR_SERVICE); 257 Sensor sensor = sensorManager.getDefaultSensor(sensorType); 261 final boolean batchMode = sensorManager.registerListener( 262 mListener, sensor, SensorManager.SENSOR_DELAY_NORMAL, maxdelay); 290 SensorManager sensorManager = 291 (SensorManager) getActivity().getSystemService(Activity.SENSOR_SERVICE) [all...] |
/developers/samples/android/sensors/BatchStepSensor/Application/src/main/java/com/example/android/batchstepsensor/ |
BatchStepSensorFragment.java | 24 import android.hardware.SensorManager; 254 SensorManager sensorManager = 255 (SensorManager) getActivity().getSystemService(Activity.SENSOR_SERVICE); 257 Sensor sensor = sensorManager.getDefaultSensor(sensorType); 261 final boolean batchMode = sensorManager.registerListener( 262 mListener, sensor, SensorManager.SENSOR_DELAY_NORMAL, maxdelay); 290 SensorManager sensorManager = 291 (SensorManager) getActivity().getSystemService(Activity.SENSOR_SERVICE) [all...] |
/development/samples/browseable/BatchStepSensor/src/com.example.android.batchstepsensor/ |
BatchStepSensorFragment.java | 24 import android.hardware.SensorManager; 254 SensorManager sensorManager = 255 (SensorManager) getActivity().getSystemService(Activity.SENSOR_SERVICE); 257 Sensor sensor = sensorManager.getDefaultSensor(sensorType); 261 final boolean batchMode = sensorManager.registerListener( 262 mListener, sensor, SensorManager.SENSOR_DELAY_NORMAL, maxdelay); 290 SensorManager sensorManager = 291 (SensorManager) getActivity().getSystemService(Activity.SENSOR_SERVICE) [all...] |
/developers/build/prebuilts/gradle/RuntimePermissionsWear/Wearable/src/main/java/com/example/android/wearable/runtimepermissions/ |
MainWearActivity.java | 23 import android.hardware.SensorManager; 148 SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); 149 List<Sensor> sensorList = sensorManager.getSensorList(Sensor.TYPE_ALL); 336 SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); 337 List<Sensor> sensorList = sensorManager.getSensorList(Sensor.TYPE_ALL);
|
IncomingRequestWearService.java | 23 import android.hardware.SensorManager; 119 SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); 120 List<Sensor> sensorList = sensorManager.getSensorList(Sensor.TYPE_ALL);
|
/developers/samples/android/wearable/wear/RuntimePermissionsWear/Wearable/src/main/java/com/example/android/wearable/runtimepermissions/ |
MainWearActivity.java | 23 import android.hardware.SensorManager; 148 SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); 149 List<Sensor> sensorList = sensorManager.getSensorList(Sensor.TYPE_ALL); 336 SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); 337 List<Sensor> sensorList = sensorManager.getSensorList(Sensor.TYPE_ALL);
|
IncomingRequestWearService.java | 23 import android.hardware.SensorManager; 119 SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); 120 List<Sensor> sensorList = sensorManager.getSensorList(Sensor.TYPE_ALL);
|
/development/samples/browseable/RuntimePermissionsWear/Wearable/src/com.example.android.wearable.runtimepermissions/ |
MainWearActivity.java | 23 import android.hardware.SensorManager; 148 SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); 149 List<Sensor> sensorList = sensorManager.getSensorList(Sensor.TYPE_ALL); 336 SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); 337 List<Sensor> sensorList = sensorManager.getSensorList(Sensor.TYPE_ALL);
|
IncomingRequestWearService.java | 23 import android.hardware.SensorManager; 119 SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); 120 List<Sensor> sensorList = sensorManager.getSensorList(Sensor.TYPE_ALL);
|
/packages/apps/Settings/src/com/android/settings/gestures/ |
GestureSettings.java | 22 import android.hardware.SensorManager; 176 SensorManager sensorManager = 177 (SensorManager) context.getSystemService(Context.SENSOR_SERVICE); 178 for (Sensor s : sensorManager.getSensorList(Sensor.TYPE_ALL)) {
|
/cts/tests/tests/hardware/src/android/hardware/cts/ |
SingleSensorTests.java | 21 import android.hardware.SensorManager; 120 SensorManager sensorManager = 121 (SensorManager) getContext().getSystemService(Context.SENSOR_SERVICE); 122 assertNotNull("SensorManager not present in the system.", sensorManager); 124 Sensor sensor = sensorManager.getDefaultSensor(entry.getKey()); 142 runSensorTest(Sensor.TYPE_ACCELEROMETER, SensorManager.SENSOR_DELAY_FASTEST); 178 runSensorTest(Sensor.TYPE_MAGNETIC_FIELD, SensorManager.SENSOR_DELAY_FASTEST); 215 runSensorTest(Sensor.TYPE_ORIENTATION, SensorManager.SENSOR_DELAY_FASTEST) [all...] |