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

Commit 1abba364 authored by Marin Shalamanov's avatar Marin Shalamanov Committed by Android (Google) Code Review
Browse files

Merge "Use type safe display IDs."

parents 47559c83 4e844afd
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1170,14 +1170,14 @@ int main(int argc, char* const argv[]) {
            }
            break;
        case 'd':
            gPhysicalDisplayId = atoll(optarg);
            if (gPhysicalDisplayId == 0) {
            gPhysicalDisplayId = PhysicalDisplayId(atoll(optarg));
            if (gPhysicalDisplayId.value == 0) {
                fprintf(stderr, "Please specify a valid physical display id\n");
                return 2;
            } else if (SurfaceComposerClient::
                    getPhysicalDisplayToken(gPhysicalDisplayId) == nullptr) {
                fprintf(stderr, "Invalid physical display id: %"
                        ANDROID_PHYSICAL_DISPLAY_ID_FORMAT "\n", gPhysicalDisplayId);
                fprintf(stderr, "Invalid physical display id: %s\n",
                        to_string(gPhysicalDisplayId).c_str());
                return 2;
            }
            break;