Adding tracing for DPC::updatePowerState for tracking its performance

Bug: 243392942
Test: Manual
Change-Id: I53d6c9fe7fb385356891d6a3280040a6e934b5e9
This commit is contained in:
Rupesh Bansal
2022-08-22 16:34:03 +00:00
parent f8d7c4ba8f
commit 7393c10850

View File

@@ -813,13 +813,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
mDisplayStatsId = mUniqueDisplayId.hashCode();
mDisplayDeviceConfig = config;
loadFromDisplayDeviceConfig(token, info);
if (DEBUG) {
Trace.beginAsyncSection("DisplayPowerController#updatePowerState", 0);
}
updatePowerState();
if (DEBUG) {
Trace.endAsyncSection("DisplayPowerController#updatePowerState", 0);
}
}
});
}
@@ -1147,6 +1141,16 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
}
private void updatePowerState() {
if (DEBUG) {
Trace.beginSection("DisplayPowerController#updatePowerState");
}
updatePowerStateInternal();
if (DEBUG) {
Trace.endSection();
}
}
private void updatePowerStateInternal() {
// Update the power state request.
final boolean mustNotify;
final int previousPolicy;