vi: connect vsync event handle lifetime to application display service interface

This commit is contained in:
Liam
2024-01-06 23:58:04 -05:00
parent ae88ea79b2
commit ea710e6523
4 changed files with 11 additions and 24 deletions

View File

@ -808,6 +808,12 @@ private:
rb.Push(result);
return;
}
if (vsync_event_fetched) {
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(VI::ResultPermissionDenied);
return;
}
vsync_event_fetched = true;
IPC::ResponseBuilder rb{ctx, 2, 1};
rb.Push(ResultSuccess);
@ -901,6 +907,7 @@ private:
Nvnflinger::Nvnflinger& nvnflinger;
Nvnflinger::HosBinderDriverServer& hos_binder_driver_server;
bool vsync_event_fetched{false};
};
static bool IsValidServiceAccess(Permission permission, Policy policy) {