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

Commit c2832705 authored by Daniel Erat's avatar Daniel Erat
Browse files

libbinder: Stub out checkPermissions() on Brillo.

When BRILLO is defined at build-time, avoid checking
permissions with ActivityManager (which isn't built for
Brillo).

Bug: 24907738
Change-Id: I8e277fe45d73d551e3a8ab41bd9dfa2535967522
parent 8e0c88ea
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -67,6 +67,11 @@ bool checkCallingPermission(const String16& permission, int32_t* outPid, int32_t

bool checkPermission(const String16& permission, pid_t pid, uid_t uid)
{
#ifdef __BRILLO__
    // Brillo doesn't currently run ActivityManager or support framework permissions.
    return true;
#endif

    sp<IPermissionController> pc;
    gDefaultServiceManagerLock.lock();
    pc = gPermissionController;