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

Commit 56cd1537 authored by Ivan Podogov's avatar Ivan Podogov Committed by android-build-merger
Browse files

Merge "Set the sensor batch size for accelerometer listener." into nyc-mr1-dev am: 22132cb6

am: 758cfdc7

* commit '758cfdc7':
  Set the sensor batch size for accelerometer listener.

Change-Id: I780e03a033be866cb2c48276977e38494f57ad4c
parents 1e27ee69 758cfdc7
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ public abstract class WindowOrientationListener {
            "debug.orientation.log", false);

    private static final boolean USE_GRAVITY_SENSOR = false;
    private static final int DEFAULT_BATCH_LATENCY = 100000;

    private Handler mHandler;
    private SensorManager mSensorManager;
@@ -118,7 +119,12 @@ public abstract class WindowOrientationListener {
                    Slog.d(TAG, "WindowOrientationListener enabled");
                }
                mOrientationJudge.resetLocked();
                if (mSensor.getType() == Sensor.TYPE_ACCELEROMETER) {
                    mSensorManager.registerListener(
                            mOrientationJudge, mSensor, mRate, DEFAULT_BATCH_LATENCY, mHandler);
                } else {
                    mSensorManager.registerListener(mOrientationJudge, mSensor, mRate, mHandler);
                }
                mEnabled = true;
            }
        }