如果我将侦听器附加到设备的传感器(如下所示),在这种情况下,当 onSensorChanged 发生时,哪个线程运行generateNewRotation
方法、主线程或......?
SensorEventListener sensorListener = new SensorEventListener() {
@Override
public void onSensorChanged(SensorEvent event) {
generateNewRotation();
}
@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {
}
};