mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-25 05:07:12 +01:00
Ported: Remove duplicate Android sensor listener registrations - madmiraal
b66b153b8c
This commit is contained in:
parent
92e1759b39
commit
ed207ab5da
@ -582,13 +582,9 @@ public class Pandemonium extends Fragment implements SensorEventListener, IDownl
|
|||||||
netUtils = new PandemoniumNetUtils(activity);
|
netUtils = new PandemoniumNetUtils(activity);
|
||||||
mSensorManager = (SensorManager)activity.getSystemService(Context.SENSOR_SERVICE);
|
mSensorManager = (SensorManager)activity.getSystemService(Context.SENSOR_SERVICE);
|
||||||
mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
|
mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
|
||||||
mSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_GAME);
|
|
||||||
mGravity = mSensorManager.getDefaultSensor(Sensor.TYPE_GRAVITY);
|
mGravity = mSensorManager.getDefaultSensor(Sensor.TYPE_GRAVITY);
|
||||||
mSensorManager.registerListener(this, mGravity, SensorManager.SENSOR_DELAY_GAME);
|
|
||||||
mMagnetometer = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);
|
mMagnetometer = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);
|
||||||
mSensorManager.registerListener(this, mMagnetometer, SensorManager.SENSOR_DELAY_GAME);
|
|
||||||
mGyroscope = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE);
|
mGyroscope = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE);
|
||||||
mSensorManager.registerListener(this, mGyroscope, SensorManager.SENSOR_DELAY_GAME);
|
|
||||||
|
|
||||||
PandemoniumLib.initialize(activity, this, activity.getAssets(), use_apk_expansion);
|
PandemoniumLib.initialize(activity, this, activity.getAssets(), use_apk_expansion);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user