Skip to content
Snippets Groups Projects
Commit f37e3002 authored by Lais Andrade's avatar Lais Andrade Committed by Android (Google) Code Review
Browse files

Merge "Fix retry logic for vibrator HAL requests" into main

parents ddb58a79 f80571d6
No related branches found
No related tags found
No related merge requests found
......@@ -370,6 +370,7 @@ static jboolean vibratorGetInfo(JNIEnv* env, jclass /* clazz */, jlong ptr,
return JNI_FALSE;
}
vibrator::Info info = wrapper->getVibratorInfo();
info.logFailures();
if (info.capabilities.isOk()) {
env->CallObjectMethod(vibratorInfoBuilder, sVibratorInfoBuilderClassInfo.setCapabilities,
......@@ -443,7 +444,7 @@ static jboolean vibratorGetInfo(JNIEnv* env, jclass /* clazz */, jlong ptr,
env->CallObjectMethod(vibratorInfoBuilder, sVibratorInfoBuilderClassInfo.setFrequencyProfile,
frequencyProfile);
return info.isFailedLogged("vibratorGetInfo") ? JNI_FALSE : JNI_TRUE;
return info.shouldRetry() ? JNI_FALSE : JNI_TRUE;
}
static const JNINativeMethod method_table[] = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment