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

Commit a9636c39 authored by Gil Dekel's avatar Gil Dekel Committed by Android (Google) Code Review
Browse files

Merge "cmds: Update DisplayId usage" into main

parents ec69eba3 3eaebefc
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1382,14 +1382,16 @@ int main(int argc, char* const argv[]) {
            }
            break;
        case 'd':
            if (const auto id = android::DisplayId::fromValue<PhysicalDisplayId>(atoll(optarg));
                id && SurfaceComposerClient::getPhysicalDisplayToken(*id)) {
                gPhysicalDisplayId = *id;
        {
            const PhysicalDisplayId id = android::PhysicalDisplayId::fromValue(atoll(optarg));
            if (SurfaceComposerClient::getPhysicalDisplayToken(id)) {
                gPhysicalDisplayId = id;
                break;
            }

            fprintf(stderr, "Invalid physical display ID\n");
            return 2;
        }
        case 'S':
            gSecureDisplay = true;
            break;