简体   繁体   English

sensor refresh rate, limited on Android 12, 与安全问题有什么关系?

[英]How is sensor refresh rate, limited on Android 12, related to security problems?

To protect potentially sensitive information about users, if your app targets Android 12 (API level 31) or higher, the system places a limit on the refresh rate of data from certain motion sensors and position sensors. This data includes values recorded by the device's accelerometer, gyroscope, and geomagnetic field sensor.

The refresh rate limit depends on how you access sensor data:

If you call the registerListener() method to monitor sensor events, the sensor sampling rate is limited to 200 Hz. This is true for all overloaded variants of the registerListener() method.
If you use the SensorDirectChannel class, the sensor sampling rate is limited to RATE_NORMAL, which is usually about 50 Hz.
If your app needs to gather motion sensor data at a higher rate, you must declare the HIGH_SAMPLING_RATE_SENSORS permission, as shown in the following code snippet. Otherwise, if your app tries to gather motion sensor data at a higher rate without declaring this permission, a SecurityException occurs.

Ref here参考这里

If you can detect small accelerations at a high enough rate, you can infer a user's keystrokes.如果您能够以足够高的速率检测到小加速度,则可以推断出用户的击键。 For example, see this例如,看到这个

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM