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

Commit 81b67a16 authored by Jiwen 'Steve' Cai's avatar Jiwen 'Steve' Cai Committed by Jiwen Cai
Browse files

Allow VrCore to self-grant sensors:high policy

We used to limit self-grant sensors:high by using performanced
API. Now that we need to allow trusted process (i.e. VrCore) to grant
the same schduler policy as we are now moving 6DOF tracking algorithm
into VrCore.

Bug: 78169521
Bug: 110378537
Bug: 110436069
Test: VrCore sensor publishing thread having SchedFifo now
Change-Id: I88fa8763031ae594747b7a5a1938541349919828
parent 681ea88d
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -124,9 +124,6 @@ PerformanceService::PerformanceService()
  // TODO(eieio): Replace this witha device-specific config file. This is just a
  // hack for now to put some form of permission logic in place while a longer
  // term solution is developed.
  using AllowRootSystem =
      CheckAnd<SameProcess,
               CheckOr<UserId<AID_ROOT, AID_SYSTEM>, GroupId<AID_SYSTEM>>>;
  using AllowRootSystemGraphics =
      CheckAnd<SameProcess, CheckOr<UserId<AID_ROOT, AID_SYSTEM, AID_GRAPHICS>,
                                    GroupId<AID_SYSTEM, AID_GRAPHICS>>>;
@@ -170,17 +167,17 @@ PerformanceService::PerformanceService()
       {.timer_slack = kTimerSlackForegroundNs,
        .scheduler_policy = SCHED_FIFO | SCHED_RESET_ON_FORK,
        .priority = fifo_low,
        .permission_check = AllowRootSystem::Check}},
        .permission_check = AllowRootSystemTrusted::Check}},
      {"sensors:low",
       {.timer_slack = kTimerSlackForegroundNs,
        .scheduler_policy = SCHED_FIFO | SCHED_RESET_ON_FORK,
        .priority = fifo_low,
        .permission_check = AllowRootSystem::Check}},
        .permission_check = AllowRootSystemTrusted::Check}},
      {"sensors:high",
       {.timer_slack = kTimerSlackForegroundNs,
        .scheduler_policy = SCHED_FIFO | SCHED_RESET_ON_FORK,
        .priority = fifo_low + 1,
        .permission_check = AllowRootSystem::Check}},
        .permission_check = AllowRootSystemTrusted::Check}},
      {"vr:system:arp",
       {.timer_slack = kTimerSlackForegroundNs,
        .scheduler_policy = SCHED_FIFO | SCHED_RESET_ON_FORK,