From a696e6b04a4fd7a0b345691824620066bfb26ec1 Mon Sep 17 00:00:00 2001 From: Tim Murray Date: Wed, 26 Jul 2017 15:13:09 -0700 Subject: [PATCH] wahoo: don't reset launch hint early Change the launch hint duration to 1.25s and don't end the launch mode early. Test: launch camera bug 63913311 Change-Id: If28129b50bdd5e73aa196bd7079ac847b5621e31 --- power/power-8998.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/power/power-8998.c b/power/power-8998.c index 4fdffb95..20c56457 100644 --- a/power/power-8998.c +++ b/power/power-8998.c @@ -224,8 +224,8 @@ static int process_video_encode_hint(void *data) static int process_activity_launch_hint(void *data) { - // boost will timeout in 5s - int duration = 5000; + // boost will timeout in 1.25s + int duration = 1250; ATRACE_BEGIN("launch"); if (sustained_performance_mode || vr_mode) { ATRACE_END(); @@ -233,7 +233,9 @@ static int process_activity_launch_hint(void *data) } ALOGD("LAUNCH HINT: %s", data ? "ON" : "OFF"); - if (data && launch_mode == 0) { + // restart the launch hint if the framework has not yet released + // this shouldn't happen, but we've seen bugs where it could + if (data) { launch_handle = process_boost(launch_handle, duration); if (launch_handle > 0) { launch_mode = 1; @@ -246,7 +248,9 @@ static int process_activity_launch_hint(void *data) return HINT_NONE; } } else if (data == NULL && launch_mode == 1) { - release_request(launch_handle); + // framework release hints aren't necessarily reliable + // always wait the full duration + // release_request(launch_handle); ATRACE_INT("launch_lock", 0); launch_mode = 0; ATRACE_END();