Remove duplicate Android sensor listener registrations
(cherry picked from commit cf0f967e6d
)
This commit is contained in:
parent
e0ddaf7137
commit
b66b153b8c
@ -576,13 +576,9 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
|
||||
netUtils = new GodotNetUtils(activity);
|
||||
mSensorManager = (SensorManager)activity.getSystemService(Context.SENSOR_SERVICE);
|
||||
mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
|
||||
mSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_GAME);
|
||||
mGravity = mSensorManager.getDefaultSensor(Sensor.TYPE_GRAVITY);
|
||||
mSensorManager.registerListener(this, mGravity, SensorManager.SENSOR_DELAY_GAME);
|
||||
mMagnetometer = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);
|
||||
mSensorManager.registerListener(this, mMagnetometer, SensorManager.SENSOR_DELAY_GAME);
|
||||
mGyroscope = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE);
|
||||
mSensorManager.registerListener(this, mGyroscope, SensorManager.SENSOR_DELAY_GAME);
|
||||
|
||||
GodotLib.initialize(activity, this, activity.getAssets(), use_apk_expansion);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user