From 43b9e3524f90a59e59f4d6a1f0e7f6629e4d029f Mon Sep 17 00:00:00 2001 From: Michael Bestas Date: Sun, 6 Oct 2019 01:34:17 +0300 Subject: power: Clean up and fix set_interactive_override * Remove debug logs and useless comments * Consistent return values * Add back display hints for legacy platforms, they used to live in power-common.c but removed in commit 561cffcbfa66192e839e040d2da3bff2ecf8dcac * Check if set_interactive_override handled hints and print info message if it didn't Change-Id: Iff9f7327ba71c282e34ff3143c45a3f40f72fc92 --- power-8994.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'power-8994.c') diff --git a/power-8994.c b/power-8994.c index 561809e..0682b17 100644 --- a/power-8994.c +++ b/power-8994.c @@ -148,7 +148,6 @@ int set_interactive_override(int on) { if (get_scaling_governor(governor, sizeof(governor)) == -1) { ALOGE("Can't obtain scaling governor."); - return HINT_NONE; } @@ -158,14 +157,12 @@ int set_interactive_override(int on) { int resource_values[] = {0x777}; /* 4+0 core config in display off */ perform_hint_action(DISPLAY_STATE_HINT_ID, resource_values, ARRAY_SIZE(resource_values)); - return HINT_HANDLED; } } else { /* Display on */ if (is_interactive_governor(governor)) { undo_hint_action(DISPLAY_STATE_HINT_ID); - return HINT_HANDLED; } } - return HINT_NONE; + return HINT_HANDLED; } -- cgit v1.2.3