pa: Add AIDL interface and permissions for FaceSense.
Change-Id: I059a6aabfdfea8a2fceccbfc809a8fa8d8370098
This commit is contained in:
parent
c7254cadbb
commit
825f13c172
|
@ -36,6 +36,12 @@ ifeq ($(TARGET_SUPPORTS_64_BIT_APPS), true)
|
|||
TARGET_ENABLE_MEDIADRM_64 := true
|
||||
endif
|
||||
|
||||
# Face Sense
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/android.hardware.biometrics.face.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/android.hardware.biometrics.face.xml \
|
||||
vendor/pa/config/permissions/hiddenapi-whitelist-co.aospa.facesense.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/sysconfig/hiddenapi-whitelist-co.aospa.facesense.xml \
|
||||
vendor/pa/config/permissions/privapp-permissions-co.aospa.facesense.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/permissions/privapp-permissions-co.aospa.facesense.xml
|
||||
|
||||
# Filesystem
|
||||
TARGET_FS_CONFIG_GEN += vendor/pa/config/config.fs
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2020 Paranoid Android
|
||||
|
||||
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.
|
||||
-->
|
||||
<config>
|
||||
<hidden-api-whitelisted-app package="co.aospa.facesense" />
|
||||
</config>
|
|
@ -20,10 +20,6 @@
|
|||
<permission name="android.permission.WRITE_MEDIA_STORAGE"/>
|
||||
</privapp-permissions>
|
||||
|
||||
<privapp-permissions package="co.aospa.facesense">
|
||||
<permission name="android.permission.WRITE_SECURE_SETTINGS"/>
|
||||
</privapp-permissions>
|
||||
|
||||
<privapp-permissions package="co.aospa.hub">
|
||||
<permission name="android.permission.ACCESS_CACHE_FILESYSTEM"/>
|
||||
<permission name="android.permission.REBOOT"/>
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2020 Paranoid Android
|
||||
|
||||
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.
|
||||
-->
|
||||
<permissions>
|
||||
|
||||
<privapp-permissions package="co.aospa.facesense">
|
||||
<permission name="android.permission.WRITE_SECURE_SETTINGS"/>
|
||||
</privapp-permissions>
|
||||
|
||||
</permissions>
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright (C) 2020 Paranoid Android
|
||||
//
|
||||
// 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.
|
||||
|
||||
aidl_interface {
|
||||
name: "vendor.aospa.biometrics.face",
|
||||
srcs: ["vendor/aospa/biometrics/face/*.aidl"],
|
||||
system_ext_specific: true,
|
||||
backend: {
|
||||
java: {
|
||||
platform_apis: true,
|
||||
},
|
||||
},
|
||||
unstable: true,
|
||||
}
|
42
interfaces/biometrics/face/aidl/vendor/aospa/biometrics/face/ISenseService.aidl
vendored
Normal file
42
interfaces/biometrics/face/aidl/vendor/aospa/biometrics/face/ISenseService.aidl
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
/**
|
||||
* Copyright (C) 2020 Paranoid Android
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package vendor.aospa.biometrics.face;
|
||||
|
||||
import vendor.aospa.biometrics.face.ISenseServiceReceiver;
|
||||
|
||||
/** @hide */
|
||||
interface ISenseService {
|
||||
oneway void authenticate(long operationId);
|
||||
|
||||
oneway void cancel();
|
||||
|
||||
oneway void enroll(in byte[] cryptoToken, int timeout, in int[] disabledFeatures);
|
||||
|
||||
int enumerate();
|
||||
|
||||
long generateChallenge(int timeout);
|
||||
|
||||
int getAuthenticatorId();
|
||||
|
||||
oneway void remove(int biometricId);
|
||||
|
||||
oneway void resetLockout(in byte[] cryptoToken);
|
||||
|
||||
int revokeChallenge();
|
||||
|
||||
oneway void setCallback(in ISenseServiceReceiver receiver);
|
||||
}
|
34
interfaces/biometrics/face/aidl/vendor/aospa/biometrics/face/ISenseServiceReceiver.aidl
vendored
Normal file
34
interfaces/biometrics/face/aidl/vendor/aospa/biometrics/face/ISenseServiceReceiver.aidl
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
* Copyright (C) 2020 Paranoid Android
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package vendor.aospa.biometrics.face;
|
||||
|
||||
/** @hide */
|
||||
oneway interface ISenseServiceReceiver {
|
||||
void onEnrollResult(int faceId, int userId, int remaining);
|
||||
|
||||
void onAuthenticated(int faceId, int userId, in byte[] token);
|
||||
|
||||
void onAcquired(int userId, int acquiredInfo, int vendorCode);
|
||||
|
||||
void onError(int error, int vendorCode);
|
||||
|
||||
void onRemoved(in int[] faceIds, int userId);
|
||||
|
||||
void onEnumerate(in int[] faceIds, int userId);
|
||||
|
||||
void onLockoutChanged(long duration);
|
||||
}
|
Loading…
Reference in New Issue