Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 685c352e authored by Lucas Berthou's avatar Lucas Berthou
Browse files

SF: fixing estimatedDpi checking x twice

This was caught after the change was merged. In practice it is unlikely
that y would be -1 with x not also being -1, but code shouls still be
correct.

Flag: com.android.graphics.surfaceflinger.flags.correct_dpi_with_display_size
Bug: 361413340
Test: HWComposerTest
Change-Id: I8ed47e73239c3d1cbeca8f093644d852cfb04011
parent b1d95d63
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -305,7 +305,7 @@ DisplayConfiguration::Dpi HWComposer::correctedDpiIfneeded(
    // The logic here checks if hwc was able to provide some dpi, and if so if the dpi
    // The logic here checks if hwc was able to provide some dpi, and if so if the dpi
    // disparity between the axes is more reasonable than a rough estimate, otherwise use
    // disparity between the axes is more reasonable than a rough estimate, otherwise use
    // the estimated dpi as a corrected value.
    // the estimated dpi as a corrected value.
    if (estimatedDpi.x == -1 || estimatedDpi.x == -1) {
    if (estimatedDpi.x == -1 || estimatedDpi.y == -1) {
        return dpi;
        return dpi;
    }
    }
    if (dpi.x == -1 || dpi.y == -1) {
    if (dpi.x == -1 || dpi.y == -1) {