hidl: biometrics: fingerprint: Set thread to high CFS priority

Change-Id: I3159fb7e870261cd13af55a054e4c8240eaf05ce
[ghostrider-reborn: use SCHED_NORMAL]
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
This commit is contained in:
Nauval Rizky 2023-05-17 09:41:00 +09:00 committed by basamaryan
parent fc7247187d
commit 25b9474360
No known key found for this signature in database
GPG Key ID: 707BA6C82329E8F9
2 changed files with 4 additions and 0 deletions

View File

@ -5,3 +5,4 @@ service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.
class late_start
user system
group system input uhid
priority -20

View File

@ -17,6 +17,8 @@
using android::sp;
using android::hardware::configureRpcThreadpool;
using android::hardware::joinRpcThreadpool;
using android::hardware::setMinSchedulerPolicy;
using android::hardware::biometrics::fingerprint::V2_3::IBiometricsFingerprint;
using android::hardware::biometrics::fingerprint::V2_3::implementation::BiometricsFingerprint;
@ -24,6 +26,7 @@ int main() {
android::sp<IBiometricsFingerprint> bio = BiometricsFingerprint::getInstance();
configureRpcThreadpool(1, true /*callerWillJoin*/);
setMinSchedulerPolicy(bio, SCHED_NORMAL, -20);
if (bio != nullptr) {
if (::android::OK != bio->registerAsService()) {