Skip to content

Commit 80cd819

Browse files
author
Jeff Brown
committed
Use more reasonable warning thresholds for power on/off.
To encourage vendors to make power on/off as efficient and responsive as possible, we log some warnings whenever it is too slow. The previous thresholds were a little unreasonable mainly because we wanted to understand how long the process tends to take even when it's fast. Raise the warning limit while still being aggressive about timings. Ideally we want the screen to turn on/off within no more than a few frames. Bug: 7167820 Change-Id: Id28dbf8c91cefa7ae7544b72887104af7aabccff
1 parent 5e21bf9 commit 80cd819

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

services/jni/com_android_server_power_PowerManagerService.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,32 +174,32 @@ static void nativeSetScreenState(JNIEnv *env, jclass clazz, jboolean on) {
174174
sp<ISurfaceComposer> s(ComposerService::getComposerService());
175175
if (on) {
176176
{
177-
ALOGD_IF_SLOW(50, "Excessive delay in autosuspend_disable() while turning screen on");
177+
ALOGD_IF_SLOW(100, "Excessive delay in autosuspend_disable() while turning screen on");
178178
autosuspend_disable();
179179
}
180180

181181
if (gPowerModule) {
182-
ALOGD_IF_SLOW(10, "Excessive delay in setInteractive(true) while turning screen on");
182+
ALOGD_IF_SLOW(20, "Excessive delay in setInteractive(true) while turning screen on");
183183
gPowerModule->setInteractive(gPowerModule, true);
184184
}
185185

186186
{
187-
ALOGD_IF_SLOW(20, "Excessive delay in unblank() while turning screen on");
187+
ALOGD_IF_SLOW(100, "Excessive delay in unblank() while turning screen on");
188188
s->unblank();
189189
}
190190
} else {
191191
{
192-
ALOGD_IF_SLOW(20, "Excessive delay in blank() while turning screen off");
192+
ALOGD_IF_SLOW(100, "Excessive delay in blank() while turning screen off");
193193
s->blank();
194194
}
195195

196196
if (gPowerModule) {
197-
ALOGD_IF_SLOW(10, "Excessive delay in setInteractive(false) while turning screen off");
197+
ALOGD_IF_SLOW(20, "Excessive delay in setInteractive(false) while turning screen off");
198198
gPowerModule->setInteractive(gPowerModule, false);
199199
}
200200

201201
{
202-
ALOGD_IF_SLOW(50, "Excessive delay in autosuspend_enable() while turning screen off");
202+
ALOGD_IF_SLOW(100, "Excessive delay in autosuspend_enable() while turning screen off");
203203
autosuspend_enable();
204204
}
205205
}

0 commit comments

Comments
 (0)