Merge "Update major/minor from longpress sensor" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-06-14 18:01:48 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 3 deletions

View File

@@ -307,7 +307,7 @@ public class DozeTriggers implements DozeMachine.Part {
// Since the gesture won't be received by the UDFPS view, manually inject an
// event.
mAuthController.onAodInterrupt((int) screenX, (int) screenY,
rawValues[2] /* major */, rawValues[3] /* minor */);
rawValues[3] /* major */, rawValues[4] /* minor */);
} else {
mDozeHost.extendPulse(pulseReason);
}

View File

@@ -236,13 +236,14 @@ public class DozeTriggersTest extends SysuiTestCase {
public void testOnSensor_Fingerprint() {
final int screenX = 100;
final int screenY = 100;
final float misc = -1;
final float minor = 2f;
final float major = 3f;
final int reason = DozeLog.REASON_SENSOR_UDFPS_LONG_PRESS;
float[] rawValues = new float[]{screenX, screenY, minor, major};
float[] rawValues = new float[]{screenX, screenY, misc, major, minor};
mTriggers.onSensor(reason, screenX, screenY, rawValues);
verify(mHost).extendPulse(reason);
verify(mAuthController).onAodInterrupt(eq(screenX), eq(screenY), eq(minor), eq(major));
verify(mAuthController).onAodInterrupt(eq(screenX), eq(screenY), eq(major), eq(minor));
}
private void waitForSensorManager() {