diff --git a/services/jni/com_android_server_power_PowerManagerService.cpp b/services/jni/com_android_server_power_PowerManagerService.cpp index 38af38d232b36..dcc2b58470d52 100644 --- a/services/jni/com_android_server_power_PowerManagerService.cpp +++ b/services/jni/com_android_server_power_PowerManagerService.cpp @@ -183,14 +183,16 @@ static void nativeSetScreenState(JNIEnv *env, jclass clazz, jboolean on) { gPowerModule->setInteractive(gPowerModule, true); } + const sp& display = s->getBuiltInDisplay(0); // TODO: support multiple displays { ALOGD_IF_SLOW(100, "Excessive delay in unblank() while turning screen on"); - s->unblank(); + s->unblank(display); } } else { + const sp& display = s->getBuiltInDisplay(0); // TODO: support multiple displays { ALOGD_IF_SLOW(100, "Excessive delay in blank() while turning screen off"); - s->blank(); + s->blank(display); } if (gPowerModule) {