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

Commit 06a7bf9e authored by Heemin Seog's avatar Heemin Seog
Browse files

DO NOT MERGE Set the sensor threshold only if sensor exists

Bug: 150779130
Test: atest SystemUITests and manual test for automotive
Change-Id: I18e3584c66f1286713a6fdadc678a9048869913b
parent 8af68ccf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -305,7 +305,7 @@ public class DozeSensors {
                        mContext.getResources());
            } else {
                sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY);
                mSensorThreshold = sensor.getMaximumRange();
                mSensorThreshold = sensor == null ? 0 : sensor.getMaximumRange();
            }
            mSensor = sensor;
        }