Skip to content

Commit

Permalink
Minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
audaciouscode committed Jul 20, 2017
1 parent 4d2b4ec commit b5efd9f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Expand Up @@ -211,10 +211,11 @@ public void run()

Accelerometer.sHandler = new Handler();

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
sensors.registerListener(me, me.mSensor, SensorManager.SENSOR_DELAY_NORMAL, 0, Accelerometer.sHandler);
else
} else {
sensors.registerListener(me, me.mSensor, SensorManager.SENSOR_DELAY_NORMAL, Accelerometer.sHandler);
}

SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(me.mContext);

Expand Down
Expand Up @@ -172,10 +172,11 @@ public void run()

AmbientLight.sHandler = new Handler();

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
sensors.registerListener(me, me.mSensor, SensorManager.SENSOR_DELAY_FASTEST, 0, AmbientLight.sHandler);
else
} else {
sensors.registerListener(me, me.mSensor, SensorManager.SENSOR_DELAY_FASTEST, AmbientLight.sHandler);
}

Looper.loop();
}
Expand Down

0 comments on commit b5efd9f

Please sign in to comment.