国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
Jelly Bean Sensor Framework

如果您要轉(zhuǎn)載,請注明原創(chuàng)作者是蟈蟈

原文地址:http://blog.csdn.net/guoguodaern/article/details/7984176

Frameworks

Below is a picture to show how sensor works in JB.

Each Application would create an EventListener to handle events from sensorHW. Below is a snap shot for EventListener, usually, onSensorChanged() and onAccuracyChanged() would be provided.

 

The Application registers the created EventListener to the SystemSensorManager which has a pooling thread and will invokes the callback functions in EventThread once read any event data from SensorEventQueue whose data is from SensorService.

SystemSensorManager enables the required sensor once registered with the EventListener. The control commands are sent to sensorService also through SensorEventQueue.

For the data flow, the sensorEventQueue holds a bitTube buffer; sensorSevice is responsible to write it with sensor event polled from sensorhal while systemSensorManager has a thread reads data from the bitTube buffer and invokes registered callbacks.

2.    Sensor Service

Sensor Service is an android service run in system_server.

Sensor Service has a fancy fusion instance which could generate virtual sensors event data. Once hardware not supplies such virtual sensors, Sensor Service uses its own virtual sensors. Those virtual sensors include Rotation vector, Gravity, Linear Acceleration, and Orientation. And to support those virtual sensors, hardware should at least provide Accelerator, Magnetic and Gyroscope sensors.

SensorDevice holds an internal class BatteryService. It is used to inform the BatteryService that how much time the sensor running. noteStartSensor() is called when enabling a sensor while noteStopSensor() is called when disabling a sensor.

3.    Control Flow sequence

Below is the control flow for register an event listener by applications.

本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊舉報
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
手把手教你當微信運動第一名 – 利用Android Hook進行微信運動作弊 | WooYun知識庫
Components for Control | The Orocos Project
Android Sensor系統(tǒng)剖析(2.3.5)(上)
jeep牧馬人常用中英文縮寫對比,方便您更了解您的愛車
Android_Sensor
深入了解 gRPC:協(xié)議
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服