mirror of
https://github.com/Evolution-X-Devices/device_google_wahoo
synced 2026-02-01 07:50:47 +00:00
Merge "wahoo: don't reset launch hint early" into oc-dr1-dev
am: c14fa2ba68
Change-Id: I2717d56c17749c5d91404eac84f27337ca5cb438
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user