ISession#detectInteraction should be an optional feature

Bug: 178165973
Test: m android.hardware.biometrics.fingerprint-update-api
Test: m android.hardware.biometrics.face-update-api
Change-Id: I4b07b523735e25f233dfec79b787ec536a57660a
This commit is contained in:
Kevin Chyn
2021-02-05 14:30:23 -08:00
parent c2954f4e58
commit 45f5b0f9f2
13 changed files with 138 additions and 10 deletions

View File

@@ -41,4 +41,5 @@ parcelable SensorProps {
float enrollTranslationX;
float enrollTranslationY;
float enrollPreviewScale;
boolean supportsDetectInteraction;
}

View File

@@ -196,7 +196,9 @@ interface ISession {
/**
* detectInteraction:
*
* A request to start looking for faces without performing matching.
* A request to start looking for faces without performing matching. Must only be called if
* SensorProps#supportsDetectInteraction is true. If invoked on implementations that do not
* support this functionality, the HAL must respond with ISession#onError(UNABLE_TO_PROCESS, 0).
*
* Once the HAL is able to start processing this request, it must notify the framework via
* ISessionCallback#onStateChanged with SessionState::DETECTING_INTERACTION.

View File

@@ -70,5 +70,10 @@ parcelable SensorProps {
* be applied when configuring the preview texture.
*/
float enrollPreviewScale;
/**
* Specifies whether or not the implementation supports ISession#detectInteraction.
*/
boolean supportsDetectInteraction;
}

View File

@@ -1,4 +1,18 @@
///////////////////////////////////////////////////////////////////////////////
/*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*////////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////

View File

@@ -1,4 +1,18 @@
///////////////////////////////////////////////////////////////////////////////
/*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*////////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////

View File

@@ -1,4 +1,18 @@
///////////////////////////////////////////////////////////////////////////////
/*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*////////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////

View File

@@ -1,4 +1,18 @@
///////////////////////////////////////////////////////////////////////////////
/*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*////////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////

View File

@@ -1,4 +1,18 @@
///////////////////////////////////////////////////////////////////////////////
/*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*////////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////

View File

@@ -1,4 +1,18 @@
///////////////////////////////////////////////////////////////////////////////
/*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*////////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////

View File

@@ -1,4 +1,18 @@
///////////////////////////////////////////////////////////////////////////////
/*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*////////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
@@ -26,4 +40,5 @@ parcelable SensorProps {
int sensorLocationY;
int sensorRadius;
int displayId;
boolean supportsDetectInteraction;
}

View File

@@ -1,4 +1,18 @@
///////////////////////////////////////////////////////////////////////////////
/*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*////////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////

View File

@@ -191,7 +191,9 @@ interface ISession {
/**
* detectInteraction:
*
* A request to start looking for fingerprints without performing matching.
* A request to start looking for fingerprints without performing matching. Must only be called
* if SensorProps#supportsDetectInteraction is true. If invoked on implementations that do not
* support this functionality, the HAL must respond with ISession#onError(UNABLE_TO_PROCESS, 0).
*
* Once the HAL is able to start processing this request, it must notify the framework via
* ISessionCallback#onStateChanged with SessionState::DETECTING_INTERACTION.

View File

@@ -63,5 +63,10 @@ parcelable SensorProps {
* android.hardware.DisplayManager#getDisplay Android API.
*/
int displayId;
/**
* Specifies whether or not the implementation supports ISession#detectInteraction.
*/
boolean supportsDetectInteraction;
}