Home
last modified time | relevance | path

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

1234

/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/utils/hardware/
DFakeSensorManager.java21 import android.hardware.Sensor;
58 Sensor proxSensor = context.getSystemService(SensorManager.class) in FakeSensorManager()
59 .getDefaultSensor(Sensor.TYPE_PROXIMITY); in FakeSensorManager()
62 proxSensor = createSensor(Sensor.TYPE_PROXIMITY); in FakeSensorManager()
67 mFakeLightSensor = new FakeGenericSensor(createSensor(Sensor.TYPE_LIGHT)), in FakeSensorManager()
80 public Sensor getDefaultSensor(int type) { in getDefaultSensor()
81 Sensor s = super.getDefaultSensor(type); in getDefaultSensor()
91 protected List<Sensor> getFullSensorList() { in getFullSensorList()
99 protected List<Sensor> getFullDynamicSensorList() { in getFullDynamicSensorList()
104 protected void unregisterListenerImpl(SensorEventListener listener, Sensor sensor) { in unregisterListenerImpl()
[all …]
/frameworks/native/libs/sensor/
DSensor.cpp29 Sensor::Sensor(const char * name) : in Sensor() function in android::Sensor
37 Sensor::Sensor(struct sensor_t const* hwSensor, int halVersion) : in Sensor() function in android::Sensor
38 Sensor(*hwSensor, uuid_t(), halVersion) { in Sensor()
41 Sensor::Sensor(struct sensor_t const& hwSensor, const uuid_t& uuid, int halVersion) : in Sensor() function in android::Sensor
42 Sensor("") { in Sensor()
329 Sensor::~Sensor() { in ~Sensor()
332 const String8& Sensor::getName() const { in getName()
336 const String8& Sensor::getVendor() const { in getVendor()
340 int32_t Sensor::getHandle() const { in getHandle()
344 int32_t Sensor::getType() const { in getType()
[all …]
DISensorServer.cpp56 virtual Vector<Sensor> getSensorList(const String16& opPackageName) in getSensorList()
62 Sensor s; in getSensorList()
63 Vector<Sensor> v; in getSensorList()
73 virtual Vector<Sensor> getDynamicSensorList(const String16& opPackageName) in getDynamicSensorList()
79 Sensor s; in getDynamicSensorList()
80 Vector<Sensor> v; in getDynamicSensorList()
157 Vector<Sensor> v(getSensorList(opPackageName)); in onTransact()
184 Vector<Sensor> v(getDynamicSensorList(opPackageName)); in onTransact()
/frameworks/base/core/java/android/hardware/
DSensorManager.java89 private final SparseArray<List<Sensor>> mSensorListByType =
90 new SparseArray<List<Sensor>>();
378 protected abstract List<Sensor> getFullSensorList(); in getFullSensorList()
384 protected abstract List<Sensor> getFullDynamicSensorList(); in getFullDynamicSensorList()
416 public List<Sensor> getSensorList(int type) { in getSensorList()
418 List<Sensor> list; in getSensorList()
419 final List<Sensor> fullList = getFullSensorList(); in getSensorList()
423 if (type == Sensor.TYPE_ALL) { in getSensorList()
426 list = new ArrayList<Sensor>(); in getSensorList()
427 for (Sensor i : fullList) { in getSensorList()
[all …]
DSystemSensorManager.java59 Sensor sensor, int index); in nativeGetSensorAtIndex()
60 private static native void nativeGetDynamicSensors(long nativeInstance, List<Sensor> list); in nativeGetDynamicSensors()
79 private final ArrayList<Sensor> mFullSensorsList = new ArrayList<>();
80 private List<Sensor> mFullDynamicSensorsList = new ArrayList<>();
83 private final HashMap<Integer, Sensor> mHandleToSensor = new HashMap<>();
118 Sensor sensor = new Sensor(); in SystemSensorManager()
128 protected List<Sensor> getFullSensorList() { in getFullSensorList()
134 protected List<Sensor> getFullDynamicSensorList() { in getFullDynamicSensorList()
144 protected boolean registerListenerImpl(SensorEventListener listener, Sensor sensor, in registerListenerImpl()
151 if (sensor.getReportingMode() == Sensor.REPORTING_MODE_ONE_SHOT) { in registerListenerImpl()
[all …]
DLegacySensorManager.java72 final List<Sensor> fullList = mSensorManager.getFullSensorList(); in getSensors()
73 for (Sensor i : fullList) { in getSensors()
75 case Sensor.TYPE_ACCELEROMETER: in getSensors()
78 case Sensor.TYPE_MAGNETIC_FIELD: in getSensors()
81 case Sensor.TYPE_ORIENTATION: in getSensors()
96 Sensor.TYPE_ACCELEROMETER, listener, sensors, rate) || result; in registerListener()
98 Sensor.TYPE_MAGNETIC_FIELD, listener, sensors, rate) || result; in registerListener()
100 Sensor.TYPE_ORIENTATION, listener, sensors, rate) || result; in registerListener()
102 Sensor.TYPE_ORIENTATION, listener, sensors, rate) || result; in registerListener()
104 Sensor.TYPE_TEMPERATURE, listener, sensors, rate) || result; in registerListener()
[all …]
/frameworks/native/libs/sensor/include/sensor/
DSensor.h44 class Sensor : public ASensor, public LightFlattenable<Sensor>
64 Sensor(const Sensor&) = default;
65 Sensor& operator=(const Sensor&) = default;
67 Sensor(const char * name = "");
68 Sensor(struct sensor_t const* hwSensor, int halVersion = 0);
69 Sensor(struct sensor_t const& hwSensor, const uuid_t& uuid, int halVersion = 0);
70 ~Sensor();
DSensorManager.h49 class Sensor; variable
59 ssize_t getSensorList(Sensor const* const** list);
60 ssize_t getDynamicSensorList(Vector<Sensor>& list);
61 Sensor const* getDefaultSensor(int type);
83 Sensor const** mSensorList;
84 Vector<Sensor> mSensors;
DSensorEventQueue.h44 class Sensor; variable
81 status_t enableSensor(Sensor const* sensor) const;
82 status_t enableSensor(Sensor const* sensor, int32_t samplingPeriodUs) const;
83 status_t disableSensor(Sensor const* sensor) const;
84 status_t setEventRate(Sensor const* sensor, nsecs_t ns) const;
DISensorServer.h35 class Sensor; variable
44 virtual Vector<Sensor> getSensorList(const String16& opPackageName) = 0;
45 virtual Vector<Sensor> getDynamicSensorList(const String16& opPackageName) = 0;
/frameworks/base/native/android/
Dsensor.cpp35 using android::Sensor;
78 Sensor const* const* l; in ASensorManager_getSensorList()
93 Sensor const* const* sensorList; in ASensorManager_getDefaultSensorEx()
200 sensorHandle = static_cast<Sensor const *>(sensor)->getHandle(); in ASensorManager_configureDirectReport()
218 static_cast<Sensor const*>(sensor)->getHandle(), samplingPeriodUs, in ASensorEventQueue_registerSensor()
227 static_cast<Sensor const*>(sensor)); in ASensorEventQueue_enableSensor()
235 static_cast<Sensor const*>(sensor)); in ASensorEventQueue_disableSensor()
248 static_cast<Sensor const*>(sensor), us2ns(usec)); in ASensorEventQueue_setEventRate()
288 return static_cast<Sensor const*>(sensor)->getName().string(); in ASensor_getName()
293 return static_cast<Sensor const*>(sensor)->getVendor().string(); in ASensor_getVendor()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
DAsyncSensorManager.java20 import android.hardware.Sensor;
48 private final List<Sensor> mSensorCache;
56 mSensorCache = mInner.getSensorList(Sensor.TYPE_ALL); in AsyncSensorManager()
60 protected List<Sensor> getFullSensorList() { in getFullSensorList()
65 protected List<Sensor> getFullDynamicSensorList() { in getFullDynamicSensorList()
66 return mInner.getDynamicSensorList(Sensor.TYPE_ALL); in getFullDynamicSensorList()
70 protected boolean registerListenerImpl(SensorEventListener listener, Sensor sensor, int delayUs, in registerListenerImpl()
97 protected int configureDirectChannelImpl(SensorDirectChannel channel, Sensor s, int rate) { in configureDirectChannelImpl()
113 protected boolean requestTriggerSensorImpl(TriggerEventListener listener, Sensor sensor) { in requestTriggerSensorImpl()
123 protected boolean cancelTriggerSensorImpl(TriggerEventListener listener, Sensor sensor, in cancelTriggerSensorImpl()
[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/services/sensorservice/
DSensorList.cpp27 const Sensor SensorList::mNonSensor = Sensor("unknown");
69 const Vector<Sensor> SensorList::getUserSensors() const { in getUserSensors()
71 Vector<Sensor> sensors; in getUserSensors()
82 const Vector<Sensor> SensorList::getUserDebugSensors() const { in getUserDebugSensors()
84 Vector<Sensor> sensors; in getUserDebugSensors()
95 const Vector<Sensor> SensorList::getDynamicSensors() const { in getDynamicSensors()
97 Vector<Sensor> sensors; in getDynamicSensors()
108 const Vector<Sensor> SensorList::getVirtualSensors() const { in getVirtualSensors()
110 Vector<Sensor> sensors; in getVirtualSensors()
124 forEachSensor([&result] (const Sensor& s) -> bool { in dump()
DSensorList.h50 const Vector<Sensor> getUserSensors() const;
51 const Vector<Sensor> getUserDebugSensors() const;
52 const Vector<Sensor> getDynamicSensors() const;
53 const Vector<Sensor> getVirtualSensors() const;
70 const Sensor& getNonSensor() const { return mNonSensor;} in getNonSensor()
86 const static Sensor mNonSensor; //.getName() == "unknown",
DSensorService.h153 virtual Vector<Sensor> getSensorList(const String16& opPackageName);
154 virtual Vector<Sensor> getDynamicSensorList(const String16& opPackageName);
171 const Sensor& registerSensor(SensorInterface* sensor,
173 const Sensor& registerVirtualSensor(SensorInterface* sensor, bool isDebug = false);
174 const Sensor& registerDynamicSensorLocked(SensorInterface* sensor, bool isDebug = false);
180 static bool canAccessSensor(const Sensor& sensor, const char* operation,
219 void makeUuidsIntoIdsForSensorList(Vector<Sensor> &sensorList) const;
221 int32_t getIdFromUuid(const Sensor::uuid_t &uuid) const;
/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/
DDozeSensors.java25 import android.hardware.Sensor;
87 mSensorManager.getDefaultSensor(Sensor.TYPE_SIGNIFICANT_MOTION), in DozeSensors()
93 mSensorManager.getDefaultSensor(Sensor.TYPE_PICK_UP_GESTURE), in DozeSensors()
119 private Sensor findSensorWithType(String type) { in findSensorWithType()
123 static Sensor findSensorWithType(SensorManager sensorManager, String type) { in findSensorWithType()
127 List<Sensor> sensorList = sensorManager.getSensorList(Sensor.TYPE_ALL); in findSensorWithType()
128 for (Sensor s : sensorList) { in findSensorWithType()
247 mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY), in setRegistered()
277 public void onAccuracyChanged(Sensor sensor, int accuracy) { in onAccuracyChanged()
288 final Sensor mSensor;
[all …]
DDozeScreenBrightness.java20 import android.hardware.Sensor;
38 private final Sensor mLightSensor;
48 SensorManager sensorManager, Sensor lightSensor, DozeHost host, in DozeScreenBrightness()
65 SensorManager sensorManager, Sensor lightSensor, DozeHost host, in DozeScreenBrightness()
149 public void onAccuracyChanged(Sensor sensor, int accuracy) { in onAccuracyChanged()
/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/tests/java_api/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/base/packages/SystemUI/src/com/android/systemui/classifier/
DFalsingManager.java21 import android.hardware.Sensor;
52 Sensor.TYPE_PROXIMITY,
56 Sensor.TYPE_ACCELEROMETER,
57 Sensor.TYPE_GYROSCOPE,
58 Sensor.TYPE_PROXIMITY,
59 Sensor.TYPE_LIGHT,
60 Sensor.TYPE_ROTATION_VECTOR,
174 Sensor s = mSensorManager.getDefaultSensor(sensorType); in registerSensors()
253 public void onAccuracyChanged(Sensor sensor, int accuracy) { in onAccuracyChanged()
/frameworks/native/libs/sensor/tests/
DSensor_test.cpp29 static bool sensorsMatch(const Sensor& a, const Sensor& b) { in sensorsMatch()
78 Sensor sensor1(&hwSensor, SENSORS_DEVICE_API_VERSION_1_4); in TEST()
79 Sensor sensor2; in TEST()
/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