Home
last modified time | relevance | path

Searched refs:mSensors (Results 1 – 15 of 15) sorted by relevance

/frameworks/native/services/sensorservice/
DSensorsWrapper.h106 mSensors(sensors) { }; in SensorsWrapperBase()
109 return mSensors->getSensorsList(_hidl_cb); in getSensorsList()
113 return mSensors->setOperationMode(mode); in setOperationMode()
117 return mSensors->activate(sensorHandle, enabled); in activate()
122 return mSensors->batch(sensorHandle, samplingPeriodNs, maxReportLatencyNs); in batch()
126 return mSensors->flush(sensorHandle); in flush()
130 return mSensors->injectSensorData(event); in injectSensorData()
135 return mSensors->registerDirectChannel(mem, _hidl_cb); in registerDirectChannel()
139 return mSensors->unregisterDirectChannel(channelHandle); in unregisterDirectChannel()
145 return mSensors->configDirectReport(sensorHandle, channelHandle, rate, _hidl_cb); in configDirectReport()
[all …]
DSensorDevice.cpp112 (checkReturnAndGetStatus(mSensors->unregisterDirectChannel(-1)) != INVALID_OPERATION); in SensorDevice()
118 checkReturn(mSensors->getSensorsList( in initializeSensorList()
137 checkReturn(mSensors->activate(list[i].sensorHandle, 0 /* enabled */)); in initializeSensorList()
175 mSensors = new SensorServiceUtil::SensorsWrapperV1_0(sensors); in connectHidlServiceV1_0()
180 if(mSensors->poll(0, [](auto, const auto &, const auto &) {}).isOk()) { in connectHidlServiceV1_0()
187 mSensors = nullptr; in connectHidlServiceV1_0()
203 mSensors = new SensorServiceUtil::SensorsWrapperV2_0(sensors); in connectHidlServiceV2_0()
220 CHECK(mSensors != nullptr && mEventQueue != nullptr && in connectHidlServiceV2_0()
224 status_t status = checkReturnAndGetStatus(mSensors->initialize( in connectHidlServiceV2_0()
252 mSensors = nullptr; in reconnect()
[all …]
DSensorService.cpp240 mSensors.forEachSensor( in onFirstRef()
317 if (mSensors.add(handle, s, isDebug, isVirtual)){ in registerSensor()
321 return mSensors.getNonSensor(); in registerSensor()
330 bool ret = mSensors.remove(handle); in unregisterDynamicSensorLocked()
411 } else if (!mSensors.hasAnySensor()) { in dump()
426 result.append(mSensors.dump().c_str()); in dump()
433 sp<SensorInterface> s = mSensors.getInterface(i.first); in dump()
714 const size_t vcount = mSensors.getVirtualSensors().size(); in threadLoop()
788 sp<SensorInterface> si = mSensors.getInterface(handle); in threadLoop()
846 if (mSensors.isNewHandle(handle)) { in threadLoop()
[all …]
DSensorDevice.h130 sp<SensorServiceUtil::ISensorsWrapper> mSensors; variable
DSensorService.h317 SensorServiceUtil::SensorList mSensors; variable
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/
DDozeTriggersTest.java63 private FakeSensorManager mSensors; field in DozeTriggersTest
83 mSensors = new FakeSensorManager(mContext); in setUp()
88 mSensors, Handler.createAsync(Looper.myLooper()), mWakeLock, true, in setUp()
101 mSensors.getMockProximitySensor().sendProximityResult(false); /* Near */ in testOnNotification_stillWorksAfterOneFailedProxCheck()
108 mSensors.getMockProximitySensor().sendProximityResult(true); /* Far */ in testOnNotification_stillWorksAfterOneFailedProxCheck()
126 mSensors.getMockProximitySensor().sendProximityResult(false /* far */); in testOnSensor_whenUndockedWithNearAndDoubleTapScreen_shouldNotWakeUp()
139 mSensors.getMockProximitySensor().sendProximityResult(false /* far */); in testOnSensor_whenDockedWithNearAndDoubleTapScreen_shouldWakeUp()
DDozeSensorsTest.java117 mDozeSensors.mSensors = new TriggerSensor[] {mMockTriggerSensor}; in testSetListening_firstTrue_registerSettingsObserver()
126 mDozeSensors.mSensors = new TriggerSensor[] {mMockTriggerSensor}; in testSetListening_twiceTrue_onlyRegisterSettingsObserverOnce()
140 for (TriggerSensor sensor : mSensors) { in TestableDozeSensors()
/frameworks/base/core/java/android/hardware/
DLegacySensorManager.java209 private int mSensors; field in LegacySensorManager.LegacyListener
214 mSensors = 0; in LegacyListener()
218 if ((mSensors & legacyType) != 0) { in registerSensor()
221 boolean alreadyHasOrientationSensor = hasOrientationSensor(mSensors); in registerSensor()
222 mSensors |= legacyType; in registerSensor()
230 if ((mSensors & legacyType) == 0) { in unregisterSensor()
233 mSensors &= ~legacyType; in unregisterSensor()
234 if (hasOrientationSensor(legacyType) && hasOrientationSensor(mSensors)) { in unregisterSensor()
241 return mSensors != 0; in hasSensors()
267 if ((mSensors & SensorManager.SENSOR_ORIENTATION_RAW) != 0) { in onSensorChanged()
[all …]
/frameworks/base/core/java/com/android/internal/os/
DSensorPowerCalculator.java28 private final List<Sensor> mSensors; field in SensorPowerCalculator
33 mSensors = sensorManager.getSensorList(Sensor.TYPE_ALL); in SensorPowerCalculator()
55 final int sensorsCount = mSensors.size(); in calculateApp()
57 final Sensor s = mSensors.get(i); in calculateApp()
/frameworks/hardware/interfaces/sensorservice/libsensorndkbridge/
DASensorManager.cpp102 mSensors = list; in getSensorList()
107 mSensorList.reset(new ASensorRef[mSensors.size()]); in getSensorList()
108 for (size_t i = 0; i < mSensors.size(); ++i) { in getSensorList()
110 reinterpret_cast<ASensorRef>(&mSensors[i]); in getSensorList()
118 return mSensors.size(); in getSensorList()
133 for (size_t i = 0; i < mSensors.size(); ++i) { in getDefaultSensor()
134 if (sensor == mSensors[i]) { in getDefaultSensor()
136 reinterpret_cast<ASensorRef>(&mSensors[i]); in getDefaultSensor()
DASensorManager.h68 android::hardware::hidl_vec<SensorInfo> mSensors; member
/frameworks/native/libs/sensor/
DSensorManager.cpp132 mSensors.clear(); in sensorManagerDied()
163 mSensors = mSensorServer->getSensorList(mOpPackageName); in assertStateLocked()
164 size_t count = mSensors.size(); in assertStateLocked()
170 mSensorList[i] = mSensors.array() + i; in assertStateLocked()
184 return static_cast<ssize_t>(mSensors.size()); in getSensorList()
218 for (size_t i=0 ; i<mSensors.size() ; i++) { in getDefaultSensor()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/utils/hardware/
DFakeSensorManager.java55 private final FakeGenericSensor[] mSensors; field in FakeSensorManager
65 mSensors = new FakeGenericSensor[]{ in FakeSensorManager()
93 .stream(mSensors) in getFullSensorList()
106 for (FakeGenericSensor s : mSensors) { in unregisterListenerImpl()
119 for (FakeGenericSensor s : mSensors) { in registerListenerImpl()
/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/
DDozeSensors.java74 protected TriggerSensor[] mSensors; field in DozeSensors
94 mSensors = new TriggerSensor[] { in DozeSensors()
175 for (TriggerSensor s : mSensors) { in setListening()
183 for (TriggerSensor sensor : mSensors) { in setTouchscreenSensorsListening()
191 for (TriggerSensor s : mSensors) { in onUserSwitched()
206 for (TriggerSensor s : mSensors) {
218 for (TriggerSensor sensor : mSensors) { in ignoreTouchScreenSensorsSettingInterferingWithDocking()
227 for (TriggerSensor s : mSensors) { in dump()
244 for (TriggerSensor s : mSensors) { in registerSettingsObserverIfNeeded()
/frameworks/native/libs/sensor/include/sensor/
DSensorManager.h84 Vector<Sensor> mSensors; variable