MotoActions: doze: Register approach sensor properly
authorErfan Abdi <erfangplus@gmail.com>
Sat, 9 Jan 2021 23:11:09 +0000 (02:41 +0330)
committerErfan Abdi <erfangplus@gmail.com>
Wed, 27 Jan 2021 16:36:51 +0000 (17:36 +0100)
Change-Id: I55814f673756965614e4a4a3d687de8ac73ac173

MotoActions/src/org/lineageos/settings/device/doze/GlanceSensor.java

index 9607cfc9df52b5728838374a1b965dce264a1cf8..db63c15a62989a775e7bc6d6afd94213b5381c73 100644 (file)
@@ -62,7 +62,7 @@ public class GlanceSensor implements ScreenStateNotifier {
         if (mMotoActionsSettings.isPickUpEnabled() && !mEnabled) {
             Log.d(TAG, "Enabling");
             mSensorHelper.registerListener(mSensor, mGlanceListener);
-            mSensorHelper.registerListener(mSensor, mApproachGlanceListener);
+            mSensorHelper.registerListener(mApproachSensor, mApproachGlanceListener);
             mEnabled = true;
         }
     }