Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fda69f3a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add additional comments to explain code."

parents eac6b7ee 5ad67f02
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -761,6 +761,7 @@ public class DeviceIdleController extends SystemService
        @Override
        public void onTrigger(TriggerEvent event) {
            synchronized (DeviceIdleController.this) {
                // One_shot sensors (which call onTrigger) are unregistered when onTrigger is called
                active = false;
                motionLocked();
            }
@@ -769,6 +770,9 @@ public class DeviceIdleController extends SystemService
        @Override
        public void onSensorChanged(SensorEvent event) {
            synchronized (DeviceIdleController.this) {
                // Since one_shot sensors are unregistered when onTrigger is called, unregister
                // listeners here so that the MotionListener is in a consistent state when it calls
                // out to motionLocked.
                mSensorManager.unregisterListener(this, mMotionSensor);
                active = false;
                motionLocked();