~w-shackleton/droidpad-android/stable

« back to all changes in this revision

Viewing changes to src/uk/digitalsquid/droidpad/BGService.java

  • Committer: William Shackleton
  • Date: 2013-04-12 14:42:12 UTC
  • mfrom: (51.3.5 json)
  • mto: This revision was merged to the branch mainline in revision 52.
  • Revision ID: w.shackleton@gmail.com-20130412144212-4f7pueqwee0lc3yd
Imported code to load JSON layouts

Show diffs side-by-side

added added

removed removed

Lines of Context:
206
206
                
207
207
                if(needsAccel) {
208
208
                        Sensor downwardsDirection = null;
209
 
                        downwardsDirection = sm.getDefaultSensor(Sensor.TYPE_GRAVITY);
 
209
                        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD)
 
210
                                downwardsDirection = sm.getDefaultSensor(Sensor.TYPE_GRAVITY);
210
211
                        if(downwardsDirection == null) // Use accel
211
212
                                downwardsDirection = sm.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
212
213