Use local mSensors as index of mSensors list
The mDevicePosture was the index use for TriggerSensor[] In this bug, the onTrigger(TriggerEvent event) has call to corresponding TriggerSensor and local mSensors should maping the index of mPosure. Test: atest DozeSensorsTest Bug: 203822366 Change-Id: I7baa1c8d971b2f0be78792810260859cd60f1fab
This commit is contained in:
@@ -659,7 +659,7 @@ public class DozeSensors {
|
||||
@Override
|
||||
@AnyThread
|
||||
public void onTrigger(TriggerEvent event) {
|
||||
final Sensor sensor = mSensors[mDevicePosture];
|
||||
final Sensor sensor = mSensors[mPosture];
|
||||
mDozeLog.traceSensor(mPulseReason);
|
||||
mHandler.post(mWakeLock.wrap(() -> {
|
||||
if (DEBUG) Log.d(TAG, "onTrigger: " + triggerEventToString(event));
|
||||
|
||||
Reference in New Issue
Block a user